diff options
author | ChunPing Chung <cpchung@pllab.cs.nthu.edu.tw> | 2022-07-29 03:01:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 12:01:26 -0700 |
commit | 66fd65c0d2ebc84bd8d8f82258e0988fdca07719 (patch) | |
tree | 038e79517c0a9278b28f04b6cb6093e2cee4000f /riscv/insns/smulx16.h | |
parent | 8d016bffdbc8d7cbeb253cc4f2ee9e5d4bf0a626 (diff) | |
download | spike-66fd65c0d2ebc84bd8d8f82258e0988fdca07719.zip spike-66fd65c0d2ebc84bd8d8f82258e0988fdca07719.tar.gz spike-66fd65c0d2ebc84bd8d8f82258e0988fdca07719.tar.bz2 |
Fix overflow issue of p-ext multiply instructions (#1053)
Diffstat (limited to 'riscv/insns/smulx16.h')
-rw-r--r-- | riscv/insns/smulx16.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/smulx16.h b/riscv/insns/smulx16.h index 14ae047..58e9a08 100644 --- a/riscv/insns/smulx16.h +++ b/riscv/insns/smulx16.h @@ -1,3 +1,3 @@ P_MUL_CROSS_LOOP(16, { - pd = ps1 * ps2; + pd = (int32_t)ps1 * (int32_t)ps2; }) |