blob: 1196f082f3b3c67a7843845644143bfaca0e4b7b (
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, 0);
sreg_t mres1 = (sreg_t)P_SW(RS1, 1) * P_SW(RS2, 1);
WRITE_RD((sat_add<sreg_t, reg_t>(mres0, mres1, sat)));
P_SET_OV(sat);
|