public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V] add TC for save-restore cfi directives.
@ 2023-06-12 14:25 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-06-12 14:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9bdfdbd38ca2695a2fe7267eb24b128e79d1abf1

commit 9bdfdbd38ca2695a2fe7267eb24b128e79d1abf1
Author: Fei Gao <gaofei@eswincomputing.com>
Date:   Mon Jun 5 20:14:33 2023 -0600

    RISC-V] add TC for save-restore cfi directives.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/riscv/save-restore-cfi.c: New test to check save-restore
            cfi directives.

Diff:
---
 gcc/testsuite/gcc.target/riscv/save-restore-cfi.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-cfi.c b/gcc/testsuite/gcc.target/riscv/save-restore-cfi.c
new file mode 100644
index 00000000000..a39f3060981
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-cfi.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-g -Os -march=rv32imafc -mabi=ilp32f -msave-restore -mcmodel=medlow" } */
+/* { dg-skip-if "" { *-*-* } {"-O2" "-O1" "-O0" "-Og" "-O3" "-Oz" "-flto"} } */
+/* { dg-final { scan-assembler-times {\.cfi_def_cfa_offset 16} 2} } */
+/* { dg-final { scan-assembler-times {\.cfi_def_cfa_offset 32} 1} } */
+/* { dg-final { scan-assembler-times {\.cfi_def_cfa_offset 0} 1} } */
+
+char my_getchar();
+float getf();
+
+int foo()
+{
+  int s0 = my_getchar();
+  float f0 = getf();
+  int b = my_getchar();
+  return f0 + s0 + b;
+}

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

* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V] add TC for save-restore cfi directives.
@ 2023-07-14  2:43 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-07-14  2:43 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:657d060d38c9a1b1f0024ba1410c396a32dfd611

commit 657d060d38c9a1b1f0024ba1410c396a32dfd611
Author: Fei Gao <gaofei@eswincomputing.com>
Date:   Mon Jun 5 20:14:33 2023 -0600

    RISC-V] add TC for save-restore cfi directives.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/riscv/save-restore-cfi.c: New test to check save-restore
            cfi directives.

Diff:
---
 gcc/testsuite/gcc.target/riscv/save-restore-cfi.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-cfi.c b/gcc/testsuite/gcc.target/riscv/save-restore-cfi.c
new file mode 100644
index 00000000000..a39f3060981
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-cfi.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-g -Os -march=rv32imafc -mabi=ilp32f -msave-restore -mcmodel=medlow" } */
+/* { dg-skip-if "" { *-*-* } {"-O2" "-O1" "-O0" "-Og" "-O3" "-Oz" "-flto"} } */
+/* { dg-final { scan-assembler-times {\.cfi_def_cfa_offset 16} 2} } */
+/* { dg-final { scan-assembler-times {\.cfi_def_cfa_offset 32} 1} } */
+/* { dg-final { scan-assembler-times {\.cfi_def_cfa_offset 0} 1} } */
+
+char my_getchar();
+float getf();
+
+int foo()
+{
+  int s0 = my_getchar();
+  float f0 = getf();
+  int b = my_getchar();
+  return f0 + s0 + b;
+}

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

end of thread, other threads:[~2023-07-14  2:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 14:25 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V] add TC for save-restore cfi directives Jeff Law
2023-07-14  2:43 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).