RISC-V: Make stack_save_restore tests more robust

Spurred by Jivan's patch and a desire for cleaner testresults, I went ahead and
make the stack_save_restore tests independent of the precise stack size by
using a regexp.

gcc/testsuite/
	* gcc.target/riscv/stack_save_restore_1.c: Robustify.
	* gcc.target/riscv/stack_save_restore_2.c: Robustify.
This commit is contained in:
Jeff Law 2023-08-25 16:34:17 -06:00
parent 3cd2b73079
commit e1f096a3cc
2 changed files with 8 additions and 8 deletions

View File

@ -8,15 +8,15 @@ float getf();
/*
** bar:
** call t0,__riscv_save_(3|4)
** addi sp,sp,-2032
** addi sp,sp,-[0-9]+
** ...
** li t0,-12288
** li t0,-[0-9]+
** add sp,sp,t0
** ...
** li t0,12288
** li t0,[0-9]+
** add sp,sp,t0
** ...
** addi sp,sp,2032
** addi sp,sp,[0-9]+
** tail __riscv_restore_(3|4)
*/
int bar()

View File

@ -8,15 +8,15 @@ float getf();
/*
** bar:
** call t0,__riscv_save_(3|4)
** addi sp,sp,-2032
** addi sp,sp,-[0-9]+
** ...
** li t0,-12288
** li t0,-[0-9]+
** add sp,sp,t0
** ...
** li t0,12288
** li t0,[0-9]+
** add sp,sp,t0
** ...
** addi sp,sp,2032
** addi sp,sp,[0-9]+
** tail __riscv_restore_(3|4)
*/
int bar()