From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Andrew Waterman <andrew@sifive.com>,
Jim Wilson <jim.wilson.gcc@gmail.com>,
Nelson Chu <nelson@rivosinc.com>,
Kito Cheng <kito.cheng@sifive.com>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: [PATCH v2 2/3] RISC-V: Add "lp64e" ABI support
Date: Thu, 31 Aug 2023 03:21:55 +0000 [thread overview]
Message-ID: <00ee23325647b98524c2600b00041601e459d03d.1693452083.git.research_trasio@irq.a4lg.com> (raw)
In-Reply-To: <cover.1693452083.git.research_trasio@irq.a4lg.com>
From: Tsukasa OI <research_trasio@irq.a4lg.com>
Since RV32E and RV64E are now ratified, this commit prepares the ABI
support for LP64E (LP64 with reduced GPRs).
gas/ChangeLog:
* config/tc-riscv.c (riscv_set_abi_by_arch): Update the error
message. (md_parse_option): Accept "lp64e".
* doc/c-riscv.texi: Update the documentation to allow "lp64e".
* testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l:
Change error message.
* testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l: Likewise.
* testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l: Likewise.
---
gas/config/tc-riscv.c | 4 +++-
gas/doc/c-riscv.texi | 5 ++---
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l | 2 +-
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l | 2 +-
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l | 2 +-
5 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 959cbbc32a5e..d0caf691fc65 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -384,7 +384,7 @@ riscv_set_abi_by_arch (void)
as_bad ("%d-bit ABI not yet supported on %d-bit ISA", abi_xlen, xlen);
if (riscv_subset_supports (&riscv_rps_as, "e") && !rve_abi)
- as_bad ("only the ilp32e ABI is supported for e extension");
+ as_bad ("only ilp32e/lp64e ABI are supported for e extension");
if (float_abi == FLOAT_ABI_SINGLE
&& !riscv_subset_supports (&riscv_rps_as, "f"))
@@ -3897,6 +3897,8 @@ md_parse_option (int c, const char *arg)
riscv_set_abi (32, FLOAT_ABI_QUAD, false);
else if (strcmp (arg, "lp64") == 0)
riscv_set_abi (64, FLOAT_ABI_SOFT, false);
+ else if (strcmp (arg, "lp64e") == 0)
+ riscv_set_abi (64, FLOAT_ABI_SOFT, true);
else if (strcmp (arg, "lp64f") == 0)
riscv_set_abi (64, FLOAT_ABI_SINGLE, false);
else if (strcmp (arg, "lp64d") == 0)
diff --git a/gas/doc/c-riscv.texi b/gas/doc/c-riscv.texi
index b175ba0a7293..e7fdbfa22afb 100644
--- a/gas/doc/c-riscv.texi
+++ b/gas/doc/c-riscv.texi
@@ -65,9 +65,8 @@ aren't set, then assembler will check the default configure setting
@item -mabi=ABI
Selects the ABI, which is either "ilp32" or "lp64", optionally followed
by "f", "d", or "q" to indicate single-precision, double-precision, or
-quad-precision floating-point calling convention, or none to indicate
-the soft-float calling convention. Also, "ilp32" can optionally be followed
-by "e" to indicate the RVE ABI, which is always soft-float.
+quad-precision floating-point calling convention, or none or "e" to indicate
+the soft-float calling convention ("e" indicates a soft-float RVE ABI).
@cindex @samp{-mrelax} option, RISC-V
@item -mrelax
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l
index f7306cb24d20..419a01d5d53a 100644
--- a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l
+++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l
@@ -1,4 +1,4 @@
.*Assembler messages:
.*Error: can't have 64-bit ABI on 32-bit ISA
-.*Error: only the ilp32e ABI is supported for e extension
+.*Error: only ilp32e/lp64e ABI are supported for e extension
.*Error: ilp32d/lp64d ABI can't be used when d extension isn't supported
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l
index 706690ac9c64..7b2fcda8d685 100644
--- a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l
+++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l
@@ -1,4 +1,4 @@
.*Assembler messages:
.*Error: can't have 64-bit ABI on 32-bit ISA
-.*Error: only the ilp32e ABI is supported for e extension
+.*Error: only ilp32e/lp64e ABI are supported for e extension
.*Error: ilp32f/lp64f ABI can't be used when f extension isn't supported
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l
index ab64b1546f63..a06e9ea1aa93 100644
--- a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l
+++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l
@@ -1,4 +1,4 @@
.*Assembler messages:
.*Error: can't have 64-bit ABI on 32-bit ISA
-.*Error: only the ilp32e ABI is supported for e extension
+.*Error: only ilp32e/lp64e ABI are supported for e extension
.*Error: ilp32q/lp64q ABI can't be used when q extension isn't supported
--
2.42.0
next prev parent reply other threads:[~2023-08-31 3:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 2:26 [PATCH 0/2] RISC-V: Add ratified 'E' base ISA support with draft ABIs Tsukasa OI
2023-07-25 2:26 ` [PATCH 1/2] RISC-V: Remove RV64E conflict Tsukasa OI
2023-07-25 13:27 ` Kito Cheng
2023-07-25 2:26 ` [PATCH 2/2] RISC-V: Add "lp64e" ABI support Tsukasa OI
2023-07-25 13:27 ` Kito Cheng
2023-08-31 3:21 ` [PATCH v2 0/3] RISC-V: Add ratified 'E' base ISA support with draft ABIs Tsukasa OI
2023-08-31 3:21 ` [PATCH v2 1/3] RISC-V: Remove RV64E conflict Tsukasa OI
2023-08-31 3:21 ` Tsukasa OI [this message]
2023-08-31 3:21 ` [PATCH v2 3/3] RISC-V: Add RV64E support to GDB Tsukasa OI
2023-09-05 9:08 ` [PATCH v3 0/3] RISC-V: Add ratified 'E' base ISA support with draft ABIs Tsukasa OI
2023-09-05 9:08 ` [PATCH v3 1/3] RISC-V: Remove RV64E conflict Tsukasa OI
2023-09-05 9:08 ` [PATCH v3 2/3] RISC-V: Add "lp64e" ABI support Tsukasa OI
2023-09-05 9:08 ` [PATCH v3 3/3] RISC-V: Add RV64E support to GDB Tsukasa OI
2023-09-25 3:07 ` [PATCH v3 0/3] RISC-V: Add ratified 'E' base ISA support with draft ABIs Nelson Chu
2023-09-25 8:04 ` Tsukasa OI
2023-10-16 8:20 ` Tsukasa OI
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=00ee23325647b98524c2600b00041601e459d03d.1693452083.git.research_trasio@irq.a4lg.com \
--to=research_trasio@irq.a4lg.com \
--cc=andrew@sifive.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=jim.wilson.gcc@gmail.com \
--cc=kito.cheng@sifive.com \
--cc=nelson@rivosinc.com \
--cc=palmer@dabbelt.com \
/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).