diff options
Diffstat (limited to 'riscv/insns/pssa_dhx.h')
| -rw-r--r-- | riscv/insns/pssa_dhx.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/riscv/insns/pssa_dhx.h b/riscv/insns/pssa_dhx.h new file mode 100644 index 00000000..d5a64700 --- /dev/null +++ b/riscv/insns/pssa_dhx.h @@ -0,0 +1,10 @@ +require_rv32; +P_CROSS_DW_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 |
