[PATCH 1/2] powerpc: rewrite LOAD_REG_IMMEDIATE() as an intelligent macro
Segher Boessenkool
segher at kernel.crashing.org
Thu Aug 15 06:10:42 AEST 2019
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
More information about the Linuxppc-dev
mailing list