or1k: Fix struct return test
PATCH 1/1 or1k: Fix struct return test
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
gcc/testsuite/gcc.target/or1k/return-2.c +1 -1
@@ -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 } } */
Signature · 1 line
2.49.0
Quoted 10 lines · Stafford Horne
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.
Given you're the maintainer of this port it seems like you can self-approve and commit this and the long jump offset patch.
Jeff
Quoted 8 lines · Jeff Law
Quoted 5 lines · Stafford Horne
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.
Quoted 7 lines
Quoted 5 lines
Adjust the test to match what GCC is producing now.
gcc/testsuite/ChangeLog:
*
gcc.target/or1k/return-2.c: Fix test.Given you're the maintainer of this port it seems like you can self-approve and commit this and the long jump offset patch.
Hi Jeff,
Thanks for checking, I usually just like to send out patches to give myself a bit of a cooling off period and allow anyone to spot obvious issues.
I have pushed these now.
-Stafford