Reverse Subtract without carry.
is an optional suffix. If S is specified, the condition flags are updated on the result of the operation.
is an optional condition code.
is the destination register.
is the register holding the first operand.
is a flexible second operand.
RSB instruction subtracts the
Rn from the value of
This is useful because of the wide range of options for
In certain circumstances, the assembler can substitute one instruction for another. Be aware of this when reading disassembly listings.
Use of PC and SP in T32 instructions
You cannot use PC (
You cannot use SP (
Use of PC and SP in A32 instructions
You cannot use PC for
any operand in an
RSB instruction that
has a register-controlled shift.
Use of PC for any operand, in instructions without register-controlled shift, is deprecated.
If you use PC (
the value used is the address of the instruction plus 8.
If you use PC as
- Execution branches to the address corresponding to the result.
- If you use the S suffix, see the
Use of SP and PC in A32 instructions is deprecated.
If S is specified, the
updates the N, Z, C and V flags according to the result.
The following forms of this instruction are available in T32 code, and are 16-bit instructions:
must both be Lo registers. This form can only be used outside an IT block.
must both be Lo registers. This form can only be used inside an IT block.
RSB r4, r4, #1280 ; subtracts contents of R4 from 1280