[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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-density L: add a0, a1, a2 .begin density M: add a0, a1, a2 .end density N: add a0, a1, a2 .end no-density |
The generic ADD
opcodes at L
and N
in the outer
no-density
region both result in ADD
machine instructions,
but the assembler selects an ADD.N
instruction for the generic
ADD
at M
in the inner density
region.
The advantage of this style is that it works well inside macros which can preserve the context of their callers.
When command-line options and assembler directives are used at the same
time and conflict, the one that overrides a default behavior takes
precedence over one that is the same as the default. For example, if
the code density option is available, the default is to select density
instructions whenever possible. So, if the above is assembled with the
`--no-density' flag, which overrides the default, all the generic
ADD
instructions result in ADD
machine instructions. If
assembled with the `--density' flag, which is already the default,
the no-density
directive takes precedence and only one of
the generic ADD
instructions is optimized to be a ADD.N
machine instruction. An underscore prefix identifying a specific opcode
always takes precedence over directives and command-line flags.
The following directives are available:
8.33.5.1 density Disable Use of Density Instructions. 8.33.5.2 relax Disable Assembler Relaxation. 8.33.5.3 longcalls Use Indirect Calls for Greater Range. 8.33.5.4 generics Disable All Assembler Transformations. 8.33.5.5 literal Intermix Literals with Instructions. 8.33.5.6 literal_position Specify Inline Literal Pool Locations. 8.33.5.7 literal_prefix Specify Literal Section Name Prefix. 8.33.5.8 freeregs List Registers Available for Assembler Use. 8.33.5.9 frame Describe a stack frame.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |