diff mbox series

[pushed] aarch64: Skip some SME register save tests on BE

Message ID mptsf49kf5l.fsf@arm.com
State New
Headers show
Series [pushed] aarch64: Skip some SME register save tests on BE | expand

Commit Message

Richard Sandiford Dec. 10, 2023, 7:53 p.m. UTC
Big-endian targets need to save Z8-Z15 in the same order as
the registers would appear for D8-D15, because the layout is
mandated by the EH ABI.  BE targets therefore use ST1D instead
of the normal STR for those registers (but not for others).

That difference is already tested elsewhere and isn't important
for the SME tests.  This patch therefore restricts the affected
tests to LE.

Tested on aarch64-linux-gnu and aarch64_be-elf, pushed to trunk.

Richard


gcc/testsuite/
	* gcc.target/aarch64/sme/call_sm_switch_5.c: Restrict tests that
	contain Z8-Z23 saves to little-endian.
	* gcc.target/aarch64/sme/call_sm_switch_8.c: Likewise.
	* gcc.target/aarch64/sme/locally_streaming_1.c: Likewise.
---
 gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c    | 6 +++---
 gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c    | 6 +++---
 gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c
index e3d9bc274d8..6238ab80da2 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c
@@ -14,7 +14,7 @@  struct callbacks {
 };
 
 /*
-** n_caller:	{ target lp64 }
+** n_caller:	{ target { lp64 && aarch64_little_endian } }
 **	stp	x30, (x19|x2[0-8]), \[sp, #?-32\]!
 **	cntd	x16
 **	str	x16, \[sp, #?16\]
@@ -114,7 +114,7 @@  n_caller (struct callbacks *c)
 }
 
 /*
-** s_caller:	{ target lp64 }
+** s_caller:	{ target { lp64 && aarch64_little_endian } }
 **	stp	x30, (x19|x2[0-8]), \[sp, #?-32\]!
 **	cntd	x16
 **	str	x16, \[sp, #?16\]
@@ -214,7 +214,7 @@  s_caller (struct callbacks *c) [[arm::streaming]]
 }
 
 /*
-** sc_caller:
+** sc_caller:	{ target aarch64_little_endian }
 **	stp	x29, x30, \[sp, #?-32\]!
 **	mov	x29, sp
 **	cntd	x16
diff --git a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c
index f44724df32f..c909b34ff5e 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c
@@ -7,7 +7,7 @@  svint8_t produce_z0 ();
 void consume_z0 (svint8_t);
 
 /*
-** test_z0:
+** test_z0:	{ target aarch64_little_endian }
 **	...
 **	smstop	sm
 **	bl	produce_z0
@@ -32,7 +32,7 @@  svint8x4_t produce_z3 ();
 void consume_z3 (svint8x4_t);
 
 /*
-** test_z3:
+** test_z3:	{ target aarch64_little_endian }
 **	...
 **	smstop	sm
 **	bl	produce_z3
@@ -61,7 +61,7 @@  svbool_t produce_p0 ();
 void consume_p0 (svbool_t);
 
 /*
-** test_p0:
+** test_p0:	{ target aarch64_little_endian }
 **	...
 **	smstop	sm
 **	bl	produce_p0
diff --git a/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c b/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c
index 20ff4b87d94..4bb637f4781 100644
--- a/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c
@@ -265,7 +265,7 @@  n_ls_vector_pcs ()
 }
 
 /*
-** n_ls_sve_pcs:
+** n_ls_sve_pcs:	{ target aarch64_little_endian }
 **	sub	sp, sp, #?16
 **	cntd	x16
 **	str	x16, \[sp\]