4.12 Conditional directives

Conditional directives let you specify conditions that control whether or not to assemble a sequence of assembly code.

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

Table 4-2 Conditional directive translation

ARM syntax directive GNU syntax directive
IF .if
IF :DEF: .ifdef
IF :LNOT::DEF: .ifndef
ELSE .else
ELSEIF .elseif
ENDIF .endif
Related information
GNU Binutils - Using as: .if
GNU Binutils - Using as: .else
GNU Binutils - Using as: .elseif
GNU Binutils - Using as: .endif
armasm User Guide: IF, ELSE, ENDIF, and ELIF
Non-ConfidentialPDF file icon PDF versionARM DUI0742F
Copyright © 2014-2016 ARM. All rights reserved.