[PATCH v4 08/11] s390: Store SFrame CFA offset adjusted
Indu Bhagat
indu.bhagat@oracle.com
Thu Jul 10 17:09:32 GMT 2025
On 7/10/25 5:07 AM, Jens Remus wrote:
> Hello Indu,
>
> one final (tm) question for change (see also below), before I commit the
> series to mainline for 2.45 (provided Nick confirms that your and
> Andreas' approval is sufficient):
>
> Ok to remove the infix "FRE" from
> SFRAME_V2_FRE_S390X_CFA_OFFSET_{ENCODE|DECODE}?
>
OK.
>> diff --git a/include/sframe.h b/include/sframe.h
>> index 28b625b3258f..db137393532e 100644
>> --- a/include/sframe.h
>> +++ b/include/sframe.h
>> @@ -376,6 +376,14 @@ typedef struct sframe_frame_row_entry_addr4
>> #define SFRAME_FRE_TYPE_ADDR4_LIMIT \
>> (1ULL << ((SFRAME_FRE_TYPE_ADDR4 * 2) * 8))
>>
>> +/* On s390x, the CFA offset from CFA base register is by definition a minimum
>> + of 160. Store it adjusted by -160 to enable use of 8-bit SFrame offsets. */
>> +#define SFRAME_S390X_CFA_OFFSET_ADJUSTMENT SFRAME_S390X_SP_VAL_OFFSET
>> +#define SFRAME_V2_FRE_S390X_CFA_OFFSET_ENCODE(offset) \
>> + ((offset) + SFRAME_S390X_CFA_OFFSET_ADJUSTMENT)
>> +#define SFRAME_V2_FRE_S390X_CFA_OFFSET_DECODE(offset) \
>> + ((offset) - SFRAME_S390X_CFA_OFFSET_ADJUSTMENT)
>> +
>
> Ok to remove the infix "FRE" from the above (and all references in this
> patch)? This would align better with the following and shorten their
> names:
>
> SFRAME_V2_S390X_CFA_OFFSET_ENCODE(offset)
> SFRAME_V2_S390X_CFA_OFFSET_DECODE(offset)
>
> SFRAME_V2_S390X_OFFSET_IS_REGNUM(offset)
> SFRAME_V2_S390X_OFFSET_ENCODE_REGNUM(regnum)
> SFRAME_V2_S390X_OFFSET_DECODE_REGNUM(offset)
>
Makes sense.
Thanks
More information about the Binutils
mailing list