diff options
author | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-01-13 09:09:24 -0800 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-01-24 08:36:37 -0800 |
commit | 331017800023159b54ad7a5e3f701d6ac8d7b6a8 (patch) | |
tree | c3bc8866ae50afd82955e04bb0f8f13cf6408901 | |
parent | 6e3d1537a4a6668cdbe2f78e651754c98a2fec24 (diff) | |
download | riscv-isa-sim-331017800023159b54ad7a5e3f701d6ac8d7b6a8.zip riscv-isa-sim-331017800023159b54ad7a5e3f701d6ac8d7b6a8.tar.gz riscv-isa-sim-331017800023159b54ad7a5e3f701d6ac8d7b6a8.tar.bz2 |
rvv: fix corner case when input are 1's and shift amount is maximum
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
-rw-r--r-- | riscv/insns/vnclipu_wi.h | 2 | ||||
-rw-r--r-- | riscv/insns/vssrl_vi.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/riscv/insns/vnclipu_wi.h b/riscv/insns/vnclipu_wi.h index b1527f7..e24aec1 100644 --- a/riscv/insns/vnclipu_wi.h +++ b/riscv/insns/vnclipu_wi.h @@ -3,7 +3,7 @@ VRM xrm = P.VU.get_vround_mode(); uint64_t int_max = ~(-1ll << P.VU.vsew); VI_VVXI_LOOP_NARROW ({ - uint64_t result = vs2_u; + uint128_t result = vs2_u; unsigned shift = zimm5 & ((sew * 2) - 1); // rounding diff --git a/riscv/insns/vssrl_vi.h b/riscv/insns/vssrl_vi.h index bf554ca..55e085d 100644 --- a/riscv/insns/vssrl_vi.h +++ b/riscv/insns/vssrl_vi.h @@ -3,7 +3,7 @@ VRM xrm = P.VU.get_vround_mode(); VI_VI_ULOOP ({ int sh = simm5 & (sew - 1) & 0x1f; - uint64_t val = vs2; + uint128_t val = vs2; INT_ROUNDING(val, xrm, sh); vd = val >> sh; |