SUB rd, rs, rt |
nanoMIPS, not available in NMS |
Subtract |
Subtract. Subtract the 32-bit signed integer in register $rt from the 32-bit signed integerin register $rs, placing the 32-bit result in register $rd, and trapping on overflow.
nanoMIPS, not available in NMS
|
001000 |
rt |
rs |
rd |
x |
0110010 |
000 |
|
6 |
5 |
5 |
5 |
1 |
7 |
3 |
if C0.Config5.NMS == 1:
raise exception('RI')
result = GPR[rs] -GPR[rt]
if overflows(result, nbits=32):
raise exception('OV')
GPR[rd] = sign_extend(result, from_nbits=32)
None.