* [PATCH] RISC-V: Make stack_save_restore_2 more robust
@ 2023-10-27 17:56 Patrick O'Neill
2023-10-27 18:02 ` Jeff Law
0 siblings, 1 reply; 3+ messages in thread
From: Patrick O'Neill @ 2023-10-27 17:56 UTC (permalink / raw)
To: gcc-patches; +Cc: jeffreyalaw, Patrick O'Neill
GCC recently changed to emit __riscv_restore_5 which causes this
testcase to fail.
This patch updates the regex to be more robust to change by accepting
any number after __riscv_save_ and __riscv_restore_.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/stack_save_restore_2.c: Accept any number
after __riscv_save_ and __riscv_restore_.
Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
---
Tested using glibc rv64gc on r14-4980-g2672c60917d.
---
gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c b/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c
index 4c549cb11ae..5f0389243b1 100644
--- a/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c
+++ b/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c
@@ -7,7 +7,7 @@ float getf();
/*
** bar:
-** call t0,__riscv_save_(3|4)
+** call t0,__riscv_save_[0-9]+
** addi sp,sp,-[0-9]+
** ...
** li t0,-[0-9]+
@@ -17,7 +17,7 @@ float getf();
** add sp,sp,t0
** ...
** addi sp,sp,[0-9]+
-** tail __riscv_restore_(3|4)
+** tail __riscv_restore_[0-9]+
*/
int bar()
{
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RISC-V: Make stack_save_restore_2 more robust
2023-10-27 17:56 [PATCH] RISC-V: Make stack_save_restore_2 more robust Patrick O'Neill
@ 2023-10-27 18:02 ` Jeff Law
2023-10-27 18:14 ` Patrick O'Neill
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2023-10-27 18:02 UTC (permalink / raw)
To: Patrick O'Neill, gcc-patches
On 10/27/23 11:56, Patrick O'Neill wrote:
> GCC recently changed to emit __riscv_restore_5 which causes this
> testcase to fail.
> This patch updates the regex to be more robust to change by accepting
> any number after __riscv_save_ and __riscv_restore_.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/riscv/stack_save_restore_2.c: Accept any number
> after __riscv_save_ and __riscv_restore_.
OK
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RISC-V: Make stack_save_restore_2 more robust
2023-10-27 18:02 ` Jeff Law
@ 2023-10-27 18:14 ` Patrick O'Neill
0 siblings, 0 replies; 3+ messages in thread
From: Patrick O'Neill @ 2023-10-27 18:14 UTC (permalink / raw)
To: Jeff Law, gcc-patches
On 10/27/23 11:02, Jeff Law wrote:
>
>
> On 10/27/23 11:56, Patrick O'Neill wrote:
>> GCC recently changed to emit __riscv_restore_5 which causes this
>> testcase to fail.
>> This patch updates the regex to be more robust to change by accepting
>> any number after __riscv_save_ and __riscv_restore_.
>>
>> gcc/testsuite/ChangeLog:
>>
>> * gcc.target/riscv/stack_save_restore_2.c: Accept any number
>> after __riscv_save_ and __riscv_restore_.
> OK
> jeff
Committed
Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-27 18:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-27 17:56 [PATCH] RISC-V: Make stack_save_restore_2 more robust Patrick O'Neill
2023-10-27 18:02 ` Jeff Law
2023-10-27 18:14 ` Patrick O'Neill
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 read-only IMAP folder(s) and NNTP newsgroup(s).