Movatterモバイル変換


[0]ホーム

URL:


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


3.21.45 S/390 and zSeries Options

These are the ‘-m’ options defined for the S/390 and zSeries architecture.

-mhard-float
-msoft-float

Use (do not use) the hardware floating-point instructions and registersfor floating-point operations. When-msoft-float is specified,functions inlibgcc.a are used to perform floating-pointoperations. When-mhard-float is specified, the compilergenerates IEEE floating-point instructions. This is the default.

-mhard-dfp
-mno-hard-dfp

Use (do not use) the hardware decimal-floating-point instructions fordecimal-floating-point operations. When-mno-hard-dfp isspecified, functions inlibgcc.a are used to performdecimal-floating-point operations. When-mhard-dfp isspecified, the compiler generates decimal-floating-point hardwareinstructions. This is the default for-march=z9-ec or higher.

-mlong-double-64
-mlong-double-128

These switches control the size oflong double type. A sizeof 64 bits makes thelong double type equivalent to thedoubletype. This is the default.

-mbackchain
-mno-backchain

Store (do not store) the address of the caller’s frame as backchain pointerinto the callee’s stack frame.A backchain may be needed to allow debugging using tools that do not understandDWARF call frame information.When-mno-packed-stack is in effect, the backchain pointer is storedat the bottom of the stack frame; when-mpacked-stack is in effect,the backchain is placed into the topmost word of the 96/160 byte registersave area.

In general, code compiled with-mbackchain is call-compatible withcode compiled with-mno-backchain; however, use of the backchainfor debugging purposes usually requires that the whole binary is built with-mbackchain. Note that the combination of-mbackchain,-mpacked-stack and-mhard-float is not supported. In orderto build a linux kernel use-msoft-float.

The default is to not maintain the backchain.

-mpacked-stack
-mno-packed-stack

Use (do not use) the packed stack layout. When-mno-packed-stack isspecified, the compiler uses the all fields of the 96/160 byte register savearea only for their default purpose; unused fields still take up stack space.When-mpacked-stack is specified, register save slots are denselypacked at the top of the register save area; unused space is reused for otherpurposes, allowing for more efficient use of the available stack space.However, when-mbackchain is also in effect, the topmost word ofthe save area is always used to store the backchain, and the return addressregister is always saved two words below the backchain.

As long as the stack frame backchain is not used, code generated with-mpacked-stack is call-compatible with code generated with-mno-packed-stack. Note that some non-FSF releases of GCC 2.95 forS/390 or zSeries generated code that uses the stack frame backchain at runtime, not just for debugging purposes. Such code is not call-compatiblewith code compiled with-mpacked-stack. Also, note that thecombination of-mbackchain,-mpacked-stack and-mhard-float is not supported. In orderto build a linux kernel use-msoft-float.

The default is to not use the packed stack layout.

-msmall-exec
-mno-small-exec

Generate (or do not generate) code using thebras instructionto do subroutine calls.This only works reliably if the total executable size does notexceed 64k. The default is to use thebasr instruction instead,which does not have this limitation.

-m64
-m31

When-m31 is specified, generate code compliant to theGNU/Linux for S/390 ABI. When-m64 is specified, generatecode compliant to the GNU/Linux for zSeries ABI. This allows GCC inparticular to generate 64-bit instructions. For the ‘s390’targets, the default is-m31, while the ‘s390x’targets default to-m64. Note,-m31 is deprecated andsupport will be removed.

-mzarch
-mesa

When-mzarch is specified, generate code using theinstructions available on z/Architecture.When-mesa is specified, generate code using theinstructions available on ESA/390. Note that-mesa isnot possible with-m64.When generating code compliant to the GNU/Linux for S/390 ABI,the default is-mesa. When generating code compliantto the GNU/Linux for zSeries ABI, the default is-mzarch.

-mhtm
-mno-htm

The-mhtm option enables a set of builtins making use ofinstructions available with the transactional execution facilityintroduced with the IBM zEnterprise EC12 machine generationS/390 System z Built-in Functions.-mhtm is enabled by default when using-march=zEC12.

-mvx
-mno-vx

