16.12 ADRL pseudo-instruction

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

Syntax

ADRL Wd,label

ADRL Xd,label

where:

Wd

Is the register to load with a 32-bit address.

Xd

Is the register to load with a 64-bit address.

label

Is a PC-relative expression.

Usage

ADRL assembles to two instructions, an ADRP followed by ADD.

If the assembler cannot construct the address in two instructions, it generates a relocation. The linker then generates the correct offsets.

ADRL produces position-independent code, because the address is calculated relative to PC.

Example

      ADRL  x0, mylabel   ; loads address of mylabel into x0
Non-ConfidentialPDF file icon PDF versionDUI0801J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.