aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscv/insns/vdiv_vv.h2
-rw-r--r--riscv/insns/vdiv_vx.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/riscv/insns/vdiv_vv.h b/riscv/insns/vdiv_vv.h
index 67da162..0d4bd0d 100644
--- a/riscv/insns/vdiv_vv.h
+++ b/riscv/insns/vdiv_vv.h
@@ -3,7 +3,7 @@ VI_VV_LOOP
({
if (vs1 == 0)
vd = -1;
- else if (vs2 == -(1 << (sew - 1)) && vs1 == -1)
+ else if (vs2 == (INT64_MIN >> (64 - sew)) && vs1 == -1)
vd = vs2;
else
vd = vs2 / vs1;
diff --git a/riscv/insns/vdiv_vx.h b/riscv/insns/vdiv_vx.h
index 1a152bd..4052952 100644
--- a/riscv/insns/vdiv_vx.h
+++ b/riscv/insns/vdiv_vx.h
@@ -3,7 +3,7 @@ VI_VX_LOOP
({
if(rs1 == 0)
vd = -1;
- else if(vs2 == -(1 << (sew - 1)) && rs1 == -1)
+ else if(vs2 == (INT64_MIN >> (64 - sew)) && rs1 == -1)
vd = vs2;
else
vd = vs2 / rs1;