From 66fd65c0d2ebc84bd8d8f82258e0988fdca07719 Mon Sep 17 00:00:00 2001 From: ChunPing Chung Date: Fri, 29 Jul 2022 03:01:26 +0800 Subject: Fix overflow issue of p-ext multiply instructions (#1053) --- riscv/insns/smulx8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'riscv/insns/smulx8.h') 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; }) -- cgit v1.1