aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/rsubw.h
blob: 01dec51a7fbc851d467a7e3d501221d32258c934 (plain)
1
2
3
4
require_extension(EXT_ZPN);
sreg_t res = (sreg_t)P_SW(RS1, 0) - (sreg_t)P_SW(RS2, 0);
res >>= 1;
WRITE_RD(sext_xlen(res));