ARM VERSION 1.2 User Manual

Page 204

Advertising
background image

Thumb Instruction Reference

5-10

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

If your system does not have a system coprocessor (cp15), or alignment checking is
disabled:

A non-aligned load corrupts

Rd

.

A non-aligned save corrupts four bytes in memory. The corrupted location in
memory is [address AND NOT b11].

Architectures

These instructions are available in all T variants of the ARM architecture.

Examples

LDR r2,[pc,#1016]
LDR r5,localdata
LDR r0,[sp,#920]
STR r1,[sp,#20]

Incorrect examples

LDR r13,[pc,#8] ; Rd must be in range r0-r7

STR r7,[pc,#64] ; there is no pc-relative STR instruction

STRH r0,[sp,#16] ; there are no pc- or sp-relative
; halfword or byte transfers

LDR r2,[pc,#81] ; immediate must be a multiple of four

LDR r1,[pc,#-24] ; immediate must not be negative

STR r1,[sp,#1024] ; maximum immediate value is 1020

Advertising