When-mvx is specified, generate code using the instructionsavailable with the vector extension facility introduced with the IBMz13 machine generation.This option changes the ABI for some vector type values with regard toalignment and calling conventions. In case vector type values arebeing used in an ABI-relevant context, a GAS ‘.gnu_attribute’command is added to mark the resulting binary with the ABI used.-mvx is enabled by default when using-march=z13.

-mzvector
-mno-zvector

The-mzvector option enables vector language extensions andbuiltins using instructions available with the vector extensionfacility introduced with the IBM z13 machine generation.This option adds support for ‘vector’ to be used as a keyword todefine vector type variables and arguments. ‘vector’ is onlyavailable when GNU extensions are enabled. It is not expandedwhen requesting strict standard compliance e.g. with-std=c99.In addition to the GCC low-level builtins,-mzvector enablesa set of builtins added for compatibility with AltiVec-styleimplementations like Power and Cell. In order to make use of thesebuiltins, you must include the header filevecintrin.h.-mzvector is disabled by default.

-mmvcle
-mno-mvcle

Generate (or do not generate) code using themvcle instructionto perform block moves. When-mno-mvcle is specified,use amvc loop instead. This is the default unless optimizing forsize.

-mdebug
-mno-debug

Print (or do not print) additional debug information when compiling.The default is to not print debug information.

-march=cpu-type

Generate code that runs oncpu-type, which is the name of asystem representing a certain processor type. Possible values forcpu-type are ‘z900’/‘arch5’, ‘z990’/‘arch6’,‘z9-109’, ‘z9-ec’/‘arch7’, ‘z10’/‘arch8’,‘z196’/‘arch9’, ‘zEC12’, ‘z13’/‘arch11’,‘z14’/‘arch12’, ‘z15’/‘arch13’,‘z16’/‘arch14’, ‘z17’/‘arch15’, and ‘native’.

The default is-march=z900.

Specifying ‘native’ as cpu type can be used to select the bestarchitecture option for the host processor.-march=native has no effect if GCC does not recognize theprocessor.

-mtune=cpu-type

Tune tocpu-type everything applicable about the generated code,except for the ABI and the set of available instructions.The list ofcpu-type values is the same as for-march.The default is the value used for-march.

-mtpf-trace
-mno-tpf-trace

Generate code that adds (does not add) in TPF OS specific branches to traceroutines in the operating system. This option is off by default, evenwhen compiling for the TPF OS.

-mtpf-trace-skip
-mno-tpf-trace-skip

Generate code that changes (does not change) the default branchtargets enabled by-mtpf-trace to point to specialized traceroutines providing the ability of selectively skipping function traceentries for the TPF OS. This option is off by default, even whencompiling for the TPF OS and specifying-mtpf-trace.

-mmain

For TPF OS target, use this option when linking to add the startup codeand other linker options to produce a main object.

-mfused-madd
-mno-fused-madd

Generate code that uses (does not use) the floating-point multiply andaccumulate instructions. These instructions are generated by default ifhardware floating point is used.

-mwarn-framesize=framesize

Emit a warning if the current function exceeds the given frame size.Because this is a compile-time check it doesn’t need to be a realproblem when the program runs. It is intended to identify functionshat most probably cause a stack overflow. It is useful forenvironments with limited stack size e.g. the Linux kernel.

A value of zero disables this warning; that is the default.

-mwarn-dynamicstack
-mno-warn-dynamicstack

Emit a warning if the function callsalloca or uses dynamically-sizedarrays. This is generally a bad idea with a limited stack size.

-mstack-guard=stack-guard
-mstack-size=stack-size
-mno-stack-guard
-mno-stack-size

If these options are enabled, the S/390 back end emits additionalinstructions in the function prologue that trigger a trap if the stacksize isstack-guard bytes above thestack-size (remember thatthe stack on S/390 grows downward).If thestack-guard option is omitted the smallest power of 2 larger thanthe frame size of the compiled function is chosen.

These options are intended to be used to help debugging stack overflowproblems. The additionally emitted code causes only little overhead andhence can also be used in production-like systems without greaterperformance degradation.

The given values have to be exact powers of 2andstack-size has to be greater thanstack-guard withoutexceeding 64k.In order to be efficient the extra code makes the assumption that thestack starts at an address aligned to the value given bystack-size.

