From: Jeff Law <jlaw@ventanamicro.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [committed] RISC-V: Make stack_save_restore tests more robust
Date: Fri, 25 Aug 2023 16:36:22 -0600 [thread overview]
Message-ID: <10382874-cea3-93d3-de15-bc3b7383cd61@ventanamicro.com> (raw)
[-- 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()
next reply other threads:[~2023-08-25 22:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 22:36 Jeff Law [this message]
2023-10-27 17:34 ` Patrick O'Neill
2023-10-27 17:42 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10382874-cea3-93d3-de15-bc3b7383cd61@ventanamicro.com \
--to=jlaw@ventanamicro.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).