Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2831545ybl; Mon, 19 Aug 2019 08:07:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTGoFtkRB7rO2IJYndT/XHGWTE9LZLAYBnSqsnJCxKIw6Wl9ZCxdL3fPtAPpBmGblQM/R+ X-Received: by 2002:a17:902:a509:: with SMTP id s9mr23471896plq.310.1566227246477; Mon, 19 Aug 2019 08:07:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566227246; cv=none; d=google.com; s=arc-20160816; b=NTLkv1Hz3h/26fbTLu55rgHO34cfyfiCEbtmUZHGgwSps7sun6r9m8ktl3vblghnqx 54sS8+UvjNKiBUiinmD8NeDBEXM1F4rhpKikk3iF5PC/AF4OXEDy+ZO7qXhfPLuKTMIp uT5U7H6V7MYDTxwNjo8c1K/sgnQPt5LJ9DeiCoBV/GucoHD30P2sPJz4+QVNGspN/Mn5 Z8R4yvmxkDAbzoQdWP0NZozzIFdbfzmDUEHNUvVx+HbQ41izs+Ka4EWR4lQ/cyHLeNOO Ebzw1DC1X40QCcgrY1AQsu/r06AH51sgW+pdHNR/h0JIxdsCqohVyHgFtePp7rUchR45 uLmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :user-agent:mime-version:in-reply-to:references:cc:to:subject:from :date:dkim-signature; bh=2ngrUcm028FTMoHPYwWl4FMwsMbOztEIs+R4QrrR4rw=; b=oyrc7hU8EiWLfMqBXJIP8lrB1sjshrZSWndQVu0qaq6iRCgLsc2LItkL+wIZPFVfoO PwSw0DQb6LnWxyggpadyfd+AlXl/A0ZzlDwXxMkGVlXA+c+cSGXkRzB0gUceMbwIQgab /qxUwEqqvw/CTCTrlPqYXDrGQP5hBNYRD6OR8DTbnSgzHgFcUrbJh6RVXzKdemRk/Im6 JdJkpkRBqh1mKvUgbfRVey8C3RkVf968o0bXXJeTFBk1WHy3Y0Psf9uHQ67XJkaR68Aj cuGvPp5a7uXPrSIAyOkpVs8RPyTS5ltz198/0908hpHyG6pn7AFc50xXIyag2537TllI j5uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NpXsGGFi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14si9836300pgg.442.2019.08.19.08.07.09; Mon, 19 Aug 2019 08:07:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NpXsGGFi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbfHSPFZ (ORCPT + 99 others); Mon, 19 Aug 2019 11:05:25 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39559 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbfHSPFY (ORCPT ); Mon, 19 Aug 2019 11:05:24 -0400 Received: by mail-pg1-f194.google.com with SMTP id u17so1382899pgi.6 for ; Mon, 19 Aug 2019 08:05:24 -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=SXL54Ak8tBJiMBdD34fVUN/u//yq4K8iIkCrsP4a10NJZIchztzvs0UM+tE327T084 BEud+/Q3Rm5df32IsKm2GoFBB0B/Ibr7VPlY1JUPaxtr7zGhUW98U2cH4brqkhpfkERS Dy5VspoBx47jxz1fH0uoY4ddQnrEM7yXDJ8b8dFUafkLemzDzFtCQYU/AHrHgyM7Z+7d JRH7bSGudCKF2R9oAiVJRMyOpT2mGFD943dKq2u/e5FxycR01z0BNWwV02nFHIzQpogI jB1yB3C0PI85i8FHuVsW78IvA7sBF73b8yqH+IVJf9vyqHlKehKZMY3bZ2xAOr07fwn/ NoOA== X-Gm-Message-State: APjAAAUht8rJoxFzs0j6wQNmVstiVVZ3HknUl9XkZyrJfm+rsNvaUi1d ccvUdmfmwqc/CC8oxUxL1Ks= 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 Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Paul Mackerras 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 =