aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/vsmul_vx.h
diff options
context:
space:
mode:
authorksco <numbksco@gmail.com>2022-08-13 04:37:26 +0800
committerGitHub <noreply@github.com>2022-08-12 13:37:26 -0700
commit6aa46e99c36f1bf394b3f7fae3c729e8b7918a80 (patch)
tree51c1b0350b8e014bc058891808eb2bb5c167d7c3 /riscv/insns/vsmul_vx.h
parentac117cc35aa2bc5296f7a7bfd817a539e269919f (diff)
downloadspike-6aa46e99c36f1bf394b3f7fae3c729e8b7918a80.zip
spike-6aa46e99c36f1bf394b3f7fae3c729e8b7918a80.tar.gz
spike-6aa46e99c36f1bf394b3f7fae3c729e8b7918a80.tar.bz2
Remove unused code in vsmul* (#1069)
Diffstat (limited to 'riscv/insns/vsmul_vx.h')
-rw-r--r--riscv/insns/vsmul_vx.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/riscv/insns/vsmul_vx.h b/riscv/insns/vsmul_vx.h
index 2e25670..d2724ee 100644
--- a/riscv/insns/vsmul_vx.h
+++ b/riscv/insns/vsmul_vx.h
@@ -2,20 +2,11 @@
VRM xrm = P.VU.get_vround_mode();
int64_t int_max = INT64_MAX >> (64 - P.VU.vsew);
int64_t int_min = INT64_MIN >> (64 - P.VU.vsew);
-int64_t sign_mask = uint64_t(1) << (P.VU.vsew - 1);
VI_VX_LOOP
({
- int64_t rs1_sign;
- int64_t vs2_sign;
- int64_t result_sign;
-
- rs1_sign = rs1 & sign_mask;
- vs2_sign = vs2 & sign_mask;
bool overflow = rs1 == vs2 && rs1 == int_min;
-
int128_t result = (int128_t)rs1 * (int128_t)vs2;
- result_sign = (rs1_sign ^ vs2_sign) & sign_mask;
// rounding
INT_ROUNDING(result, xrm, sew - 1);