The-mstack-guard= option can only be used in conjunction with-mstack-size=. You can override these options on the command linewith-mno-stack-guard and-mno-stack-size, respectively.

-mhotpatch=pre-halfwords,post-halfwords

If the hotpatch option is enabled, a “hot-patching” functionprologue is generated for all functions in the compilation unit.The function label is prepended with the given number of two-byteNOP instructions (pre-halfwords, maximum 1000000). Afterthe label, 2 *post-halfwords bytes are appended, using thelargest NOP-like instructions the architecture allows (maximum1000000).

If both arguments are zero, hotpatching is disabled.

This option can be overridden for individual functions with thehotpatch attribute.

-mpic-data-is-text-relative
-mno-pic-data-is-text-relative

When compiling for S/390 with-fpic or-fPIC, normallyGCC emits code using relative addressing between code and data. However,for hotpatching it might be required to introduce new.text partswhile using the existing.data and.bss sections.In this case, use-mno-pic-data-is-text-relative to forceaddressing through the GOT instead.

-mstack-protector-guard=guard
-mstack-protector-guard-record

Generate stack protection code using canary atguard. Supportedlocations are ‘global’ for a global canary or ‘tls’ for a per-threadcanary in the TLS block (the default).

Option-mstack-protector-guard-record results in the generation ofsection__stack_protector_loc containing pointers to all instructionswhich load the address of the global guard. Thus, this option has only aneffect in conjunction with-mstack-protector-guard=global. Theintended use is for the Linux kernel.

-mindirect-branch=choice
-mindirect-branch-jump=choice
-mindirect-branch-call=choice
-mfunction-return=choice
-mfunction-return-mem=choice
-mfunction-return-reg=choice

This group of options addresses security vulnerabilities related tospeculative execution and indirect branch prediction by enabling replacementof indirect branches and function returns with direct branches to a thunk.

Specifying achoice of ‘keep’ causes generation of thedefault code. ‘thunk’ triggers generation of out-of-line thunksand replaces the formerly indirect branch with a direct branch to thethunk. ‘thunk-extern’ does the branch replacement like ‘thunk’but does not emit the thunks. ‘thunk-inline’ is only available with-mindirect-branch-jump; it should be used in preferenceto ‘thunk’ in user-space applications to support correct stackunwinding and exception handling.

-mindirect-branch sets the value of-mindirect-branch-jumpand-mindirect-branch-call.-mfunction-return sets the value of-mfunction-return-regand-mfunction-return-mem.

All of these options can also be set on a per-function basis usingfunction attributes.

-mindirect-branch-table
-mno-indirect-branch-table

This option is useful in conjunction with the-mindirect-branch and-mfunction-return options.When enabled, it causes generation of tables pointing to the branchlocations which have been patched by those options. The tables areemitted in sections named.s390_indirect_jump,.s390_indirect_call,.s390_return_reg, and.s390_return_mem. Each section consists of an array of 32-bitelements; each entry holds the offset from the entry to the patchedlocation.

-mfentry
-mno-fentry

When used in conjunction with the-pg option, emit profiling codeusing the__fentry__ hook provided by GLIBC 2.29 or later.This is only available for 64-bit code. If this option is not enabled,profiling uses the less efficient_mcount hook instead.

-mrecord-mcount
-mno-record-mcount

When enabled, generate a__mcount_loc section with the locationsof all generated profiling calls to_mcount or__fentry__.

mnop-mcount
mno-nop-mcount

Instead of generating calls to_mcount or__fentry__with-pg, insert a sequence no-op instructions of the same lengthat the locations where the calls would have been inserted. This can be usedin conjunction with the-mrecord-mcount option to patch the callsequences into the object file without recompiling it.

-mpreserve-args
-mno-preserve-args

When enabled, save all argument registers to the stack, and generatecorresponding CFI information. This is useful for applications thatwant to implement their own stack unwinding and need access to functionarguments.

-munaligned-symbols
-mno-unaligned-symbols

Assume that external symbols with a natural alignment of 1 are potentiallyunaligned. By default, all symbols without explicit alignment are assumedto be aligned on a 2-byte boundary as mandated by the IBM Z ABI.


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


[8]ページ先頭

©2009-2026 Movatter.jp