Node:Xtensa Options, Next:FRV Options, Previous:Xstormy16 Options, Up:Submodel Options

#### 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.

`-mbig-endian`
`-mlittle-endian`
  Specify big-endian or little-endian byte ordering for the target Xtensa processor.
`-mdensity`
`-mno-density`
  Enable or disable use of the optional Xtensa code density instructions.
`-mmac16`
`-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.
`-mmul16`
`-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.
`-mmul32`
`-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.
`-mnsa`
`-mno-nsa`
  Enable or disable use of the optional normalization shift amount (`NSA`) instructions to implement the built-in `ffs` function.
`-mminmax`
`-mno-minmax`
  Enable or disable use of the optional minimum and maximum value instructions.
`-msext`
`-mno-sext`
  Enable or disable use of the optional sign extend (`SEXT`) instruction.
`-mbooleans`
`-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).
`-mhard-float`
`-msoft-float`
  Enable or disable use of the floating-point option. When enabled, GCC generates floating-point instructions for 32-bit `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 `double` operations are always emulated with calls to library functions.
`-mfused-madd`
`-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 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.
`-mserialize-volatile`
`-mno-serialize-volatile`
  When this option is enabled, GCC inserts `MEMW` instructions before `volatile` memory references to guarantee sequential consistency. The default is `-mserialize-volatile`. Use `-mno-serialize-volatile` to omit the `MEMW` instructions.
`-mtext-section-literals`
`-mno-text-section-literals`
  Control the treatment of literal pools. The default is `-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 `-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.
`-mtarget-align`
`-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 `-mtarget-align`. These options do not affect the treatment of auto-aligned instructions like `LOOP`, which the assembler will always align, either by widening density instructions or by inserting no-op instructions.
`-mlongcalls`
`-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 `CALL` instruction into an `L32R` followed by a `CALLX` instruction. The default is `-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.