[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190814201042.GH31406@gate.crashing.org>
Date: Wed, 14 Aug 2019 15:10:42 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Christophe Leroy <christophe.leroy@....fr>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc: rewrite LOAD_REG_IMMEDIATE() as an intelligent macro
Hi Christophe,
On Tue, Aug 13, 2019 at 09:59:35AM +0000, Christophe Leroy wrote:
> + rldicr \r, \r, 32, 31
Could you please write this as
sldi \r, \r, 32
? It's much easier to read, imo (it's the exact same instruction).
You can do a lot cheaper sequences if you have a temporary reg, as well
(longest path of 3 insns instead of 5):
lis rt,A
ori rt,B
lis rd,C
ori rd,D
rldimi rd,rt,32,0
to load ABCD.
Segher
Powered by blists - more mailing lists