246
Chapter 42. Xtensa Dependent Features
there are no preceding
ENTRY
instructions or
.literal_position
directives, the assembler will
print a warning and place the literal pool at the beginning of the current section. In such cases,
explicit
.literal_position
directives should be used to place the literal pools.
42.5.6. literal_position
When using
text section literals
to place literals inline in the section being assembled, the
.literal_position
directive can be used to mark a potential location for a literal pool.
.literal_position
The
.literal_position
directive is ignored when the
text section literals
option is not
used.
The assembler will automatically place text section literal pools before
ENTRY
instructions, so the
.literal_position
directive is only needed to specify some other location for a literal pool. You
may need to add an explicit jump instruction to skip over an inline literal pool.
For example, an interrupt vector does not begin with an
ENTRY
instruction so the assembler will be
unable to automatically find a good place to put a literal pool. Moreover, the code for the interrupt
vector must be at a specific starting address, so the literal pool cannot come before the start of the
code. The literal pool for the vector must be explicitly positioned in the middle of the vector (before
any uses of the literals, of course). The
.literal_position
directive can be used to do this. In
the following code, the literal for
M
will automatically be aligned correctly and is placed after the
unconditional jump.
.global M
code_start:
j continue
.literal_position
.align 4
continue:
movi
a4, M
42.5.7. literal_prefix
The
literal_prefix
directive allows you to specify different sections to hold literals from different
portions of an assembly file. With this directive, a single assembly file can be used to generate code
into multiple sections, including literals generated by the assembler.
.begin literal_prefix [name]
.end literal_prefix
For the code inside the delimited region, the assembler puts literals in the section
name.literal
. If
this section does not yet exist, the assembler creates it. The
name
parameter is optional. If
name
is not
specified, the literal prefix is set to the "default" for the file. This default is usually
.literal
but can
be changed with the
rename section
command line argument.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved