ARM指令的三种寻址模式:
1)基址偏移
LDR R1,[R2,#-0x10]
2)基址偏移前变址
LDR R1,[R2,#-0x10]! // R1 =*(R2-0x10),R2=R2-0x10
3)基址偏移后变址
LDR R1,[R2],#-0x10 // R1 =*(R2),R2=R2-0x10;
A8.5 Memory accesses
Commonly, the following addressing modes are permitted for memory access instructions:
Offset addressing
The offset value is applied to an address obtained from the base register. The result is used as the
address for the memory access. The value of the base register is unchanged.
The assembly language syntax for this mode is:
[, ]
Pre-indexed addressing
The offset value is applied to an address obtained from the base register. The result is used as the
address for the memory access, and written back into the base register.
The assembly language syntax for this mode is:
[, ]!
Post-indexed addressing