Intel XScale(R) technology topicImmediate Offset (AM 2)

Syntax

[basereg, #+/-value]

where:

 basereg

Specifies a register containing the base address.

 value

Specifies the 12-bit immediate offset used with the value of basereg to form the address.

Description

The addressing mode "immediate offset" performs the following operation (pseudo-code description):

if U == 1 then
  addr = basereg + value
else /* U == 0 */
  addr = basereg - value

This addressing mode calculates an address by adding or subtracting the value of an immediate offset to or from the value of the base register basereg . It is used for accessing structure fields, and accessing parameters and local variables in a stack frame. If the offset is zero, the address generated is the value of the base register basereg .

Encoding

31

 

 

28

27

26

25

24

23

22

21

20

19

 

 

16

 condition

 0

 1

 0

 1

 U

 B

 0

 L

 basereg

15

 

 

12

11

 

 

 

 

 

 

 

 

 

 

0

 dest

 value

The B bit indicates an unsigned byte ( B == 1 ) or a word access ( B == 0 ).

The L bit indicates a Load ( L == 1 ) or a Store ( L == 0 ) instruction.

Note

The syntax [basereg] is treated as an abbreviation for [basereg, #0] . If the instruction is one of the instructions that permit only post-indexed addressing modes ( LDRBT , LDRT , STRBT , or STRT ), the syntax [basereg] is not treated as an abbreviation for [basereg, #0] .

If R15 is specified as register basereg , the value used is the address of the current instruction plus 8.

Example

LDR    R3, [R1, #0xFF]

Further Information

See Addressing Mode 2: Load and Store Word or Unsigned Byte
See Assembler Instructions