Skip to content
Snippets Groups Projects
Commit 3ae9d01e authored by Torbjörn SVENSSON's avatar Torbjörn SVENSSON
Browse files

testsuite: arm: Use effective-target for bti* and pac* tests


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: default avatarTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Co-authored-by: default avatarYvan ROUX <yvan.roux@foss.st.com>
parent cf261dd5
No related branches found
No related tags found
No related merge requests found
Showing
with 39 additions and 17 deletions
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do run } */ /* { 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 mbranch_protection_ok } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { 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" #include "pac.h"
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
/* { dg-require-effective-target mbranch_protection_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" #include "pac.h"
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
/* { dg-require-effective-target mbranch_protection_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" #include "pac.h"
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { dg-require-effective-target arm_pacbti_hw } */
/* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */ /* { 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" #include "pac.h"
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { dg-require-effective-target arm_pacbti_hw } */
/* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */ /* { 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" #include "pac.h"
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { dg-require-effective-target arm_pacbti_hw } */
/* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */ /* { 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" #include "pac.h"
/* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register. */ /* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
/* { dg-require-effective-target mbranch_protection_ok } */ /* { dg-require-effective-target mbranch_protection_ok } */
/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */ /* { dg-options "-mcpu=unset -march=armv8.1-m.main+mve+pacbti -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard -fasynchronous-unwind-tables -g -O0" } */
/* { dg-options "-march=armv8.1-m.main+mve+pacbti -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard -fasynchronous-unwind-tables -g -O0" } */
#include "stdio.h" #include "stdio.h"
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do run } */ /* { 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 mbranch_protection_ok } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { 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" #include "pac.h"
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do run } */ /* { 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 mbranch_protection_ok } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { 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" #include "pac.h"
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
/* { dg-require-effective-target mbranch_protection_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" #include "pac.h"
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do run } */ /* { 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 mbranch_protection_ok } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { 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> #include <stdlib.h>
......
/* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register. */ /* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */
/* { dg-require-effective-target mbranch_protection_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; int i;
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do run } */ /* { 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 mbranch_protection_ok } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { 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> #include <stdlib.h>
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do run } */ /* { 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 mbranch_protection_ok } */
/* { dg-require-effective-target arm_pacbti_hw } */ /* { 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 <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
......
/* Testing return address signing. */ /* Testing return address signing. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_ok } */
/* { dg-require-effective-target mbranch_protection_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" #include "pac.h"
......
...@@ -6114,7 +6114,7 @@ proc check_effective_target_arm_pacbti_hw {} { ...@@ -6114,7 +6114,7 @@ proc check_effective_target_arm_pacbti_hw {} {
asm ("autg r12, lr, sp"); asm ("autg r12, lr, sp");
asm ("bx lr"); 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. # Return 1 if this compilation turns on string_ops_prefer_neon on.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment