[RFC PATCH 1/7] powerpc: use 16-bit immediate for STACK_FRAME_REGS_MARKER

Michael Ellerman mpe at ellerman.id.au
Fri Sep 23 17:32:36 AEST 2022


Christophe Leroy <christophe.leroy at csgroup.eu> writes:
> Le 19/09/2022 à 16:01, Nicholas Piggin a écrit :
>> Using a 16-bit constant for this marker allows it to be loaded with
>> a single 'li' instruction. On 64-bit this avoids a TOC entry and a
>> TOC load that depends on the r2 value that has just been loaded from
>> the PACA.
>> 
>> XXX: this probably should be 64-bit change and use 2 instruction
>> sequence that 32-bit uses, to avoid false positives.
>
> Yes would probably be safer ? It is only one instruction more, would 
> likely be unnoticeable.

Yeah "regshere" has definitely saved me some time over the years
starting at memory dumps.

I'd settle for 0xffffffff + "regs".

cheers


More information about the Linuxppc-dev mailing list