]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Make stack_save_restore_2 more robust
authorPatrick O'Neill <patrick@rivosinc.com>
Fri, 27 Oct 2023 17:50:28 +0000 (10:50 -0700)
committerPatrick O'Neill <patrick@rivosinc.com>
Fri, 27 Oct 2023 18:13:56 +0000 (11:13 -0700)
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>
gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c

index 4c549cb11aee336d64239c9d3004b9cfdd3e393c..5f0389243b1fafb3127f79fdfa0d69bdc2fe0ff2 100644 (file)
@@ -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()
 {