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

Christophe Leroy christophe.leroy at csgroup.eu
Fri Sep 23 17:35:32 AEST 2022



Le 23/09/2022 à 09:32, Michael Ellerman a écrit :
> 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".

That's not a sign-extended 32 bits value ....


More information about the Linuxppc-dev mailing list