aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/pmhraccu_h.h
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/insns/pmhraccu_h.h')
-rw-r--r--riscv/insns/pmhraccu_h.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/riscv/insns/pmhraccu_h.h b/riscv/insns/pmhraccu_h.h
new file mode 100644
index 00000000..41efaad8
--- /dev/null
+++ b/riscv/insns/pmhraccu_h.h
@@ -0,0 +1,5 @@
+P_RD_RS1_RS2_ULOOP(16,16,16, {
+ uint32_t mres = zext(p_rs1,32) * zext(p_rs2,32);
+ uint16_t round = ((mres >> 15) + 1) >> 1;
+ p_rd += round;
+}) \ No newline at end of file