riscv-p-spec icon indicating copy to clipboard operation
riscv-p-spec copied to clipboard

Contradictions about inst UKADDH,UKSUBH

Open wzy971210 opened this issue 4 years ago • 2 comments

Hi, It seems a contradiction about the descriptions of UKADDH,UKSUBH. Should the result be sign-extended or zero-extended?

UKADDH Rt, Ra, Rb Add with I16 saturation Rt = ZE(SAT.U16(Ra.W[0] + Rb.W[0]))

vs

tmp = Rs1.W[0] + Rs2.W[0]; if (tmp > (2^16)-1) { tmp = (2^16)-1; OV = 1; } Rd = SE(tmp[15:0]);

wzy971210 avatar Dec 23 '20 02:12 wzy971210

The short definitions and detailed definitions mismatch can be found also for: UKADDW UKSUBW

mkostal-codasip avatar May 05 '21 09:05 mkostal-codasip

This issue has been fixed. Could it be closed?

tclin914 avatar Feb 21 '22 06:02 tclin914