RISC-V: Prohibit combination of 'E' and 'H'
authorTsukasa OI <research_trasio@irq.a4lg.com>
Tue, 8 Aug 2023 04:06:32 +0000 (04:06 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Tue, 5 Sep 2023 03:05:11 +0000 (03:05 +0000)
commit9294a13008b0c048c83a880bce9469bccec14d36
tree0fe3e08eb840de5f34c19be2b499fe9841933851
parent292273af3700fef7d03d716f9bc67cb07089f110
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.
bfd/elfxx-riscv.c
gas/testsuite/gas/riscv/march-fail-rv32eh.d [new file with mode: 0644]
gas/testsuite/gas/riscv/march-fail-rv32eh.l [new file with mode: 0644]