Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2770697ybl; Mon, 19 Aug 2019 07:18:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEoDc82lETNH2SyErhjlGbvHvUp4z6elz4iaRTP2wVC3mRissnl6Fz+KnqHNFzX15wFUwV X-Received: by 2002:a17:90a:fe07:: with SMTP id ck7mr20468998pjb.68.1566224297222; Mon, 19 Aug 2019 07:18:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566224297; cv=none; d=google.com; s=arc-20160816; b=PVa0lyMvMJuBAXsxwzYRanyhvZVemrhcSlNDffMSUfgr6qgipX1b8gKRNDiGosq+zU yI0fQqNm0RtRPUt3rmNy+YISKizS6TfNgKoCw6Vhaqu8fvMsMuMi8S42cvpHemjOtSc6 +niO5Zcvv6vNYGitO5PYxlQwXcTv7DIWkGkwSsEJRbAscO76DBRgjBtoo7rxb3kXK9tD BiN7FdbXtjpphuVbQ/8Z/YB9P5lsI53eajxJ0b6Vsuab1Qj4/fhkmlOqKSnJ4AlDDlB/ tMQVAR/f2vY6BByffVs6oEV2ZisavLnWxdHZqfLeYjHGFoFuFbDqKfiAuNCihPisvqgo VnXg== 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=cZzELJChKoO6fF08iI4Noiy72iPHC0SBbh7/NBITh8o=; b=Pf3WBc2HHzRHEshbFvsUYgQbQ2tNurEXN4HSDbd36DguAwm2NZa5o3Wn1WGnW3RYGl EtSmp1T0AbxxP9GZPU0Exp4HZda/U0aIQieM92yQ5nxy+R7Jq4b8VvjvSPDUwWwEJRJx qO+tc9csWB9hZF4MiDwHqsPJUouyVX2ITpRnfkaco24j/jR0g1dEzflp2SLHVbpd++ka /9paX2ea4Io42b4+d+EwABPSCHpHJZs5TX6JVEdWUOuI2XaoCnihfOg1GRkh8oPc1d8x rktiS6IdsSqLW4UDb7HU8arcteiIkhfDdJzgY0YjY2bcd9GI3HolOtl2/gZ0foVE6J+r M4Lg== 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 60si9954479plb.16.2019.08.19.07.18.02; Mon, 19 Aug 2019 07:18:17 -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 S1726810AbfHSORJ (ORCPT + 99 others); Mon, 19 Aug 2019 10:17:09 -0400 Received: from gate.crashing.org ([63.228.1.57]:52027 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbfHSORJ (ORCPT ); Mon, 19 Aug 2019 10:17:09 -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 x7JEGjfs021854; Mon, 19 Aug 2019 09:16:45 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x7JEGjuS021851; Mon, 19 Aug 2019 09:16:45 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 19 Aug 2019 09:16:45 -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 1/3] powerpc: rewrite LOAD_REG_IMMEDIATE() as an intelligent macro Message-ID: <20190819141645.GI31406@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Hi Christophe, On Mon, Aug 19, 2019 at 01:58:10PM +0000, Christophe Leroy wrote: > +.macro __LOAD_REG_IMMEDIATE r, x > + .if (\x) >= 0x80000000 || (\x) < -0x80000000 > + __LOAD_REG_IMMEDIATE_32 \r, (\x) >> 32 > + sldi \r, \r, 32 > + .if (\x) & 0xffff0000 != 0 > + oris \r, \r, (\x)@__AS_ATHIGH > + .endif > + .if (\x) & 0xffff != 0 > + oris \r, \r, (\x)@l > + .endif > + .else > + __LOAD_REG_IMMEDIATE_32 \r, \x > + .endif > +.endm How did you test this? That last "oris" should be "ori"? Rest looks good :-) Segher