]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: arm: Use effective-target for bti* and pac* tests
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Sun, 13 Oct 2024 09:58:07 +0000 (11:58 +0200)
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Thu, 21 Nov 2024 06:45:50 +0000 (07:45 +0100)
Update test cases to use -mcpu=unset/-march=unset feature introduced in
r15-3606-g7d6c6a0d15c.

gcc/testsuite/ChangeLog:

* gcc.target/arm/pac-1.c: Use effective-target
arm_arch_v8_1m_main_pacbti.
* gcc.target/arm/pac-2.c: Likewise.
* gcc.target/arm/pac-3.c: Likewise.
* gcc.target/arm/pac-4.c: Likewise.
* gcc.target/arm/pac-5.c: Likewise.
* gcc.target/arm/pac-7.c: Likewise.
* gcc.target/arm/pac-8.c: Likewise.
* gcc.target/arm/pac-9.c: Likewise.
* gcc.target/arm/pac-10.c: Likewise.
* gcc.target/arm/pac-11.c: Likewise.
* gcc.target/arm/pac-12.c: Added option "-mcpu=unset".
* gcc.target/arm/pac-13.c: Likewise.
* gcc.target/arm/pac-14.c: Likewise.
* lib/target-supports.exp
(check_effective_target_arm_pacbti_hw): Likewise.
* gcc.target/arm/pac-6.c: Use effective-target
arm_arch_v8_1m_main.
* gcc.target/arm/pac-15.c: Use effective-target
arm_arch_v8_1m_main_pacbti and added option "-mcpu=unset".

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Co-authored-by: Yvan ROUX <yvan.roux@foss.st.com>
16 files changed:
gcc/testsuite/gcc.target/arm/pac-1.c
gcc/testsuite/gcc.target/arm/pac-10.c
gcc/testsuite/gcc.target/arm/pac-11.c
gcc/testsuite/gcc.target/arm/pac-12.c
gcc/testsuite/gcc.target/arm/pac-13.c
gcc/testsuite/gcc.target/arm/pac-14.c
gcc/testsuite/gcc.target/arm/pac-15.c
gcc/testsuite/gcc.target/arm/pac-2.c
gcc/testsuite/gcc.target/arm/pac-3.c
gcc/testsuite/gcc.target/arm/pac-4.c
gcc/testsuite/gcc.target/arm/pac-5.c
gcc/testsuite/gcc.target/arm/pac-6.c
gcc/testsuite/gcc.target/arm/pac-7.c
gcc/testsuite/gcc.target/arm/pac-8.c
gcc/testsuite/gcc.target/arm/pac-9.c
gcc/testsuite/lib/target-supports.exp

index e0eea0858e0384988ce93a07a1bf6dcbe7312ecc..a2bec3552148672802d28ef7dc478e4aa39179db 100644 (file)
@@ -1,8 +1,10 @@
 /* Testing return address signing.  */
 /* { dg-do run } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_link } */
 /* { dg-require-effective-target mbranch_protection_ok } */
 /* { dg-require-effective-target arm_pacbti_hw } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-options "-mbranch-protection=pac-ret+leaf -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include "pac.h"
 
index 6da8434aeaf0476d1b4d939772b80e84dfbacec0..0882dad74069f2464d751187eedf39dd8c67efc5 100644 (file)
@@ -1,7 +1,9 @@
 /* Testing return address signing.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
 /* { dg-require-effective-target mbranch_protection_ok } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-options "-mbranch-protection=pac-ret -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include "pac.h"
 
index 0bb727c2c800182ad7a47e01aa6f78ef4d6ae427..32685a726b71c5d1c6f54bfbfa5977dcd33ec2a6 100644 (file)
@@ -1,7 +1,9 @@
 /* Testing return address signing.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
 /* { dg-require-effective-target mbranch_protection_ok } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=bti+pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O2" } */
+/* { dg-options "-mbranch-protection=bti+pac-ret+leaf -mfloat-abi=hard --save-temps -O2" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include "pac.h"
 
index 6e1295c834d02835f4fcf214294d5aa5f6cf92e0..37bf0047c2ec3c27fb2ec8fd9d7ee91cd7b90a5f 100644 (file)
@@ -2,6 +2,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target arm_pacbti_hw } */
 /* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-march=armv8.1-m.main+dsp+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */
+/* { dg-options "-mcpu=unset -march=armv8.1-m.main+dsp+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */
 
 #include "pac.h"
index faf836b2026607a707e9eac1c64680f0914b2938..971e67effa1deb0d345f2a709cfd0ac55fd27f16 100644 (file)
@@ -2,6 +2,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target arm_pacbti_hw } */
 /* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-march=armv8.1-m.main+mve.fp+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */
+/* { dg-options "-mcpu=unset -march=armv8.1-m.main+mve.fp+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */
 
 #include "pac.h"
index 51609b61c75b9712ce0344df78b3a9f7c8bc9d53..1b2caed09a043a6ef42d047343a0c355abd73cab 100644 (file)
@@ -2,6 +2,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target arm_pacbti_hw } */
 /* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */
-/* { dg-options "-march=armv8.1-m.main+mve+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */
+/* { dg-options "-mcpu=unset -march=armv8.1-m.main+mve+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */
 
 #include "pac.h"
