5.11 PC-relative addressing

armasm syntax assembly and GNU syntax assembly provide different methods for performing PC-relative addressing.

armasm syntax

armasm syntax assembly provides the symbol {pc} to let you specify an address relative to the current instruction.

For example:

ADRP x0, {pc}

GNU syntax

GNU syntax assembly does not support the {pc} symbol. Instead, it uses the special dot "." character, as follows:

ADRP x0, .
Non-ConfidentialPDF file icon PDF versionDUI0742J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.