]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
or1k: Fix struct return test
authorStafford Horne <shorne@gmail.com>
Sat, 31 May 2025 05:54:58 +0000 (06:54 +0100)
committerStafford Horne <shorne@gmail.com>
Mon, 2 Jun 2025 10:05:06 +0000 (11:05 +0100)
In or1k structs are returned from functions using the memory address
passed in r3.  In the current version of GCC the struct stores changed
from r11 (the return value) to r3 the incoming memory address.  Both of
are valid.

Adjust the test to match what GCC is producing now.

gcc/testsuite/ChangeLog:

* gcc.target/or1k/return-2.c: Fix test.

gcc/testsuite/gcc.target/or1k/return-2.c

index add3720c88e470e6d15dcde9b8c2a1f04f621ee5..c072ae2314237bb99207c31d24f30d682ed8d19a 100644 (file)
@@ -16,4 +16,4 @@ struct a getstruct (long aa) {
 /* Ensure our return value is returned on stack.  */
 /* { dg-final { scan-assembler-not "r12," } } */
 /* { dg-final { scan-assembler "l.or\\s+r11, r3, r3" } } */
-/* { dg-final { scan-assembler-times "l.sw\\s+\\d+.r11.," 3 } } */
+/* { dg-final { scan-assembler-times "l.sw\\s+\\d+.r3.," 3 } } */