4.16 Symbol definition directives

Symbol definition directives declare and set arithmetic, logical, or string variables.

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

Note

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

Table 4-6 Symbol definition directives translation

ARM 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 .reg r11 Define an alias foo for register R11.
foo QN q5.I32 foo .qn q5.i32 Define an I32-typed alias foo for the quad-precision register Q5.
foo DN d2.I32 foo .dn d2.i32 Define an I32-typed alias foo for the double-precision register D2.
Related information
GNU Binutils - Using as: ARM Machine Directives
GNU Binutils - Using as: .global
GNU Binutils - Using as: .set
Non-ConfidentialPDF file icon PDF versionARM DUI0742F
Copyright © 2014-2016 ARM. All rights reserved.