[RFC,V2 2/5] gas: aarch64: suppport CFI directive .cfi_mte_tagged_frame
Indu Bhagat
indu.bhagat@oracle.com
Fri Apr 11 23:59:44 GMT 2025
On 4/11/25 2:49 AM, Richard Sandiford wrote:
> Indu Bhagat <indu.bhagat@oracle.com> writes:
>> Process a new aarch64-specific CFI directive: .cfi_mte_tagged_frame
>> (LLVM uses this CFI directive already). The CFI directive, when present
>> for a function, indicates that the stack frame for the function may
>> modify the MTE tags of the stack space it uses. The assembler emits
>> char 'G' in the CIE augmentation string to indicate the same.
>>
>> TBD:
>> - Whats that comment style in c-aarch64.texi ?
>
> I think it's just alphabetical. The new entry would then go under:
>
> @c CCCCCCCCCCCCCCCCCCCCCCCCCC
>
> and before:
>
> @cindex @code{.cpu} directive, AArch64
>
>
OK.
>> /* Extra equivalence checks required by AArch64 when selecting the correct cie
>> for some fde. Currently only used to check for quivalence between keys used
>> to sign ther return address. */
>> -#define tc_cie_fde_equivalent_extra(cie, fde) (cie->pauth_key == fde->pauth_key)
>> +#define tc_cie_fde_equivalent_extra(cie, fde) ((cie->pauth_key == fde->pauth_key) \
>> + && (cie->memtag_frame_p = fde->memtag_frame_p))
>
> Should be == rather than =.
>
> It would be good to extend the testcase so that it would have caught this.
>
Swapping the order of the two functions in the testcase (with the first
without .cfi_mte_tagged_frame and the second with .cfi_mte_tagged_frame)
was enough to help catch this.
I have amended the current testcase now.
Thanks!
> Otherwise it looks good to me.
>
> Thanks,
> Richard
More information about the Binutils
mailing list