Browse Source
Merge pull request #2077 from riscv-software-src/fix-2076
Prevent div-by-0 when executing Zvbdot instructions with VLEN=0
pull/2081/head
Andrew Waterman
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
riscv/v_ext_macros.h
|
|
|
@ -2088,11 +2088,11 @@ VI_VX_ULOOP({ \ |
|
|
|
require_noover(insn.rd(), 1, insn.rs2(), P.VU.vflmul) |
|
|
|
|
|
|
|
#define ZVBDOT_INIT(widen) \ |
|
|
|
require_vector(true); \ |
|
|
|
unsigned vd_eew = P.VU.vsew * (widen); \ |
|
|
|
unsigned vd_emul = std::max(1U, unsigned((8 * vd_eew) / P.VU.VLEN)); \ |
|
|
|
unsigned vs2 = insn.rs2() & ~7; \ |
|
|
|
unsigned ci = (insn.rs2() & 7) * 8; \ |
|
|
|
require_vector(true); \ |
|
|
|
require(P.VU.vstart->read() == 0); \ |
|
|
|
require(P.VU.vflmul == 1); \ |
|
|
|
require(ci * vd_eew < P.VU.VLEN); \ |
|
|
|
|