Keil Logo

PC-relative addressing

5.12 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 version100068_0613_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.