index 979941492d3bb3e1d4c91b5c682e062213281177..788c4062c76493f03ef0e6e381c75b1e4e57a8a9 100644 (file)
@@ -1,8 +1,8 @@
 /* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
 /* { dg-require-effective-target mbranch_protection_ok } */
-/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */
-/* { dg-options "-march=armv8.1-m.main+mve+pacbti -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard -fasynchronous-unwind-tables -g -O0" } */
+/* { dg-options "-mcpu=unset -march=armv8.1-m.main+mve+pacbti -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard -fasynchronous-unwind-tables -g -O0" } */
 
 #include "stdio.h"
 
index 5eb1062043c593596e20be85c454c0564137318e..6a4f84e766c1ffc3bdf5b280320ae749c9808554 100644 (file)
@@ -1,8 +1,10 @@
 /* Testing return address signing.  */
 /* { dg-do run } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_link } */
 /* { dg-require-effective-target mbranch_protection_ok } */
 /* { dg-require-effective-target arm_pacbti_hw } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-options "-mbranch-protection=pac-ret -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include "pac.h"
 
index 50453dd8ec40641b62e5bae5b8da3c3c7e578302..82a1d73258f350d1f934ca9b332912f650689ca5 100644 (file)
@@ -1,8 +1,10 @@
 /* Testing return address signing.  */
 /* { dg-do run } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_link } */
 /* { dg-require-effective-target mbranch_protection_ok } */
 /* { dg-require-effective-target arm_pacbti_hw } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=bti+pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O2" } */
+/* { dg-options "-mbranch-protection=bti+pac-ret+leaf -mfloat-abi=hard --save-temps -O2" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include "pac.h"
 
index 81907079d77f799f5a32186daaf766d1d4da5548..3998ae7637ffec1c2ecad0b9a1acbbfb8b08825d 100644 (file)
@@ -1,7 +1,9 @@
 /* Testing return address signing.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
 /* { dg-require-effective-target mbranch_protection_ok } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mthumb -mfloat-abi=hard --save-temps -O2" } */
+/* { dg-options "-mfloat-abi=hard --save-temps -O2" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include "pac.h"
 
index c70087eb6b65fb2b8df8261711b0b5836bea4079..98e298dfe39f2018ff9912a899d7d6cd441f0fd8 100644 (file)
@@ -1,8 +1,10 @@
 /* Testing return address signing.  */
 /* { dg-do run } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_link } */
 /* { dg-require-effective-target mbranch_protection_ok } */
 /* { dg-require-effective-target arm_pacbti_hw } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-options "-mbranch-protection=pac-ret+leaf -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include <stdlib.h>
 
index a8e3067f825a91dfd0ef1841e76d6f10da927020..2335aeee6a017902eb08148ed4ee4dcf3ce0d548 100644 (file)
@@ -1,7 +1,9 @@
 /* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */
 /* { dg-require-effective-target mbranch_protection_ok } */
-/* { dg-options "-march=armv8.1-m.main+fp -mbranch-protection=pac-ret+leaf -mthumb --save-temps -O0 -g" } */
+/* { dg-options "-mbranch-protection=pac-ret+leaf --save-temps -O0 -g" } */
+/* { dg-add-options arm_arch_v8_1m_main } */
 
 int i;
 
index 6b4ad1450ce546a13a248278178e8efe3f49ac7d..dfffa78777f24b427fdbd469b585f2ffc59eb525 100644 (file)
@@ -1,8 +1,10 @@
 /* Testing return address signing.  */
 /* { dg-do run } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_link } */
 /* { dg-require-effective-target mbranch_protection_ok } */
 /* { dg-require-effective-target arm_pacbti_hw } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-options "-mbranch-protection=pac-ret+leaf -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include <stdlib.h>
 
index 84208bfda4f8212941193c30536903be372ed658..c1b418dd582b73eed24054f255887932757d7f33 100644 (file)
@@ -1,8 +1,10 @@
 /* Testing return address signing.  */
 /* { dg-do run } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_link } */
 /* { dg-require-effective-target mbranch_protection_ok } */
 /* { dg-require-effective-target arm_pacbti_hw } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-options "-mbranch-protection=pac-ret+leaf -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include <stdarg.h>
 #include <stdlib.h>
index 588b7ffb8d20d4294fea2e76ab50598475cb47a3..afbddcd7d5f9a12a881ca2e615957e30d2b8cbe7 100644 (file)
@@ -1,7 +1,9 @@
 /* Testing return address signing.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
 /* { dg-require-effective-target mbranch_protection_ok } */
-/* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-options "-mbranch-protection=pac-ret+leaf -mfloat-abi=hard --save-temps -O0" } */
+/* { dg-add-options arm_arch_v8_1m_main_pacbti } */
 
 #include "pac.h"
 
index f6dc24ca3d54927a24c8e3006b58a45877c0ce33..d5ed2808fabcd9c4644760c7453674ee8dc491ab 100644 (file)
@@ -6114,7 +6114,7 @@ proc check_effective_target_arm_pacbti_hw {} {
          asm ("autg r12, lr, sp");
          asm ("bx lr");
        }
-    } "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=standard -mthumb -mfloat-abi=hard"]
+    } "-mcpu=unset -march=armv8.1-m.main+pacbti+fp -mbranch-protection=standard -mthumb -mfloat-abi=hard"]
 }
 
 # Return 1 if this compilation turns on string_ops_prefer_neon on.