Skip to content

Commit c6a5535

Browse files
committed
RISC-V: Add "lp64e" ABI support
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.
1 parent 592aae0 commit c6a5535

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

gas/config/tc-riscv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ riscv_set_abi_by_arch (void)
384384
as_bad ("%d-bit ABI not yet supported on %d-bit ISA", abi_xlen, xlen);
385385

386386
if (riscv_subset_supports (&riscv_rps_as, "e") && !rve_abi)
387-
as_bad ("only the ilp32e ABI is supported for e extension");
387+
as_bad ("only ilp32e/lp64e ABI are supported for e extension");
388388

389389
if (float_abi == FLOAT_ABI_SINGLE
390390
&& !riscv_subset_supports (&riscv_rps_as, "f"))
@@ -3897,6 +3897,8 @@ md_parse_option (int c, const char *arg)
38973897
riscv_set_abi (32, FLOAT_ABI_QUAD, false);
38983898
else if (strcmp (arg, "lp64") == 0)
38993899
riscv_set_abi (64, FLOAT_ABI_SOFT, false);
3900+
else if (strcmp (arg, "lp64e") == 0)
3901+
riscv_set_abi (64, FLOAT_ABI_SOFT, true);
39003902
else if (strcmp (arg, "lp64f") == 0)
39013903
riscv_set_abi (64, FLOAT_ABI_SINGLE, false);
39023904
else if (strcmp (arg, "lp64d") == 0)

gas/doc/c-riscv.texi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ aren't set, then assembler will check the default configure setting
6565
@item -mabi=ABI
6666
Selects the ABI, which is either "ilp32" or "lp64", optionally followed
6767
by "f", "d", or "q" to indicate single-precision, double-precision, or
68-
quad-precision floating-point calling convention, or none to indicate
69-
the soft-float calling convention. Also, "ilp32" can optionally be followed
70-
by "e" to indicate the RVE ABI, which is always soft-float.
68+
quad-precision floating-point calling convention, or none or "e" to indicate
69+
the soft-float calling convention ("e" indicates a soft-float RVE ABI).
7170

7271
@cindex @samp{-mrelax} option, RISC-V
7372
@item -mrelax
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.*Assembler messages:
22
.*Error: can't have 64-bit ABI on 32-bit ISA
3-
.*Error: only the ilp32e ABI is supported for e extension
3+
.*Error: only ilp32e/lp64e ABI are supported for e extension
44
.*Error: ilp32d/lp64d ABI can't be used when d extension isn't supported
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.*Assembler messages:
22
.*Error: can't have 64-bit ABI on 32-bit ISA
3-
.*Error: only the ilp32e ABI is supported for e extension
3+
.*Error: only ilp32e/lp64e ABI are supported for e extension
44
.*Error: ilp32f/lp64f ABI can't be used when f extension isn't supported
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.*Assembler messages:
22
.*Error: can't have 64-bit ABI on 32-bit ISA
3-
.*Error: only the ilp32e ABI is supported for e extension
3+
.*Error: only ilp32e/lp64e ABI are supported for e extension
44
.*Error: ilp32q/lp64q ABI can't be used when q extension isn't supported

0 commit comments

Comments
 (0)