public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [RISC-V] add TC for save-restore cfi directives.
@ 2023-06-05  6:07 Fei Gao
  2023-06-06  2:16 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Fei Gao @ 2023-06-05  6:07 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng, palmer, jeffreyalaw, Fei Gao

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/save-restore-cfi.c: New test to check save-restore cfi directives.
---
 .../gcc.target/riscv/save-restore-cfi.c         | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/riscv/save-restore-cfi.c

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;
+}
-- 
2.17.1


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

* Re: [PATCH] [RISC-V] add TC for save-restore cfi directives.
  2023-06-05  6:07 [PATCH] [RISC-V] add TC for save-restore cfi directives Fei Gao
@ 2023-06-06  2:16 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-06-06  2:16 UTC (permalink / raw)
  To: Fei Gao, gcc-patches; +Cc: kito.cheng, palmer



On 6/5/23 00:07, Fei Gao wrote:
> gcc/testsuite/ChangeLog:
> 
>          * gcc.target/riscv/save-restore-cfi.c: New test to check save-restore cfi directives.
Wrapped the ChangeLog to 80 columns and pushed to the trunk.

Thanks,
Jeff

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

end of thread, other threads:[~2023-06-06  2:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05  6:07 [PATCH] [RISC-V] add TC for save-restore cfi directives Fei Gao
2023-06-06  2:16 ` 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).