Format |
Syntax: |
Operation: |
Operands: |
Architecture revision |
Opcode | ||||||||||||
1 |
satsub.w Rd, Rx, Ry |
temp = Rx - Ry; |
{d, x, y} ∈ {0, 1, …, 15} |
Rev1+ |
| ||||||||||||
2 |
satsub.w Rd, Rs, imm |
temp = Rs - SE(imm16)); Format I: OP1 = Rx, OP2 = Ry Format II: OP1 = Rs, OP2 = SE(imm16) if (OP1[31] AND ~OP2[31] AND ~temp[31]) OR (~OP1[31] AND OP2[31] AND temp[31]) then if(OP1[31]==0) then Rd = 0x7fffffff; else Rd = 0x80000000; else Rd = temp |
{d, s} ∈ {0, 1, …, 15} imm ∈ {-32768, -32767, ..., 32767} |
Rev1+ |
|
Performs a subtraction and stores the result in destination register. The result is saturated if a two's complement overflow occurs. If saturation occurs, the Q flag is set.
Format I: OP1 = Rx, OP2 = Ry |
|
Format II: OP1 = Rs, OP2 = SE(imm16) |
|
Q: |
Q = (OP1[31] AND ~OP2[31] AND ~temp[31]) OR (~OP1[31] AND OP2[31] AND temp[31]) OR |
Q |
|
V: |
V = (OP1[31] AND ~OP2[31] AND ~temp[31]) OR (~OP1[31] AND OP2[31] AND temp[31]) |
N: |
N = Rd[31] |
Z: |
Z = (Rd[31:0] == 0) |
C: |
C = 0 |