From 92e9732e10a11f967aad6ba73f061d8af92a80a2 Mon Sep 17 00:00:00 2001 From: "Dave.Wen" Date: Mon, 8 Apr 2019 18:45:19 -0700 Subject: fixed: xext, vmulh[u]_v[vx], vsne_vi --- riscv/insns/vmulh_vx.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'riscv/insns/vmulh_vx.h') diff --git a/riscv/insns/vmulh_vx.h b/riscv/insns/vmulh_vx.h index a7bf7aa..1898950 100644 --- a/riscv/insns/vmulh_vx.h +++ b/riscv/insns/vmulh_vx.h @@ -1,5 +1,9 @@ // vmulh +reg_t vsew = STATE.VU.vsew; +uint64_t lo_mask = ((uint64_t)1 << vsew) - 1; + VI_VX_LOOP ({ - vd = vsext((rs1 * vs2) >> (sew/2), sew); + int64_t result = (int64_t)rs1 * (int64_t)vs2; + vd = (result >> sew) & lo_mask; }) -- cgit v1.1