Keil Logo

Symbol definition directives

5.19 Symbol definition directives

In armasm, symbol definition directives declare and set arithmetic, logical, or string variables. In the GNU assembler syntax, these directives define ELF symbols. There are no direct GNU syntax equivalents for armasm variables.

The following table shows how to translate armasm syntax symbol definition directives to GNU syntax directives:

Note:

This list only contains examples of common symbol definition directives. It is not exhaustive.

Table 5-9 Symbol definition directives translation

armasm syntax directive GNU syntax directive Description
foo RN 11 foo .req r11 Define an alias foo for register R11.
foo QN q5.I32
VADD foo, foo, foo
foo .req q5
VADD.I32 foo, foo, foo

Define an I32-typed alias foo for the quad-precision register Q5.

When using the armasm syntax, you can specify a typed alias for quad-precision registers. The example defines an I32-typed alias foo for the quad-precision register Q5.

When using GNU syntax, you must specify the type on the instruction rather than on the register. The example specifies the I32 type on the VADD instruction.

foo DN d2.I32
VADD foo, foo, foo
foo .req d2
VADD.I32 foo, foo, foo

Define an I32-typed alias foo for the double-precision register D2.

When using the armasm syntax, you can specify a typed alias for double-precision registers. The example defines an I32-typed alias foo for the double-precision register D2.

When using GNU syntax, you must specify the type on the instruction rather than on the register. The example specifies the I32 type on the VADD instruction.

Non-ConfidentialPDF file icon PDF version100068_0616_01_en
Copyright © 2014–2021 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.