[PATCH 2/4] gas: sframe: i386: have the backend specify the RA too

Jan Beulich jbeulich@suse.com
Mon May 19 13:01:54 GMT 2025


On 19.05.2025 14:27, Jens Remus wrote:
> On 15.05.2025 19:55, Indu Bhagat wrote:
>> Okay. I have changed this to use const variables on x86 backend.
> 
> Sorry, a bit late, v2 of this patch has already been committed.  Turns
> out using a const does not allow to use SFRAME_CFA_RA_REG as an lvalue
> in a condition, that cannot occur on x86-64.  Instead I would need to
> guard the following with TC_S390:
> 
> /* On S390, restore the default tracked RA register.  */
> if (sframe_get_abi_arch () == SFRAME_ABI_S390_ENDIAN_BIG)
>   SFRAME_CFA_RA_REG = saved_cfa_ra_reg;
> 
> You could therefore do the following on x86-64 (and similar on AArch64),
> if you prefer:
> 
> #define SFRAME_CFA_SP_REG REG_SP
> #define SFRAME_CFA_FP_REG REG_FP
> #define SFRAME_CFA_RA_REG REG_RA

Right, and I'll probably do that at some point (unless Indu would).

Jan


More information about the Binutils mailing list