@@ -223,6 +223,10 @@ define feature cdecp5
define feature cdecp6
define feature cdecp7
+# M-profile control flow integrity extensions (PAC/AUT/BTI).
+# Optional from Armv8.1-M Mainline.
+define feature pacbti
+
# Feature groups. Conventionally all (or mostly) upper case.
# ALL_FPU lists all the feature bits associated with the floating-point
# unit; these will all be removed if the floating-point unit is disabled
@@ -741,6 +745,7 @@ begin arch armv8.1-m.main
option nofp remove ALL_FP
option mve add MVE
option mve.fp add MVE_FP
+ option pacbti add pacbti
option cdecp0 add cdecp0
option cdecp1 add cdecp1
option cdecp2 add cdecp2
@@ -335,6 +335,12 @@ emission of floating point pcs attributes. */
isa_bit_mve_float) \
&& !TARGET_GENERAL_REGS_ONLY)
+/* Non-zero if this target supports Armv8.1-M Mainline pointer-signing
+ extension. */
+#define TARGET_HAVE_PACBTI (arm_arch8_1m_main \
+ && bitmap_bit_p (arm_active_target.isa, \
+ isa_bit_pacbti))
+
/* MVE have few common instructions as VFP, like VLDM alias VPOP, VLDR, VSTM
alia VPUSH, VSTR and VMOV, VMSR and VMRS. In the same manner it updates few
registers such as FPCAR, FPCCR, FPDSCR, FPSCR, MVFR0, MVFR1 and MVFR2. All