Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Machine-Dependent Options   [Contents][Index]


3.21.58 Xtensa Options

These options are supported for Xtensa targets:

-mconst16
-mno-const16

Enable or disable use ofCONST16 instructions for loadingconstant values. When enabled,CONST16 instructions are alwaysused in place of the standardL32R instructions. The use ofCONST16 is enabled by default only if theL32R instructionis not available.

-mserialize-volatile
-mno-serialize-volatile

When this option is enabled, GCC insertsMEMW instructions beforevolatile memory references to guarantee sequential consistency.The default is-mserialize-volatile. Use-mno-serialize-volatile to omit theMEMW instructions.

-mforce-no-pic
-mno-force-no-pic

For targets like GNU/Linux, where all user-mode Xtensa code must beposition-independent code (PIC), this option disables PIC for compilingkernel code.

-mtext-section-literals
-mno-text-section-literals

These options control the treatment of literal pools. The default is-mno-text-section-literals, which places literals in a separatesection in the output file. This allows the literal pool to be placedin a data RAM/ROM, and it also allows the linker to combine literalpools from separate object files to remove redundant literals andimprove code size. With-mtext-section-literals, the literalsare interspersed in the text section in order to keep them as close aspossible to their references. This may be necessary for large assemblyfiles. Literals for each function are placed right before that function.

-mauto-litpools
-mno-auto-litpools

These options control the treatment of literal pools. The default is-mno-auto-litpools, which places literals in a separatesection in the output file unless-mtext-section-literals isused. With-mauto-litpools the literals are interspersed inthe text section by the assembler. Compiler does not produce explicit.literal directives and loads literals into registers withMOVI instructions instead ofL32R to let the assemblerdo relaxation and place literals as necessary. This option allowsassembler to create several literal pools per function and assemblevery big functions, which may not be possible with-mtext-section-literals.

-mtarget-align
-mno-target-align

When this option is enabled, GCC instructs the assembler toautomatically align instructions to reduce branch penalties at theexpense of some code density. The assembler attempts to widen densityinstructions to align branch targets and the instructions following callinstructions. If there are not enough preceding safe densityinstructions to align a target, no widening is performed. Thedefault is-mtarget-align. These options do not affect thetreatment of auto-aligned instructions likeLOOP, which theassembler always aligns, either by widening density instructions orby inserting NOP instructions.

-mlongcalls
-mno-longcalls

When this option is enabled, GCC instructs the assembler to translatedirect calls to indirect calls unless it can determine that the targetof a direct call is in the range allowed by the call instruction. Thistranslation typically occurs for calls to functions in other sourcefiles. Specifically, the assembler translates a directCALLinstruction into anL32R followed by aCALLX instruction.The default is-mno-longcalls. This option should be used inprograms where the call target can potentially be out of range. Thisoption is implemented in the assembler, not the compiler, so theassembly code generated by GCC still shows direct callinstructions—look at the disassembled object code to see the actualinstructions. Note that the assembler uses an indirect call forevery cross-file call, not just those that really are out of range.

-mabi=name

Generate code for the specified ABI. Permissible values are: ‘call0’,‘windowed’. Default ABI is chosen by the Xtensa core configuration.

-mabi=call0

When this option is enabled function parameters are passed in registersa2 througha7, registersa12 througha15 arecaller-saved, and registera15 may be used as a frame pointer.When this version of the ABI is enabled the C preprocessor symbol__XTENSA_CALL0_ABI__ is defined.

-mabi=windowed

When this option is enabled function parameters are passed in registersa10 througha15, and called function rotates register windowby 8 registers on entry so that its arguments are found in registersa2 througha7. Registera7 may be used as a framepointer. Register window is rotated 8 registers back upon return.When this version of the ABI is enabled the C preprocessor symbol__XTENSA_WINDOWED_ABI__ is defined.

-mextra-l32r-costs=n

Specify an extra cost of instruction RAM/ROM access forL32Rinstructions, in clock cycles. This affects, when optimizing for speed,whether loading a constant from literal pool usingL32R orsynthesizing the constant from a small one with a couple of arithmeticinstructions. The default value is 0.

-mstrict-align
-mno-strict-align

Avoid or allow generating memory accesses that may not be aligned on a naturalobject boundary as described in the architecture specification.The default is-mno-strict-align for cores that support bothunaligned loads and stores in hardware and-mstrict-align for allother cores.


Next:zSeries Options, Previous:Xstormy16 Options, Up:Machine-Dependent Options   [Contents][Index]


[8]ページ先頭

©2009-2026 Movatter.jp