public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Law <law@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V] add TC for save-restore cfi directives.
Date: Mon, 12 Jun 2023 14:25:31 +0000 (GMT)	[thread overview]
Message-ID: <20230612142531.505483858415@sourceware.org> (raw)

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

             reply	other threads:[~2023-06-12 14:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12 14:25 Jeff Law [this message]
2023-07-14  2:43 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=20230612142531.505483858415@sourceware.org \
    --to=law@gcc.gnu.org \
    --cc=gcc-cvs@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).