* [PATCH] or1k: Fix struct return test
@ 2025-05-31 6:03 Stafford Horne
2025-06-02 3:17 ` Jeff Law
0 siblings, 1 reply; 3+ messages in thread
From: Stafford Horne @ 2025-05-31 6:03 UTC (permalink / raw)
To: GCC patches; +Cc: Linux OpenRISC, 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.
---
gcc/testsuite/gcc.target/or1k/return-2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/or1k/return-2.c b/gcc/testsuite/gcc.target/or1k/return-2.c
index add3720c88e..c072ae23142 100644
--- a/gcc/testsuite/gcc.target/or1k/return-2.c
+++ b/gcc/testsuite/gcc.target/or1k/return-2.c
@@ -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 } } */
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] or1k: Fix struct return test
2025-05-31 6:03 [PATCH] or1k: Fix struct return test Stafford Horne
@ 2025-06-02 3:17 ` Jeff Law
2025-06-02 10:06 ` Stafford Horne
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2025-06-02 3:17 UTC (permalink / raw)
To: Stafford Horne, GCC patches; +Cc: Linux OpenRISC
On 5/31/25 12:03 AM, Stafford Horne wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] or1k: Fix struct return test
2025-06-02 3:17 ` Jeff Law
@ 2025-06-02 10:06 ` Stafford Horne
0 siblings, 0 replies; 3+ messages in thread
From: Stafford Horne @ 2025-06-02 10:06 UTC (permalink / raw)
To: Jeff Law; +Cc: GCC patches, Linux OpenRISC
On Sun, Jun 01, 2025 at 09:17:45PM -0600, Jeff Law wrote:
>
>
> On 5/31/25 12:03 AM, Stafford Horne wrote:
> > 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.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-02 10:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-31 6:03 [PATCH] or1k: Fix struct return test Stafford Horne
2025-06-02 3:17 ` Jeff Law
2025-06-02 10:06 ` Stafford Horne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).