aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/smulx8.h
diff options
context:
space:
mode:
authorChunPing Chung <cpchung@pllab.cs.nthu.edu.tw>2022-07-29 03:01:26 +0800
committerGitHub <noreply@github.com>2022-07-28 12:01:26 -0700
commit66fd65c0d2ebc84bd8d8f82258e0988fdca07719 (patch)
tree038e79517c0a9278b28f04b6cb6093e2cee4000f /riscv/insns/smulx8.h
parent8d016bffdbc8d7cbeb253cc4f2ee9e5d4bf0a626 (diff)
downloadspike-66fd65c0d2ebc84bd8d8f82258e0988fdca07719.zip
spike-66fd65c0d2ebc84bd8d8f82258e0988fdca07719.tar.gz
spike-66fd65c0d2ebc84bd8d8f82258e0988fdca07719.tar.bz2
Fix overflow issue of p-ext multiply instructions (#1053)
Diffstat (limited to 'riscv/insns/smulx8.h')
-rw-r--r--riscv/insns/smulx8.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/smulx8.h b/riscv/insns/smulx8.h
index b5ae41c..9270ce3 100644
--- a/riscv/insns/smulx8.h
+++ b/riscv/insns/smulx8.h
@@ -1,3 +1,3 @@
P_MUL_CROSS_LOOP(8, {
- pd = ps1 * ps2;
+ pd = (int16_t)ps1 * (int16_t)ps2;
})