Next: , Previous: Xtensa Options, Up: Xtensa-Dependent

8.34.2 Assembler Syntax

Block comments are delimited by `/*' and `*/'. End of line comments may be introduced with either `#' or `//'.

Instructions consist of a leading opcode or macro name followed by whitespace and an optional comma-separated list of operands:

     opcode [operand, ...]

Instructions must be separated by a newline or semicolon.

FLIX instructions, which bundle multiple opcodes together in a single instruction, are specified by enclosing the bundled opcodes inside braces:

     opcode0 [operands]
     opcode1 [operands]
     opcode2 [operands]

The opcodes in a FLIX instruction are listed in the same order as the corresponding instruction slots in the TIE format declaration. Directives and labels are not allowed inside the braces of a FLIX instruction. A particular TIE format name can optionally be specified immediately after the opening brace, but this is usually unnecessary. The assembler will automatically search for a format that can encode the specified opcodes, so the format name need only be specified in rare cases where there is more than one applicable format and where it matters which of those formats is used. A FLIX instruction can also be specified on a single line by separating the opcodes with semicolons:

     { [format;] opcode0 [operands]; opcode1 [operands]; opcode2 [operands]; ... }

The assembler can automatically bundle opcodes into FLIX instructions. It encodes the opcodes in order, one at a time, choosing the smallest format where each opcode can be encoded and filling unused instruction slots with no-ops.