Skip to content

Commit

Permalink
RISC-V: Allow both Zmmul and M
Browse files Browse the repository at this point in the history
We got to talking about how Zmmul and M interact with each other
riscv/riscv-isa-manual#869 , and it turns out
that QEMU's behavior is slightly wrong: having Zmmul and M is a legal
combination, it just means that the multiplication instructions are
supported even when M is disabled at runtime via misa.

This just stops overriding M from Zmmul, with that the other checks for
the multiplication instructions work as per the ISA.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220714180033.22385-1-palmer@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
palmer-dabbelt authored and alistair23 committed Jul 27, 2022
1 parent 7b17a1a commit 44602af
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions target/riscv/cpu.c
Expand Up @@ -619,11 +619,6 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
cpu->cfg.ext_ifencei = true;
}

if (cpu->cfg.ext_m && cpu->cfg.ext_zmmul) {
warn_report("Zmmul will override M");
cpu->cfg.ext_m = false;
}

if (cpu->cfg.ext_i && cpu->cfg.ext_e) {
error_setg(errp,
"I and E extensions are incompatible");
Expand Down

0 comments on commit 44602af

Please sign in to comment.