2.6.5.1.3 Restrictions
In these instructions:
- Operand2 must not be SP and must not be PC
Rdcan be SP only inADDandSUB, and only with the additional restrictions:Rnmust also be SP- Any shift in Operand2 must be limited to a maximum of 3 bits using
LSL
Rncan be SP only inADDandSUBRdcan be PC only in theADD{cond} PC, PC, Rminstruction where:- You must not specify the
Ssuffix Rmmust not bePCand must not be SP- If the instruction is conditional, it must be the last instruction in the IT block
- You must not specify the
- with the exception of the
ADD{cond} PC, PC, Rminstruction,Rncan be PC only inADDandSUB, and only with the additional restrictions:- You must not specify the
Ssuffix - The second operand must be a constant in the range 0 to 4095
- When using the PC for an addition or a subtraction, bits[1:0] of the PC are rounded to b00 before performing the calculation, making the base address for the calculation word-aligned.
- If you want to generate the address of an instruction, you have to adjust the constant based on the value of the PC. Arm recommends that you use the
ADRinstruction instead ofADDorSUBwithRnequal to the PC, because your assembler automatically calculates the correct constant for theADRinstruction.
- You must not specify the
When Rd is PC in the ADD{cond} PC, PC, Rm instruction:
- Bit[0] of the value written to the PC is ignored
- A branch occurs to the address created by forcing bit[0] of that value to 0
