Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2782242ybl; Mon, 19 Aug 2019 07:28:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0SugPknFN7iXVKum0murI97dhvJMQA4dzmpgWKf83doazkCDGvLgA8bxL2CrqVwDuinQd X-Received: by 2002:a63:205f:: with SMTP id r31mr20305967pgm.159.1566224880645; Mon, 19 Aug 2019 07:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566224880; cv=none; d=google.com; s=arc-20160816; b=U+D7SmqV1/OHf6UFgbMXqsImuM+I4vqfWIO7wN36gzO1U0NFVkq+slkIo5K5sT4N1R dyRIX2mp0mBj1M/cZ2yIQtqw3Tj/iwZ028iDQ5DQ8jr9HZfNE310SRfCjRfHA5+MUgAm U2xo9vtzOCOZQ0Os/VMANVIUgXn12ag34LaQVjm3sQ1EQ3RIROQfGKEfomFjvyl+qk4V Zhiu8zGx0/6QfbHTTs8D9VbyF1gXS/Bm1mnJQx9cP06EE9x8c1VKQM2wwEtWhtaksQ8Y gWK8mtXkAyCDWqCcGGZOT/s1AqvNvjWUqYLALPF15ZBolQJJK4CiNVD8qKz3MBDQNfya QQww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1w16wvK0WdlAtHn9u9TWHgY5zKlak9XnpOHy2QIi/RY=; b=QjEqJxbougmfZysnfeh/XZ31FugqDeYgyK6JXHgFwIVg9qhv79irOJ1xMN0M1fOMX7 87JKXUm8+5V77B8lmCdo8GQFxVR0B6gQljNXoTCvZrfi0et59H1LKQ2Z3rMHX1GITCRD YIVZgTMsFVLkVpznoTHLZTjmSb40QPGK6J3tOE9Q5U5F6RpjSLp0i2iV9PxhwYuJweoB VleF11u00+Yd24ZBBUNDhUGihp0baEJPNl59jvTsdMYKlHMNH8rpsKLF37MJS0/A8BEc EPLdclYHzAkzWOR2FpuGBGtrZz3a2bxaGw3YBNfnr5ecCx5YuC5hCZy3pdnGKYjDH9OT Nuiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si9894053pgo.283.2019.08.19.07.27.46; Mon, 19 Aug 2019 07:28:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726987AbfHSOZ1 (ORCPT + 99 others); Mon, 19 Aug 2019 10:25:27 -0400 Received: from gate.crashing.org ([63.228.1.57]:53116 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbfHSOZ0 (ORCPT ); Mon, 19 Aug 2019 10:25:26 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x7JEOx1K022323; Mon, 19 Aug 2019 09:25:00 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x7JEOxlG022322; Mon, 19 Aug 2019 09:24:59 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 19 Aug 2019 09:24:59 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v3 3/3] powerpc/64: optimise LOAD_REG_IMMEDIATE_SYM() Message-ID: <20190819142459.GJ31406@gate.crashing.org> References: <92bf50b31f5f78cc76ed055b11a492e8e9e2c731.1566223054.git.christophe.leroy@c-s.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92bf50b31f5f78cc76ed055b11a492e8e9e2c731.1566223054.git.christophe.leroy@c-s.fr> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 That should be #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 (tmp is the high half, reg is the low half, as inputs to that rldimi). Segher