4.11.2. ADRL pseudo-instruction

Load a program-relative or register-relative address into a register. It is similar to the ADR pseudo-instruction. ADRL can load a wider range of addresses than ADR because it generates two data processing instructions.

Note

ADRL is not available when assembling 16-bit Thumb instructions. Use it only in ARM or Thumb-2 code.

Syntax

ADRL{cond} register,label

where:

cond

is an optional condition code (see Conditional execution).

register

is the register to load.

label

is a program-relative or register-relative expression. See Register-relative and program-relative expressions for more information.

Usage

ADRL always assembles to two 32-bit instructions. Even if the address can be reached in a single instruction, a second, redundant instruction is produced.

If the assembler cannot construct the address in two instructions, it generates an error message and the assembly fails. See LDR pseudo-instruction for information on loading a wider range of addresses (see also Loading constants into registers).

ADRL produces position-independent code, because the address is program-relative or register-relative.

If label is program-relative, it must evaluate to an address in the same assembler area as the ADRL pseudo-instruction, see AREA.

Range

The available range depends on the instruction set in use:

ARM

±64KB to a byte or halfword-aligned address.

±256KB bytes to a word-aligned address.

32-bit Thumb-2

±1MB bytes to a byte, halfword, or word-aligned address.

16-bit Thumb

ADRL is not available.

The given range is relative to a point two words after the address of the current instruction. In ARM and Thumb-2, more distant addresses can be in range if the alignment is 16-bytes or more relative to this point.

Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0204F
Non-Confidential