Using R15 As An Operand - Samsung S3C2500B User Manual

Table of Contents

Advertisement

S3C2500B
Examples
Hi-Register Operations
ADD
R4, R12
MOV
Branch and Exchange
ADR
MOV
BX
...
ALIGN
CODE32
outofTHUMB

3.24.4 USING R15 AS AN OPERAND

If R15 is used as an operand, the value will be the address of the instruction + 4 with bit 0 cleared. Executing a
BX PC in THUMB state from a non-word aligned address will result in unpredictable execution.
PC, R5
R15, R14
R1,outofTHUMB
R11,R1
R11
; PC := PC + R5 but don't set the condition codes.CMP
; Set the condition codes on the result of R4 - R12.
; Move R14 (LR) into R15 (PC)
; but don't set the condition codes,
; eg. return from subroutine.
; Switch from THUMB to ARM state.
; Load address of outofTHUMB into R1.
; Transfer the contents of R11 into the PC.
; Bit 0 of R11 determines whether
; ARM or THUMB state is entered, ie. ARM state here.
; Now processing ARM instructions...
INSTRUCTION SET
3-75

Advertisement

Table of Contents
loading

Table of Contents