blob: 0a0901381db5af36b4017dc641786b9e35af91f5 (
plain)
1
2
3
4
5
6
7
8
9
|
require_rv64;
require_extension('P');
bool sat;
sreg_t mres0 = (sreg_t)P_SW(RS1, 0) * P_SW(RS2, 1);
sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 0);
WRITE_RD((sat_add<sreg_t, reg_t>(RD, mres0, mres1, sat)));
P_SET_OV(sat);
|