* doc/c-xtensa.texi (Xtensa Options, Absolute Literals Directive):

Remove comments about placement of literal pools.
	(Literal Directive): Update description of literal placement.
	(Literal Prefix Directive): Remove statement that this does not apply
	to absolute-mode literals.  Describe new section naming scheme.
This commit is contained in:
Bob Wilson 2004-10-14 22:58:33 +00:00
parent 98b4dd9401
commit 40e7b7b9ef
2 changed files with 47 additions and 28 deletions

View File

@ -1,3 +1,11 @@
2004-10-14 Bob Wilson <bob.wilson@acm.org>
* doc/c-xtensa.texi (Xtensa Options, Absolute Literals Directive):
Remove comments about placement of literal pools.
(Literal Directive): Update description of literal placement.
(Literal Prefix Directive): Remove statement that this does not apply
to absolute-mode literals. Describe new section naming scheme.
2004-10-12 Bob Wilson <bob.wilson@acm.org> 2004-10-12 Bob Wilson <bob.wilson@acm.org>
* config/tc-xtensa.c (xtensa_frequency_pseudo): Use set_subseg_freq. * config/tc-xtensa.c (xtensa_frequency_pseudo): Use set_subseg_freq.

View File

@ -54,9 +54,7 @@ Indicate to the assembler whether @code{L32R} instructions use absolute
or PC-relative addressing. If the processor includes the absolute or PC-relative addressing. If the processor includes the absolute
addressing option, the default is to use absolute @code{L32R} addressing option, the default is to use absolute @code{L32R}
relocations. Otherwise, only the PC-relative @code{L32R} relocations relocations. Otherwise, only the PC-relative @code{L32R} relocations
can be used. Literals referenced with absolute @code{L32R} relocations can be used.
are always placed in the @code{.lit4} section, independent of the
placement of PC-relative literals.
@item --target-align | --no-target-align @item --target-align | --no-target-align
@kindex --target-align @kindex --target-align
@ -616,17 +614,17 @@ can be used to load a pointer to the symbol @code{sym} into register
the data in a literal pool. the data in a literal pool.
Literal pools for absolute mode @code{L32R} instructions Literal pools for absolute mode @code{L32R} instructions
(@pxref{Absolute Literals Directive}) are always placed in the (@pxref{Absolute Literals Directive}) are placed in a seperate
@code{.lit4} section. By default literal pools for PC-relative mode @code{.lit4} section. By default literal pools for PC-relative mode
@code{L32R} instructions are placed in a separate section; however, when @code{L32R} instructions are placed in a separate @code{.literal}
using the @samp{--text-@-section-@-literals} option (@pxref{Xtensa section; however, when using the @samp{--text-@-section-@-literals}
Options, ,Command Line Options}), the literal pools are placed in the option (@pxref{Xtensa Options, ,Command Line Options}), the literal
current section. These text section literal pools are created pools are placed in the current section. These text section literal
automatically before @code{ENTRY} instructions and manually after pools are created automatically before @code{ENTRY} instructions and
@samp{.literal_position} directives (@pxref{Literal Position Directive, manually after @samp{.literal_position} directives (@pxref{Literal
,literal_position}). If there are no preceding @code{ENTRY} Position Directive, ,literal_position}). If there are no preceding
instructions, explicit @code{.literal_position} directives @code{ENTRY} instructions, explicit @code{.literal_position} directives
must be used to place the text section literal pools; otherwise, must be used to place the text section literal pools; otherwise,
@command{@value{AS}} will report an error. @command{@value{AS}} will report an error.
@node Literal Position Directive @node Literal Position Directive
@ -679,9 +677,6 @@ continue:
The @code{literal_prefix} directive allows you to specify different The @code{literal_prefix} directive allows you to specify different
sections to hold literals from different portions of an assembly file. sections to hold literals from different portions of an assembly file.
This directive only applies to literals referenced from PC-relative
@code{L32R} instructions; it has no effect for absolute literals
(@pxref{Absolute Literals Directive}).
With this directive, a single assembly file can be used to generate code With this directive, a single assembly file can be used to generate code
into multiple sections, including literals generated by the assembler. into multiple sections, including literals generated by the assembler.
@ -690,13 +685,34 @@ into multiple sections, including literals generated by the assembler.
.end literal_prefix .end literal_prefix
@end smallexample @end smallexample
For the code inside the delimited region, the assembler puts literals in By default the assembler places literal pools in sections separate from
the section @code{@var{name}.literal}. If this section does not yet the instructions, using the default literal section names of
exist, the assembler creates it. The @var{name} parameter is @code{.literal} for PC-relative mode @code{L32R} instructions and
optional. If @var{name} is not specified, the literal prefix is set to @code{.lit4} for absolute mode @code{L32R} instructions (@pxref{Absolute
the ``default'' for the file. This default is usually @code{.literal} Literals Directive}). The @code{literal_prefix} directive causes
but can be changed with the @samp{--rename-section} command-line different literal sections to be used for the code inside the delimited
argument. region. The new literal sections are determined by including @var{name}
as a prefix to the default literal section names. If the @var{name}
argument is omitted, the literal sections revert to the defaults. This
directive has no effect when using the
@samp{--text-@-section-@-literals} option (@pxref{Xtensa Options,
,Command Line Options}).
Except for two special cases, the assembler determines the new literal
sections by simply prepending @var{name} to the default section names,
resulting in @code{@var{name}.literal} and @code{@var{name}.lit4}
sections. The @code{literal_prefix} directive is often used with the
name of the current text section as the prefix argument. To facilitate
this usage, the assembler uses special case rules when it recognizes
@var{name} as a text section name. First, if @var{name} ends with
@code{.text}, that suffix is not included in the literal section name.
For example, if @var{name} is @code{.iram0.text}, then the literal
sections will be @code{.iram0.literal} and @code{.iram0.lit4}. Second,
if @var{name} begins with @code{.gnu.linkonce.t.}, then the literal
section names are formed by replacing the @code{.t} substring with
@code{.literal} and @code{.lit4}. For example, if @var{name} is
@code{.gnu.linkonce.t.func}, the literal sections will be
@code{.gnu.linkonce.literal.func} and @code{.gnu.linkonce.lit4.func}.
@node Absolute Literals Directive @node Absolute Literals Directive
@subsection absolute-literals @subsection absolute-literals
@ -721,11 +737,6 @@ To change the @code{L32R} mode, the program must write the
to keep track of the mode and indicate to the assembler which mode is to keep track of the mode and indicate to the assembler which mode is
used in each region of code. used in each region of code.
Literals referenced with absolute @code{L32R} instructions are always
placed in the @code{.lit4} section. PC-relative literals may be placed
in the current text section or in a separate literal section, as
described elsewhere (@pxref{Literal Directive}).
If the Xtensa configuration includes the absolute @code{L32R} addressing If the Xtensa configuration includes the absolute @code{L32R} addressing
option, the default is to assume absolute @code{L32R} addressing unless option, the default is to assume absolute @code{L32R} addressing unless
the @samp{--no-@-absolute-@-literals} command-line option is specified. the @samp{--no-@-absolute-@-literals} command-line option is specified.