aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/pm2wsub_hx.h
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/insns/pm2wsub_hx.h')
-rw-r--r--riscv/insns/pm2wsub_hx.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/riscv/insns/pm2wsub_hx.h b/riscv/insns/pm2wsub_hx.h
new file mode 100644
index 00000000..81da3652
--- /dev/null
+++ b/riscv/insns/pm2wsub_hx.h
@@ -0,0 +1,7 @@
+require_rv32;
+P_WIDEN_REDUCTION_CROSS_LOOP(32, 16, false, false, {
+ if (j & 1)
+ p_res += p_rs1 * p_rs2;
+ else
+ p_res -= p_rs1 * p_rs2;
+}) \ No newline at end of file