Skip to content

Commit 9294a13

Browse files
committed
RISC-V: Prohibit combination of 'E' and 'H'
According to the ratified privileged specification (version 20211203), it says: > The hypervisor extension depends on an "I" base integer ISA with 32 x > registers (RV32I or RV64I), not RV32E, which has only 16 x registers. Also in the latest draft, it also prohibits RV64E with the 'H' extension. This commit prohibits the combination of 'E' and 'H' extensions. bfd/ChangeLog: * elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit 'E' and 'H' combinations. gas/ChangeLog: * testsuite/gas/riscv/march-fail-rv32eh.d: New failure test to make sure that RV32E + 'H' is prohibited. * testsuite/gas/riscv/march-fail-rv32eh.l: Likewise.
1 parent 292273a commit 9294a13

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

bfd/elfxx-riscv.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,6 +1949,13 @@ riscv_parse_check_conflicts (riscv_parse_subset_t *rps)
19491949
(_("rv%d does not support the `e' extension"), xlen);
19501950
no_conflict = false;
19511951
}
1952+
if (riscv_subset_supports (rps, "e")
1953+
&& riscv_subset_supports (rps, "h"))
1954+
{
1955+
rps->error_handler
1956+
(_("rv%de does not support the `h' extension"), xlen);
1957+
no_conflict = false;
1958+
}
19521959
if (riscv_lookup_subset (rps->subset_list, "q", &subset)
19531960
&& (subset->major_version < 2 || (subset->major_version == 2
19541961
&& subset->minor_version < 2))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#as: -march=rv32eh
2+
#source: empty.s
3+
#error_output: march-fail-rv32eh.l
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.*Assembler messages:
2+
.*Error: .*rv32e does not support the `h' extension

0 commit comments

Comments
 (0)