This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Xtensa port, part 4: documentation changes
Thank you for your quick response and good feedback. I've made all the
changes you suggested. I'm not sure if the discretionary hyphens are
needed -- we use a heavily customized version of the texinfo macros to
generate printed documentation and had "overfull hbox" problems. I've
removed the hyphens for now.
The revised patch is attached. Here is the associated Changelog again:
* doc/invoke.texi: Add Xtensa options.
* doc/md.texi: Add Xtensa machine constraints.
Joseph S. Myers wrote:
> On Fri, 30 Nov 2001, Bob Wilson wrote:
>
>
>>+ @emph{Xtensa Options}
>>+ -mbig-endian -mlittle-endian
>>
>
> This list should be inside @gccoptlist and with lines terminated with
> @gol. This is to support manpage generation.
>
>
>>+ The Xtensa architecture is designed to support many different
>>+ configurations. The compiler's default options can be set to match a
>>+ particular Xtensa configuration by copying a configuration file into the
>>+ GCC sources when building GCC. The @samp{-m} options below may be used
>>
>
> "@." for full stops at ends of sentences following a capital letter.
>
>
>>+ @table @code
>>
>
> This should be @table @gcctabopt.
>
>
>>+ @item -mbig-endian
>>+ @itemx -mlittle-endian
>>
>
> In general, options need indexing with @opindex.
>
>
>>+ Enable or disable use of the optional normalization shift amount
>>+ (@code{NSA}) instructions to implement the built-in @samp{ffs} function.
>>
>
> @code{ffs}.
>
>
>>+ @item -mfused-madd
>>+ @itemx -mno-fused-madd
>>+ Enable or disable use of fused multiply/add and multiply/subtract
>>+ instructions in the floating-point option. This has no effect if the
>>
>
> Just a note, we should probably implement the C99 fma functions as
> built-in functions (which expand to such an instruction if available,
> otherwise just call the external library function). The default for this
> option should depend on the FP_CONTRACT pragma - which however we don't
> yet support.
>
>
>>+ The default is @samp{-mserialize-@-volatile}. Use
>>+ @samp{-mno-@-serialize-@-volatile} to omit the @code{MEMW} instructions.
>>
>
> The option names in the text should be the same as those in the @item
> lines, inside @option (not @samp). Do you actually need discretionary
> hyphens here?
>
>
>>+ Control the treatment of literal pools. The default is
>>+ @samp{--no-@-text-@-section-@-literals}, which places literals in a
>>+ separate section in the output file. This allows the literal pool to be
>>+ placed in a data RAM/ROM, and it also allows the linker to combine literal
>>+ pools from separate object files to remove redundant literals and
>>+ improve code size. With @samp{--text-@-section-@-literals}, the
>>
>
> Likewise.
cvs server: Diffing .
Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.3.2.31
diff -c -3 -p -r1.3.2.31 invoke.texi
*** invoke.texi 2001/11/14 22:33:37 1.3.2.31
--- invoke.texi 2001/12/01 00:14:59
*************** in the following sections.
*** 586,591 ****
--- 586,609 ----
-msmall-exec -mno-small-exec -mmvcle -mno-mvcle @gol
-m64 -m31 -mdebug -mno-debug}
+ @emph{Xtensa Options}
+ @gccoptlist{
+ -mbig-endian -mlittle-endian @gol
+ -mdensity -mno-density @gol
+ -mmac16 -mno-mac16 @gol
+ -mmul16 -mno-mul16 @gol
+ -mmul32 -mno-mul32 @gol
+ -mnsa -mno-nsa @gol
+ -mminmax -mno-minmax @gol
+ -msext -mno-sext @gol
+ -mbooleans -mno-booleans @gol
+ -mhard-float -msoft-float @gol
+ -mfused-madd -mno-fused-madd @gol
+ -mserialize-volatile -mno-serialize-volatile @gol
+ -mtext-section-literals -mno-text-section-literals @gol
+ -mtarget-align -mno-target-align @gol
+ -mlongcalls -mno-longcalls}
+
@item Code Generation Options
@xref{Code Gen Options,,Options for Code Generation Conventions}.
@gccoptlist{
*************** that macro, which enables you to change
*** 4974,4979 ****
--- 4992,4998 ----
* IA-64 Options::
* D30V Options::
* S/390 and zSeries Options::
+ * Xtensa Options::
@end menu
@node M680x0 Options
*************** use a @code{mvc} loop instead. This is
*** 8941,8949 ****
@opindex mno-debug
Print (or do not print) additional debug information when compiling.
The default is to not print debug information.
-
@end table
@node Code Gen Options
@section Options for Code Generation Conventions
--- 8960,9139 ----
@opindex mno-debug
Print (or do not print) additional debug information when compiling.
The default is to not print debug information.
@end table
+ @node Xtensa Options
+ @subsection Xtensa Options
+ @cindex Xtensa Options
+
+ The Xtensa architecture is designed to support many different
+ configurations. The compiler's default options can be set to match a
+ particular Xtensa configuration by copying a configuration file into the
+ GCC sources when building GCC@. The options below may be used to
+ override the default options.
+
+ @table @gcctabopt
+ @item -mbig-endian
+ @itemx -mlittle-endian
+ @opindex mbig-endian
+ @opindex mlittle-endian
+ Specify big-endian or little-endian byte ordering for the target Xtensa
+ processor.
+
+ @item -mdensity
+ @itemx -mno-density
+ @opindex mdensity
+ @opindex mno-density
+ Enable or disable use of the optional Xtensa code density instructions.
+
+ @item -mmac16
+ @itemx -mno-mac16
+ @opindex mmac16
+ @opindex mno-mac16
+ Enable or disable use of the Xtensa MAC16 option. When enabled, GCC
+ will generate MAC16 instructions from standard C code, with the
+ limitation that it will use neither the MR register file nor any
+ instruction that operates on the MR registers. When this option is
+ disabled, GCC will translate 16-bit multiply/accumulate operations to a
+ combination of core instructions and library calls, depending on whether
+ any other multiplier options are enabled.
+
+ @item -mmul16
+ @itemx -mno-mul16
+ @opindex mmul16
+ @opindex mno-mul16
+ Enable or disable use of the 16-bit integer multiplier option. When
+ enabled, the compiler will generate 16-bit multiply instructions for
+ multiplications of 16 bits or smaller in standard C code. When this
+ option is disabled, the compiler will either use 32-bit multiply or
+ MAC16 instructions if they are available or generate library calls to
+ perform the multiply operations using shifts and adds.
+
+ @item -mmul32
+ @itemx -mno-mul32
+ @opindex mmul32
+ @opindex mno-mul32
+ Enable or disable use of the 32-bit integer multiplier option. When
+ enabled, the compiler will generate 32-bit multiply instructions for
+ multiplications of 32 bits or smaller in standard C code. When this
+ option is disabled, the compiler will generate library calls to perform
+ the multiply operations using either shifts and adds or 16-bit multiply
+ instructions if they are available.
+
+ @item -mnsa
+ @itemx -mno-nsa
+ @opindex mnsa
+ @opindex mno-nsa
+ Enable or disable use of the optional normalization shift amount
+ (@code{NSA}) instructions to implement the built-in @code{ffs} function.
+
+ @item -mminmax
+ @itemx -mno-minmax
+ @opindex mminmax
+ @opindex mno-minmax
+ Enable or disable use of the optional minimum and maximum value
+ instructions.
+
+ @item -msext
+ @itemx -mno-sext
+ @opindex msext
+ @opindex mno-sext
+ Enable or disable use of the optional sign extend (@code{SEXT})
+ instruction.
+
+ @item -mbooleans
+ @itemx -mno-booleans
+ @opindex mbooleans
+ @opindex mno-booleans
+ Enable or disable support for the boolean register file used by Xtensa
+ coprocessors. This is not typically useful by itself but may be
+ required for other options that make use of the boolean registers (e.g.,
+ the floating-point option).
+
+ @item -mhard-float
+ @itemx -msoft-float
+ @opindex mhard-float
+ @opindex msoft-float
+ Enable or disable use of the floating-point option. When enabled, GCC
+ generates floating-point instructions for 32-bit @code{float}
+ operations. When this option is disabled, GCC generates library calls
+ to emulate 32-bit floating-point operations using integer instructions.
+ Regardless of this option, 64-bit @code{double} operations are always
+ emulated with calls to library functions.
+
+ @item -mfused-madd
+ @itemx -mno-fused-madd
+ @opindex mfused-madd
+ @opindex mno-fused-madd
+ Enable or disable use of fused multiply/add and multiply/subtract
+ instructions in the floating-point option. This has no effect if the
+ floating-point option is not also enabled. Disabling fused multiply/add
+ and multiply/subtract instructions forces the compiler to use separate
+ instructions for the multiply and add/subtract operations. This may be
+ desirable in some cases where strict IEEE 754-compliant results are
+ required: the fused multiply add/subtract instructions do not round the
+ intermediate result, thereby producing results with @emph{more} bits of
+ precision than specified by the IEEE standard. Disabling fused multiply
+ add/subtract instructions also ensures that the program output is not
+ sensitive to the compiler's ability to combine multiply and add/subtract
+ operations.
+
+ @item -mserialize-volatile
+ @itemx -mno-serialize-volatile
+ @opindex mserialize-volatile
+ @opindex mno-serialize-volatile
+ When this option is enabled, GCC inserts @code{MEMW} instructions before
+ @code{volatile} memory references to guarantee sequential consistency.
+ The default is @option{-mserialize-volatile}. Use
+ @option{-mno-serialize-volatile} to omit the @code{MEMW} instructions.
+
+ @item -mtext-section-literals
+ @itemx -mno-text-section-literals
+ @opindex mtext-section-literals
+ @opindex mno-text-section-literals
+ Control the treatment of literal pools. The default is
+ @option{-mno-text-section-literals}, which places literals in a separate
+ section in the output file. This allows the literal pool to be placed
+ in a data RAM/ROM, and it also allows the linker to combine literal
+ pools from separate object files to remove redundant literals and
+ improve code size. With @option{-mtext-section-literals}, the literals
+ are interspersed in the text section in order to keep them as close as
+ possible to their references. This may be necessary for large assembly
+ files.
+
+ @item -mtarget-align
+ @itemx -mno-target-align
+ @opindex mtarget-align
+ @opindex mno-target-align
+ When this option is enabled, GCC instructs the assembler to
+ automatically align instructions to reduce branch penalties at the
+ expense of some code density. The assembler attempts to widen density
+ instructions to align branch targets and the instructions following call
+ instructions. If there are not enough preceding safe density
+ instructions to align a target, no widening will be performed. The
+ default is @option{-mtarget-align}. These options do not affect the
+ treatment of auto-aligned instructions like @code{LOOP}, which the
+ assembler will always align, either by widening density instructions or
+ by inserting no-op instructions.
+
+ @item -mlongcalls
+ @itemx -mno-longcalls
+ @opindex mlongcalls
+ @opindex mno-longcalls
+ When this option is enabled, GCC instructs the assembler to translate
+ direct calls to indirect calls unless it can determine that the target
+ of a direct call is in the range allowed by the call instruction. This
+ translation typically occurs for calls to functions in other source
+ files. Specifically, the assembler translates a direct @code{CALL}
+ instruction into an @code{L32R} followed by a @code{CALLX} instruction.
+ The default is @option{-mno-longcalls}. This option should be used in
+ programs where the call target can potentially be out of range. This
+ option is implemented in the assembler, not the compiler, so the
+ assembly code generated by GCC will still show direct call
+ instructions---look at the disassembled object code to see the actual
+ instructions. Note that the assembler will use an indirect call for
+ every cross-file call, not just those that really will be out of range.
+ @end table
@node Code Gen Options
@section Options for Code Generation Conventions
Index: md.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/md.texi,v
retrieving revision 1.1.2.12
diff -c -3 -p -r1.1.2.12 md.texi
*** md.texi 2001/10/09 23:14:18 1.1.2.12
--- md.texi 2001/12/01 00:15:02
*************** Symbolic constant suitable for use with
*** 1948,1953 ****
--- 1948,1978 ----
@end table
+ @item Xtensa---@file{xtensa.h}
+ @table @code
+ @item a
+ General-purpose 32-bit register
+
+ @item b
+ One-bit boolean register
+
+ @item A
+ MAC16 40-bit accumulator register
+
+ @item I
+ Signed 12-bit integer constant, for use in MOVI instructions
+
+ @item J
+ Signed 8-bit integer constant, for use in ADDI instructions
+
+ @item K
+ Integer constant valid for BccI instructions
+
+ @item L
+ Unsigned constant valid for BccUI instructions
+
+ @end table
+
@end table
@ifset INTERNALS
cvs server: Diffing include