3.6.6. Register-relative and program-relative expressions

A register-relative expression evaluates to a named register plus or minus a numeric constant (see MAP).

A program relative address is expressed as an offset from the current Program Counter (PC). It is normally a label combined with a numeric expression.

The following steps shows what the program-relative address evaluates to:

  1. the address of the instruction following the currently executing instruction

  2. bitwise OR with 0xFFFFFFFC (this makes no difference in ARM code)

  3. plus or minus the numeric constant.


        LDR     r4,=data+4*n    ; n is an assembly-time variable
        ; code
        MOV     pc,lr
data    DCD     value_0
        ; n-1 DCD directives
        DCD     value_n         ; data+4*n points here
        ; more DCD directives
Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0204J