From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB2C4C3A5A0 for ; Mon, 19 Aug 2019 15:09:55 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69C7920651 for ; Mon, 19 Aug 2019 15:09:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NpXsGGFi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69C7920651 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46By5Y0YlLzDqxM for ; Tue, 20 Aug 2019 01:09:53 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::444; helo=mail-pf1-x444.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NpXsGGFi"; dkim-atps=neutral Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46By0R533FzDqdc for ; Tue, 20 Aug 2019 01:05:26 +1000 (AEST) Received: by mail-pf1-x444.google.com with SMTP id v12so1318015pfn.10 for ; Mon, 19 Aug 2019 08:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :user-agent:message-id:content-transfer-encoding; bh=2ngrUcm028FTMoHPYwWl4FMwsMbOztEIs+R4QrrR4rw=; b=NpXsGGFiQO2Mz4ORGbsS+ZJTAE+cCEfnpxGV7ZTaS8n+cYKW15FoD17x/Vc1KyFmNH PIDSLvIRG58tREVOAavFge/cofdX4gzRNlE9naek5zb4a89f/kPIGIy+pPd2CIHMli5t dpBhGYbbkDTo9DANgDqNa8zKrZ+xio88LhvAWsdcdNQ20UWUef69za7EvrbIxDQBDFJo jgCu/ZofkAe9DVOZXGNT+y7gpEzMjQQcLgq5vhd7tjWe90JsZefALpQM9YTcVVYnD6A+ y7czBeKXh0C3yG8IHs//zk6vWHoi0sMH22tCkTTXHpEI52Zy2pjgK8xTt4SCn9GtawsW 7szg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:user-agent:message-id:content-transfer-encoding; bh=2ngrUcm028FTMoHPYwWl4FMwsMbOztEIs+R4QrrR4rw=; b=nNqxAHAe/C4vmdeXgPezj6RnPb3Ogq1g/SWCgI+pKWC0AbkcFDGQupm9GDVP8JwweC gfcShPCY8FdB38byq7Fgy1sQK59JX/EcT5tHqfFxMdSLIVkLe+laXd9rxeNrB42NZ9Jg a6vKhyi/BGmoBfAYUr+K8qblJcR/6chfttzboNIwb4tXALr/oAmfZH0TCSN0xvXy5bxg ruPYKYrXbxygET0d/tZxA+7mTptHDLb8RMCalhb8SyZAvaZecFLOz27t4gyosvjHMdM0 UzVFWWVclOd8q/jx0GywKRIT7TRrXg45Ph7Ftniq5TyhgBwTXeXLoaN9BQl2+k3Uxu39 ALfA== X-Gm-Message-State: APjAAAUOUcK0yXRZDjv2zkbyppI/7oY5RhyTcg9wU2aAy16ML4gZ5S2I /tFv/zyUjHqOoGaw7nNvNoY= X-Google-Smtp-Source: APXvYqzTv8DMd0Hto6oUfVfrBBvkkCqsCKUum+sxq+xdhkH6KnGHqImWBaBZF1x5ryJuEqdshOhwMQ== X-Received: by 2002:a17:90a:bf82:: with SMTP id d2mr10680284pjs.121.1566227123998; Mon, 19 Aug 2019 08:05:23 -0700 (PDT) Received: from localhost ([61.68.68.69]) by smtp.gmail.com with ESMTPSA id m20sm17596953pff.79.2019.08.19.08.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 08:05:23 -0700 (PDT) Date: Tue, 20 Aug 2019 01:05:16 +1000 From: Nicholas Piggin Subject: Re: [PATCH v3 3/3] powerpc/64: optimise LOAD_REG_IMMEDIATE_SYM() To: Christophe Leroy , Segher Boessenkool References: <92bf50b31f5f78cc76ed055b11a492e8e9e2c731.1566223054.git.christophe.leroy@c-s.fr> <20190819142459.GJ31406@gate.crashing.org> In-Reply-To: <20190819142459.GJ31406@gate.crashing.org> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1566226318.3km27rs0o4.astroid@bobo.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Segher Boessenkool's on August 20, 2019 12:24 am: > On Mon, Aug 19, 2019 at 01:58:12PM +0000, Christophe Leroy wrote: >> -#define LOAD_REG_IMMEDIATE_SYM(reg,expr) \ >> - lis reg,(expr)@highest; \ >> - ori reg,reg,(expr)@higher; \ >> - rldicr reg,reg,32,31; \ >> - oris reg,reg,(expr)@__AS_ATHIGH; \ >> - ori reg,reg,(expr)@l; >> +#define LOAD_REG_IMMEDIATE_SYM(reg, tmp, expr) \ >> + lis reg, (expr)@highest; \ >> + lis tmp, (expr)@__AS_ATHIGH; \ >> + ori reg, reg, (expr)@higher; \ >> + ori tmp, reg, (expr)@l; \ >> + rldimi reg, tmp, 32, 0 >=20 > That should be >=20 > #define LOAD_REG_IMMEDIATE_SYM(reg, tmp, expr) \ > lis tmp, (expr)@highest; \ > ori tmp, tmp, (expr)@higher; \ > lis reg, (expr)@__AS_ATHIGH; \ > ori reg, reg, (expr)@l; \ > rldimi reg, tmp, 32, 0 >=20 > (tmp is the high half, reg is the low half, as inputs to that rldimi). I guess the intention was also to try to fit the independent ops into the earliest fetch/issue cycle possible. #define LOAD_REG_IMMEDIATE_SYM(reg, tmp, expr) \ lis tmp, (expr)@highest; \ lis reg, (expr)@__AS_ATHIGH; \ ori tmp, tmp, (expr)@higher; \ ori reg, reg, (expr)@l; \ rldimi reg, tmp, 32, 0 Very cool series though. Thanks, Nick =