Samsung S3C2440A User Manual
Page 136

S3C2440A RISC MICROPROCESSOR
THUMB INSTRUCTION SET
4-15
EXAMPLES
Hi-Register Operations
ADD
PC, R5
; PC := PC + R5 but don't set the condition codes.
CMP
R4, R12
; Set the condition codes on the result of R4 - R12.
MOV
R15, R14
; Move R14 (LR) into R15 (PC) but don't set the condition
codes, eg. return from subroutine.
Branch and Exchange
; Switch from THUMB to ARM state.
ADR
R1,outofTHUMB
; Load address of outofTHUMB into R1.
MOV
R11,R1
BX
R11
; Transfer the contents of R11 into the PC.
; Bit 0 of R11 determines whether
; ARM or THUMB state is entered, ie. In this case the
state
is
ARM.
ALIGN
CODE32
outofTHUMB
; Now processing ARM instructions...
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.
- NC10 (12 pages)
- GT-P7300 (133 pages)
- M6000 (130 pages)
- M60 (201 pages)
- P55 (172 pages)
- Tablet (44 pages)
- Q45c (199 pages)
- Galaxy Tab 8.9 (188 pages)
- X22 (197 pages)
- Q46 (194 pages)
- GT-P7100 (108 pages)
- R71 (196 pages)
- Q71 (191 pages)
- M55 (161 pages)
- GT-P6210 (200 pages)
- V1.3.0 (26 pages)
- Q35 (157 pages)
- 8.9 (176 pages)
- X65 (195 pages)
- Galaxy Tab A3LSGHI987 (146 pages)
- GALAXY Tab SGH-I987 (149 pages)
- Q30 (127 pages)
- NP270E5V (27 pages)
- NP670Z5E (157 pages)
- NP270E5GI (134 pages)
- NP275E5E (135 pages)
- NP535U3C (154 pages)
- NP370R5E (133 pages)
- XE500T1C (117 pages)
- XE500T1C (122 pages)
- NP270E5UE (27 pages)
- NP930X5J-S01US (115 pages)
- NP930X5J-S01US (149 pages)
- NP900X4D-A03US (129 pages)
- NP900X3D-A03US (138 pages)
- NP470R5E-K01UB (120 pages)
- NP470R5E-K01UB (126 pages)
- NP470R5E-K01UB (125 pages)
- NP700Z3C-S01US (156 pages)
- NP355V4C-A01VE (140 pages)
- NP940X3G-S01US (149 pages)
- NP940X3G-S01US (147 pages)
- NP915S3G-K02US (118 pages)
- NP915S3G-K02US (145 pages)