On 28/04/2022 10:45, Andrea Corallo via Gcc-patches wrote:
This patch emits assembler directives for PACBTI build attributes as
defined by the
ABI.

<https://github.com/ARM-software/abi-aa/releases/download/2021Q1/addenda32.pdf>

gcc/ChangeLog:

        * config/arm/arm.c (arm_file_start): Emit EABI attributes for
        Tag_PAC_extension, Tag_BTI_extension, TAG_BTI_use, TAG_PACRET_use.

This bit is OK.


gcc/testsuite/ChangeLog:

        * gcc.target/arm/acle/pacbti-m-predef-1.c: New test.
        * gcc.target/arm/acle/pacbti-m-predef-3: Likewise.
        * gcc.target/arm/acle/pacbti-m-predef-6.c: Likewise.
        * gcc.target/arm/acle/pacbti-m-predef-7.c: Likewise.

These tests contain directives like:

+/* { dg-additional-options " -mbranch-protection=pac-ret+bti --save-temps" } */

But they don't check that the architecture permits this (it has to be armv8-m.main or later).


Co-Authored-By: Tejas Belagod  <tbela...@arm.com>


R.

Reply via email to