[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.34.5 Directives

The Xtensa assember supports a region-based directive syntax:

 
    .begin directive [options]
    ...
    .end directive

All the Xtensa-specific directives that apply to a region of code use this syntax.

The directive applies to code between the .begin and the .end. The state of the option after the .end reverts to what it was before the .begin. A nested .begin/.end region can further change the state of the directive without having to be aware of its outer state. For example, consider:

 
    .begin no-transform
L:  add a0, a1, a2
    .begin transform
M:  add a0, a1, a2
    .end transform
N:  add a0, a1, a2
    .end no-transform

The ADD opcodes at L and N in the outer no-transform region both result in ADD machine instructions, but the assembler selects an ADD.N instruction for the ADD at M in the inner transform region.

The advantage of this style is that it works well inside macros which can preserve the context of their callers.

The following directives are available:

8.34.5.1 schedule  Enable instruction scheduling.
8.34.5.2 longcalls  Use Indirect Calls for Greater Range.
8.34.5.3 transform  Disable All Assembler Transformations.
8.34.5.4 literal  Intermix Literals with Instructions.
8.34.5.5 literal_position  Specify Inline Literal Pool Locations.
8.34.5.6 literal_prefix  Specify Literal Section Name Prefix.
8.34.5.7 absolute-literals  Control PC-Relative vs. Absolute Literals.



This document was generated by system on July, 22 2007 using texi2html