Message ID | AM5PR0801MB184459FF8D4A79457927F919EAB29@AM5PR0801MB1844.eurprd08.prod.outlook.com |
---|---|
State | New |
Headers | show |
Series | [1/7,Arm] Add Armv8.1-M Mainline target feature +pacbti. | expand |
On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: > Hi, > > Add targeting-checking entities for PACBTI in testsuite > framework. > > Tested on arm-none-eabi. OK for trunk? > > 2021-10-04 Tejas Belagod <tbelagod@arm.com> > > gcc/ChangeLog: > > * testsuite/lib/target-supports.exp > (check_effective_target_arm_pacbti_hw): New. > OK. R.
On 11/10/2021 14:36, Richard Earnshaw via Gcc-patches wrote: > On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: >> Hi, >> >> Add targeting-checking entities for PACBTI in testsuite >> framework. >> >> Tested on arm-none-eabi. OK for trunk? >> >> 2021-10-04 Tejas Belagod <tbelagod@arm.com> >> >> gcc/ChangeLog: >> >> * testsuite/lib/target-supports.exp >> (check_effective_target_arm_pacbti_hw): New. >> > > OK. > > R. Oh, wait! Not OK. Needs documentation in sourcebuild.texi. R.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 9ebca7ac007363d2a35158bb80092118f629b97b..323541c2da527e3da5dce4d85cadcb2068d9bb5c 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5064,6 +5064,22 @@ proc check_effective_target_arm_cmse_clear_ok {} { } "-mcmse"]; } +# Return 1 if the target supports executing PACBTI instructions, 0 +# otherwise. + +proc check_effective_target_arm_pacbti_hw {} { + return [check_runtime arm_pacbti_hw_available { + __attribute__ ((naked)) int + main (void) + { + asm ("pac r12, lr, sp"); + asm ("mov r0, #0"); + asm ("autg r12, lr, sp"); + asm ("bx lr"); + } + } ""] +} + # Return 1 if this compilation turns on string_ops_prefer_neon on. proc check_effective_target_arm_tune_string_ops_prefer_neon { } {