[RFC,1/4] RISC-V : Remove checking when -march=rv64XX and -mabi=ilp32X
Checks
Commit Message
This patch remove check in riscv_set_abi_by_arch() when -march=rv64XX and -mabi=ilp32X
gas/ChangeLog:
* config/tc-riscv.c (riscv_set_abi_by_arch): Remove check.
* testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d: Removed.
* testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l: Removed.
---
gas/config/tc-riscv.c | 2 +-
gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d | 3 ---
gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l | 2 --
3 files changed, 1 insertion(+), 6 deletions(-)
delete mode 100644 gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d
delete mode 100644 gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l
Comments
On 19.05.2023 05:48, Liao Shihua wrote:
> --- a/gas/config/tc-riscv.c
> +++ b/gas/config/tc-riscv.c
> @@ -379,7 +379,7 @@ riscv_set_abi_by_arch (void)
> gas_assert (abi_xlen != 0 && xlen != 0 && float_abi != FLOAT_ABI_DEFAULT);
> if (abi_xlen > xlen)
> as_bad ("can't have %d-bit ABI on %d-bit ISA", abi_xlen, xlen);
> - else if (abi_xlen < xlen)
> + else if (abi_xlen < xlen && (abi_xlen != 32 && xlen != 64))
> as_bad ("%d-bit ABI not yet supported on %d-bit ISA", abi_xlen, xlen);
Did you mean || as the inner operator of the condition you add?
Also I think this change ought to come after patch 2, not first.
Jan
@@ -379,7 +379,7 @@ riscv_set_abi_by_arch (void)
gas_assert (abi_xlen != 0 && xlen != 0 && float_abi != FLOAT_ABI_DEFAULT);
if (abi_xlen > xlen)
as_bad ("can't have %d-bit ABI on %d-bit ISA", abi_xlen, xlen);
- else if (abi_xlen < xlen)
+ else if (abi_xlen < xlen && (abi_xlen != 32 && xlen != 64))
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)
deleted file mode 100644
@@ -1,3 +0,0 @@
-#as: -march-attr -mabi=ilp32
-#source: mabi-attr-rv64iq.s
-#error_output: mabi-fail-rv64iq-ilp32.l
deleted file mode 100644
@@ -1,2 +0,0 @@
-.*Assembler messages:
-.*Error: 32-bit ABI not yet supported on 64-bit ISA