]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
1 | .. |
2 | Copyright 1988-2022 Free Software Foundation, Inc. | |
3 | This is part of the GCC manual. | |
4 | For copying conditions, see the copyright.rst file. | |
5 | ||
6 | .. program:: S/390 and zSeries | |
7 | ||
8 | .. index:: S/390 and zSeries Options | |
9 | ||
10 | .. _s-390-and-zseries-options: | |
11 | ||
12 | S/390 and zSeries Options | |
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
14 | ||
15 | These are the :samp:`-m` options defined for the S/390 and zSeries architecture. | |
16 | ||
17 | .. option:: -mhard-float, -msoft-float | |
18 | ||
19 | Use (do not use) the hardware floating-point instructions and registers | |
20 | for floating-point operations. When :option:`-msoft-float` is specified, | |
21 | functions in :samp:`libgcc.a` are used to perform floating-point | |
22 | operations. When :option:`-mhard-float` is specified, the compiler | |
23 | generates IEEE floating-point instructions. This is the default. | |
24 | ||
25 | .. option:: -mhard-dfp, -mno-hard-dfp | |
26 | ||
27 | Use (do not use) the hardware decimal-floating-point instructions for | |
28 | decimal-floating-point operations. When :option:`-mno-hard-dfp` is | |
29 | specified, functions in :samp:`libgcc.a` are used to perform | |
30 | decimal-floating-point operations. When :option:`-mhard-dfp` is | |
31 | specified, the compiler generates decimal-floating-point hardware | |
32 | instructions. This is the default for :option:`-march=z9-ec` or higher. | |
33 | ||
34 | .. option:: -mlong-double-64, -mlong-double-128 | |
35 | ||
36 | These switches control the size of ``long double`` type. A size | |
37 | of 64 bits makes the ``long double`` type equivalent to the ``double`` | |
38 | type. This is the default. | |
39 | ||
40 | .. option:: -mbackchain, -mno-backchain | |
41 | ||
42 | Store (do not store) the address of the caller's frame as backchain pointer | |
43 | into the callee's stack frame. | |
44 | A backchain may be needed to allow debugging using tools that do not understand | |
45 | DWARF call frame information. | |
46 | When :option:`-mno-packed-stack` is in effect, the backchain pointer is stored | |
47 | at the bottom of the stack frame; when :option:`-mpacked-stack` is in effect, | |
48 | the backchain is placed into the topmost word of the 96/160 byte register | |
49 | save area. | |
50 | ||
51 | In general, code compiled with :option:`-mbackchain` is call-compatible with | |
52 | code compiled with :option:`-mno-backchain` ; however, use of the backchain | |
53 | for debugging purposes usually requires that the whole binary is built with | |
54 | :option:`-mbackchain`. Note that the combination of :option:`-mbackchain`, | |
55 | :option:`-mpacked-stack` and :option:`-mhard-float` is not supported. In order | |
56 | to build a linux kernel use :option:`-msoft-float`. | |
57 | ||
58 | The default is to not maintain the backchain. | |
59 | ||
60 | .. option:: -mpacked-stack, -mno-packed-stack | |
61 | ||
62 | Use (do not use) the packed stack layout. When :option:`-mno-packed-stack` is | |
63 | specified, the compiler uses the all fields of the 96/160 byte register save | |
64 | area only for their default purpose; unused fields still take up stack space. | |
65 | When :option:`-mpacked-stack` is specified, register save slots are densely | |
66 | packed at the top of the register save area; unused space is reused for other | |
67 | purposes, allowing for more efficient use of the available stack space. | |
68 | However, when :option:`-mbackchain` is also in effect, the topmost word of | |
69 | the save area is always used to store the backchain, and the return address | |
70 | register is always saved two words below the backchain. | |
71 | ||
72 | As long as the stack frame backchain is not used, code generated with | |
73 | :option:`-mpacked-stack` is call-compatible with code generated with | |
74 | :option:`-mno-packed-stack`. Note that some non-FSF releases of GCC 2.95 for | |
75 | S/390 or zSeries generated code that uses the stack frame backchain at run | |
76 | time, not just for debugging purposes. Such code is not call-compatible | |
77 | with code compiled with :option:`-mpacked-stack`. Also, note that the | |
78 | combination of :option:`-mbackchain`, | |
79 | :option:`-mpacked-stack` and :option:`-mhard-float` is not supported. In order | |
80 | to build a linux kernel use :option:`-msoft-float`. | |
81 | ||
82 | The default is to not use the packed stack layout. | |
83 | ||
84 | .. option:: -msmall-exec, -mno-small-exec | |
85 | ||
86 | Generate (or do not generate) code using the ``bras`` instruction | |
87 | to do subroutine calls. | |
88 | This only works reliably if the total executable size does not | |
89 | exceed 64k. The default is to use the ``basr`` instruction instead, | |
90 | which does not have this limitation. | |
91 | ||
92 | .. option:: -m64, -m31 | |
93 | ||
94 | When :option:`-m31` is specified, generate code compliant to the | |
95 | GNU/Linux for S/390 ABI. When :option:`-m64` is specified, generate | |
96 | code compliant to the GNU/Linux for zSeries ABI. This allows GCC in | |
97 | particular to generate 64-bit instructions. For the :samp:`s390` | |
98 | targets, the default is :option:`-m31`, while the :samp:`s390x` | |
99 | targets default to :option:`-m64`. | |
100 | ||
101 | .. option:: -mzarch, -mesa | |
102 | ||
103 | When :option:`-mzarch` is specified, generate code using the | |
104 | instructions available on z/Architecture. | |
105 | When :option:`-mesa` is specified, generate code using the | |
106 | instructions available on ESA/390. Note that :option:`-mesa` is | |
107 | not possible with :option:`-m64`. | |
108 | When generating code compliant to the GNU/Linux for S/390 ABI, | |
109 | the default is :option:`-mesa`. When generating code compliant | |
110 | to the GNU/Linux for zSeries ABI, the default is :option:`-mzarch`. | |
111 | ||
112 | .. option:: -mhtm, -mno-htm | |
113 | ||
114 | The :option:`-mhtm` option enables a set of builtins making use of | |
115 | instructions available with the transactional execution facility | |
116 | introduced with the IBM zEnterprise EC12 machine generation | |
117 | :ref:`s-390-system-z-built-in-functions`. | |
118 | :option:`-mhtm` is enabled by default when using :option:`-march=zEC12`. | |
119 | ||
120 | .. option:: -mvx, -mno-vx | |
121 | ||
122 | When :option:`-mvx` is specified, generate code using the instructions | |
123 | available with the vector extension facility introduced with the IBM | |
124 | z13 machine generation. | |
125 | This option changes the ABI for some vector type values with regard to | |
126 | alignment and calling conventions. In case vector type values are | |
127 | being used in an ABI-relevant context a GAS :samp:`.gnu_attribute` | |
128 | command will be added to mark the resulting binary with the ABI used. | |
129 | :option:`-mvx` is enabled by default when using :option:`-march=z13`. | |
130 | ||
131 | .. option:: -mzvector, -mno-zvector | |
132 | ||
133 | The :option:`-mzvector` option enables vector language extensions and | |
134 | builtins using instructions available with the vector extension | |
135 | facility introduced with the IBM z13 machine generation. | |
136 | This option adds support for :samp:`vector` to be used as a keyword to | |
137 | define vector type variables and arguments. :samp:`vector` is only | |
138 | available when GNU extensions are enabled. It will not be expanded | |
139 | when requesting strict standard compliance e.g. with :option:`-std=c99`. | |
140 | In addition to the GCC low-level builtins :option:`-mzvector` enables | |
141 | a set of builtins added for compatibility with AltiVec-style | |
142 | implementations like Power and Cell. In order to make use of these | |
143 | builtins the header file :samp:`vecintrin.h` needs to be included. | |
144 | :option:`-mzvector` is disabled by default. | |
145 | ||
146 | .. option:: -mmvcle, -mno-mvcle | |
147 | ||
148 | Generate (or do not generate) code using the ``mvcle`` instruction | |
149 | to perform block moves. When :option:`-mno-mvcle` is specified, | |
150 | use a ``mvc`` loop instead. This is the default unless optimizing for | |
151 | size. | |
152 | ||
153 | .. option:: -mdebug, -mno-debug | |
154 | ||
155 | Print (or do not print) additional debug information when compiling. | |
156 | The default is to not print debug information. | |
157 | ||
158 | .. option:: -march={cpu-type} | |
159 | ||
160 | Generate code that runs on :samp:`{cpu-type}`, which is the name of a | |
161 | system representing a certain processor type. Possible values for | |
162 | :samp:`{cpu-type}` are :samp:`z900`/:samp:`arch5`, :samp:`z990`/:samp:`arch6`, | |
163 | :samp:`z9-109`, :samp:`z9-ec`/:samp:`arch7`, :samp:`z10`/:samp:`arch8`, | |
164 | :samp:`z196`/:samp:`arch9`, :samp:`zEC12`, :samp:`z13`/:samp:`arch11`, | |
165 | :samp:`z14`/:samp:`arch12`, :samp:`z15`/:samp:`arch13`, | |
166 | :samp:`z16`/:samp:`arch14`, and :samp:`native`. | |
167 | ||
168 | The default is :option:`-march=z900`. | |
169 | ||
170 | Specifying :samp:`native` as cpu type can be used to select the best | |
171 | architecture option for the host processor. | |
172 | :option:`-march=native` has no effect if GCC does not recognize the | |
173 | processor. | |
174 | ||
175 | .. option:: -mtune={cpu-type} | |
176 | ||
177 | Tune to :samp:`{cpu-type}` everything applicable about the generated code, | |
178 | except for the ABI and the set of available instructions. | |
179 | The list of :samp:`{cpu-type}` values is the same as for :option:`-march`. | |
180 | The default is the value used for :option:`-march`. | |
181 | ||
182 | .. option:: -mtpf-trace, -mno-tpf-trace | |
183 | ||
184 | Generate code that adds (does not add) in TPF OS specific branches to trace | |
185 | routines in the operating system. This option is off by default, even | |
186 | when compiling for the TPF OS. | |
187 | ||
188 | .. option:: -mtpf-trace-skip, -mno-tpf-trace-skip | |
189 | ||
190 | Generate code that changes (does not change) the default branch | |
191 | targets enabled by :option:`-mtpf-trace` to point to specialized trace | |
192 | routines providing the ability of selectively skipping function trace | |
193 | entries for the TPF OS. This option is off by default, even when | |
194 | compiling for the TPF OS and specifying :option:`-mtpf-trace`. | |
195 | ||
196 | .. option:: -mfused-madd, -mno-fused-madd | |
197 | ||
198 | Generate code that uses (does not use) the floating-point multiply and | |
199 | accumulate instructions. These instructions are generated by default if | |
200 | hardware floating point is used. | |
201 | ||
202 | .. option:: -mwarn-framesize={framesize} | |
203 | ||
204 | Emit a warning if the current function exceeds the given frame size. Because | |
205 | this is a compile-time check it doesn't need to be a real problem when the program | |
206 | runs. It is intended to identify functions that most probably cause | |
207 | a stack overflow. It is useful to be used in an environment with limited stack | |
208 | size e.g. the linux kernel. | |
209 | ||
210 | .. option:: -mwarn-dynamicstack | |
211 | ||
212 | Emit a warning if the function calls ``alloca`` or uses dynamically-sized | |
213 | arrays. This is generally a bad idea with a limited stack size. | |
214 | ||
215 | .. option:: -mstack-guard={stack-guard} | |
216 | ||
217 | If these options are provided the S/390 back end emits additional instructions in | |
218 | the function prologue that trigger a trap if the stack size is :samp:`{stack-guard}` | |
219 | bytes above the :samp:`{stack-size}` (remember that the stack on S/390 grows downward). | |
220 | If the :samp:`{stack-guard}` option is omitted the smallest power of 2 larger than | |
221 | the frame size of the compiled function is chosen. | |
222 | These options are intended to be used to help debugging stack overflow problems. | |
223 | The additionally emitted code causes only little overhead and hence can also be | |
224 | used in production-like systems without greater performance degradation. The given | |
225 | values have to be exact powers of 2 and :samp:`{stack-size}` has to be greater than | |
226 | :samp:`{stack-guard}` without exceeding 64k. | |
227 | In order to be efficient the extra code makes the assumption that the stack starts | |
228 | at an address aligned to the value given by :samp:`{stack-size}`. | |
229 | The :samp:`{stack-guard}` option can only be used in conjunction with :samp:`{stack-size}`. | |
230 | ||
231 | .. option:: -mhotpatch={pre-halfwords},{post-halfwords} | |
232 | ||
233 | If the hotpatch option is enabled, a 'hot-patching' function | |
234 | prologue is generated for all functions in the compilation unit. | |
235 | The funtion label is prepended with the given number of two-byte | |
236 | NOP instructions (:samp:`{pre-halfwords}`, maximum 1000000). After | |
237 | the label, 2 \* :samp:`{post-halfwords}` bytes are appended, using the | |
238 | largest NOP like instructions the architecture allows (maximum | |
239 | 1000000). | |
240 | ||
241 | If both arguments are zero, hotpatching is disabled. | |
242 | ||
243 | This option can be overridden for individual functions with the | |
3ed1b4ce | 244 | ``hotpatch`` attribute. |