aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/pssa_hx.h
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/insns/pssa_hx.h')
-rw-r--r--riscv/insns/pssa_hx.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/riscv/insns/pssa_hx.h b/riscv/insns/pssa_hx.h
new file mode 100644
index 00000000..a5acf2fd
--- /dev/null
+++ b/riscv/insns/pssa_hx.h
@@ -0,0 +1,9 @@
+P_CROSS_ULOOP(16, {
+ bool sat = false;
+ p_rd = (sat_sub<int16_t, uint16_t>(p_rs1, p_rs2, sat));
+ if (sat) P.VU.vxsat->write(1);
+}, {
+ bool sat = false;
+ p_rd = (sat_add<int16_t, uint16_t>(p_rs1, p_rs2, sat));
+ if (sat) P.VU.vxsat->write(1);
+}) \ No newline at end of file