public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] RISC-V: Make stack_save_restore tests more robust
@ 2023-08-25 22:36 Jeff Law
  2023-10-27 17:34 ` Patrick O'Neill
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2023-08-25 22:36 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

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.

Pushed to the trunk.

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1758 bytes --]

commit e1f096a3cc96c71907cfbc7b8baf67a3d863cb6d
Author: Jeff Law <jlaw@ventanamicro.com>
Date:   Fri Aug 25 16:34:17 2023 -0600

    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.

diff --git a/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c b/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c
index 255ce5f40c9..d8b0668a820 100644
--- a/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c
+++ b/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c
@@ -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()
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 4ce5e0118a4..4c549cb11ae 100644
--- a/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c
+++ b/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c
@@ -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()

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-27 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 22:36 [committed] RISC-V: Make stack_save_restore tests more robust Jeff Law
2023-10-27 17:34 ` Patrick O'Neill
2023-10-27 17:42   ` Jeff Law

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).