Format |
Syntax: |
Operation: |
Operands: |
Architecture revision |
Opcode | ||||||||||||
1 |
rsub Rd, Rs |
Rd = Rs - Rd; |
{d, s} ∈ {0, 1, …, 15} |
Rev1+ |
| ||||||||||||
2 |
rsub Rd, Rs, imm |
Rd = SE(imm8) - Rs; |
{d, s} ∈ {0, 1, …, 15} imm ∈ {-128, -127, ..., 127} |
Rev1+ |
|
Performs a subtraction and stores the result in destination register. Similar to sub, but the minu- end and subtrahend are interchanged.
Format I: OP1 = Rs, OP2 = Rd |
|
Format II: OP1 = SE(imm8), OP2 = Rs |
|
Q: |
Not affected |
V: |
V = (OP1[31] AND ~OP2[31] AND ~RES[31]) OR (~OP1[31] AND OP2[31] AND RES[31]) |
N: |
N = RES[31] |
Z: |
Z = (RES[31:0] == 0) |
C: |
C = ~OP1[31] AND OP2[31] OR OP2[31] AND RES[31] OR ~OP1[31] AND RES[31] |