public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@rivosinc.com>
To: gcc-patches@gcc.gnu.org
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Subject: [PATCH 13-backport 2/3] RISC-V: Set the ABI for the RVV tests
Date: Mon, 17 Apr 2023 11:20:43 -0700	[thread overview]
Message-ID: <20230417182044.22425-3-palmer@rivosinc.com> (raw)
In-Reply-To: <20230417182044.22425-1-palmer@rivosinc.com>

The RVV test harness currently sets the ISA according to the target
tuple, but doesn't also set the ABI.  This just sets the ABI to match
the ISA, though we should really also be respecting the user's specific
ISA to test.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/rvv.exp (gcc_mabi): New variable.

(cherry picked from commit e6b050da8a4513ab37fd3699c7a963421fbe4d81)
---
 gcc/testsuite/gcc.target/riscv/rvv/rvv.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
index 7a9a2b6ac48..4b5509db385 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
+++ b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
@@ -31,15 +31,17 @@ if ![info exists DEFAULT_CFLAGS] then {
 }
 
 set gcc_march "rv64gcv_zfh"
+set gcc_mabi  "lp64d"
 if [istarget riscv32-*-*] then {
   set gcc_march "rv32gcv_zfh"
+  set gcc_mabi  "ilp32d"
 }
 
 # Initialize `dg'.
 dg-init
 
 # Main loop.
-set CFLAGS "$DEFAULT_CFLAGS -march=$gcc_march -O3"
+set CFLAGS "$DEFAULT_CFLAGS -march=$gcc_march -mabi=$gcc_mabi -O3"
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/base/*.\[cS\]]] \
 	"" $CFLAGS
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vsetvl/*.\[cS\]]] \
-- 
2.39.2


  parent reply	other threads:[~2023-04-17 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 18:20 [PATCH 13-backport 0/3] RISC-V Testsuite Fixes Palmer Dabbelt
2023-04-17 18:20 ` [PATCH 13-backport 1/3] RISC-V: Clean up the pr106602.c testcase Palmer Dabbelt
2023-04-17 18:20 ` Palmer Dabbelt [this message]
2023-04-17 18:20 ` [PATCH 13-backport 3/3] RISC-V: Force ilp32d for the T-Head FMV test Palmer Dabbelt
2023-04-18  6:10 ` [PATCH 13-backport 0/3] RISC-V Testsuite Fixes Richard Biener
2023-04-19  2:41   ` Palmer Dabbelt

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=20230417182044.22425-3-palmer@rivosinc.com \
    --to=palmer@rivosinc.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).