ADD rd, rs, rt |
nanoMIPS, not available in NMS |
Add |
Add. Add two 32-bit signed integers in registers $rs and $rt, placing the 32-bit result inregister $rd, and trapping on overflow.
nanoMIPS, not available in NMS
001000 |
rt |
rs |
rd |
x |
0100010 |
000 |
6 |
5 |
5 |
5 |
1 |
7 |
3 |
if C0.Config5.NMS == 1: raise exception('RI') sum = GPR[rs] + GPR[rt] if overflows(sum, nbits=32): raise exception('OV') GPR[rd] = sign_extend(sum, from_nbits=32)
Overflow.