5.16 Symbol definition directives

Symbol definition directives declare and set arithmetic, logical, or string 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-6 Symbol definition directives translation

armasm syntax directive GNU syntax directive Description
LCLA var No GNU equivalent Declare a local arithmetic variable, and initialize its value to 0.
LCLL var No GNU equivalent Declare a local logical variable, and initialize its value to FALSE.
LCLS var No GNU equivalent Declare a local string variable, and initialize its value to a null string.
No armasm equivalent

.set var, 0

Declare a static arithmetic variable, and initialize its value to 0.
No armasm equivalent

.set var, FALSE

Declare a static logical variable, and initialize its value to FALSE.
No armasm equivalent

.set var, ""

Declare a static string variable, and initialize its value to a null string.
GBLA var

.global var

.set var, 0

Declare a global arithmetic variable, and initialize its value to 0.
GBLL var

.global var

.set var, FALSE

Declare a global logical variable, and initialize its value to FALSE.
GBLS var

.global var

.set var, ""

Declare a global string variable, and initialize its value to a null string.
var SETA expr .set var, expr Set the value of an arithmetic variable.
var SETL expr .set var, expr Set the value of a logical variable.
var SETS expr .set var, expr Set the value of a string variable.
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 versionDUI0742J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.