You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

378 lines
18KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>S/390 and zSeries Options (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="S/390 and zSeries Options (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="S/390 and zSeries Options (Using the GNU Compiler Collection (GCC))">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options">
  30. <link href="Score-Options.html#Score-Options" rel="next" title="Score Options">
  31. <link href="RX-Options.html#RX-Options" rel="prev" title="RX Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="S_002f390-and-zSeries-Options"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Score-Options.html#Score-Options" accesskey="n" rel="next">Score Options</a>, Previous: <a href="RX-Options.html#RX-Options" accesskey="p" rel="prev">RX Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="S_002f390-and-zSeries-Options-1"></a>
  68. <h4 class="subsection">3.19.46 S/390 and zSeries Options</h4>
  69. <a name="index-S_002f390-and-zSeries-Options"></a>
  70. <p>These are the &lsquo;<samp>-m</samp>&rsquo; options defined for the S/390 and zSeries architecture.
  71. </p>
  72. <dl compact="compact">
  73. <dt><code>-mhard-float</code></dt>
  74. <dt><code>-msoft-float</code></dt>
  75. <dd><a name="index-mhard_002dfloat-7"></a>
  76. <a name="index-msoft_002dfloat-11"></a>
  77. <p>Use (do not use) the hardware floating-point instructions and registers
  78. for floating-point operations. When <samp>-msoft-float</samp> is specified,
  79. functions in <samp>libgcc.a</samp> are used to perform floating-point
  80. operations. When <samp>-mhard-float</samp> is specified, the compiler
  81. generates IEEE floating-point instructions. This is the default.
  82. </p>
  83. </dd>
  84. <dt><code>-mhard-dfp</code></dt>
  85. <dt><code>-mno-hard-dfp</code></dt>
  86. <dd><a name="index-mhard_002ddfp-1"></a>
  87. <a name="index-mno_002dhard_002ddfp-1"></a>
  88. <p>Use (do not use) the hardware decimal-floating-point instructions for
  89. decimal-floating-point operations. When <samp>-mno-hard-dfp</samp> is
  90. specified, functions in <samp>libgcc.a</samp> are used to perform
  91. decimal-floating-point operations. When <samp>-mhard-dfp</samp> is
  92. specified, the compiler generates decimal-floating-point hardware
  93. instructions. This is the default for <samp>-march=z9-ec</samp> or higher.
  94. </p>
  95. </dd>
  96. <dt><code>-mlong-double-64</code></dt>
  97. <dt><code>-mlong-double-128</code></dt>
  98. <dd><a name="index-mlong_002ddouble_002d64"></a>
  99. <a name="index-mlong_002ddouble_002d128"></a>
  100. <p>These switches control the size of <code>long double</code> type. A size
  101. of 64 bits makes the <code>long double</code> type equivalent to the <code>double</code>
  102. type. This is the default.
  103. </p>
  104. </dd>
  105. <dt><code>-mbackchain</code></dt>
  106. <dt><code>-mno-backchain</code></dt>
  107. <dd><a name="index-mbackchain"></a>
  108. <a name="index-mno_002dbackchain"></a>
  109. <p>Store (do not store) the address of the caller&rsquo;s frame as backchain pointer
  110. into the callee&rsquo;s stack frame.
  111. A backchain may be needed to allow debugging using tools that do not understand
  112. DWARF call frame information.
  113. When <samp>-mno-packed-stack</samp> is in effect, the backchain pointer is stored
  114. at the bottom of the stack frame; when <samp>-mpacked-stack</samp> is in effect,
  115. the backchain is placed into the topmost word of the 96/160 byte register
  116. save area.
  117. </p>
  118. <p>In general, code compiled with <samp>-mbackchain</samp> is call-compatible with
  119. code compiled with <samp>-mmo-backchain</samp>; however, use of the backchain
  120. for debugging purposes usually requires that the whole binary is built with
  121. <samp>-mbackchain</samp>. Note that the combination of <samp>-mbackchain</samp>,
  122. <samp>-mpacked-stack</samp> and <samp>-mhard-float</samp> is not supported. In order
  123. to build a linux kernel use <samp>-msoft-float</samp>.
  124. </p>
  125. <p>The default is to not maintain the backchain.
  126. </p>
  127. </dd>
  128. <dt><code>-mpacked-stack</code></dt>
  129. <dt><code>-mno-packed-stack</code></dt>
  130. <dd><a name="index-mpacked_002dstack"></a>
  131. <a name="index-mno_002dpacked_002dstack"></a>
  132. <p>Use (do not use) the packed stack layout. When <samp>-mno-packed-stack</samp> is
  133. specified, the compiler uses the all fields of the 96/160 byte register save
  134. area only for their default purpose; unused fields still take up stack space.
  135. When <samp>-mpacked-stack</samp> is specified, register save slots are densely
  136. packed at the top of the register save area; unused space is reused for other
  137. purposes, allowing for more efficient use of the available stack space.
  138. However, when <samp>-mbackchain</samp> is also in effect, the topmost word of
  139. the save area is always used to store the backchain, and the return address
  140. register is always saved two words below the backchain.
  141. </p>
  142. <p>As long as the stack frame backchain is not used, code generated with
  143. <samp>-mpacked-stack</samp> is call-compatible with code generated with
  144. <samp>-mno-packed-stack</samp>. Note that some non-FSF releases of GCC 2.95 for
  145. S/390 or zSeries generated code that uses the stack frame backchain at run
  146. time, not just for debugging purposes. Such code is not call-compatible
  147. with code compiled with <samp>-mpacked-stack</samp>. Also, note that the
  148. combination of <samp>-mbackchain</samp>,
  149. <samp>-mpacked-stack</samp> and <samp>-mhard-float</samp> is not supported. In order
  150. to build a linux kernel use <samp>-msoft-float</samp>.
  151. </p>
  152. <p>The default is to not use the packed stack layout.
  153. </p>
  154. </dd>
  155. <dt><code>-msmall-exec</code></dt>
  156. <dt><code>-mno-small-exec</code></dt>
  157. <dd><a name="index-msmall_002dexec"></a>
  158. <a name="index-mno_002dsmall_002dexec"></a>
  159. <p>Generate (or do not generate) code using the <code>bras</code> instruction
  160. to do subroutine calls.
  161. This only works reliably if the total executable size does not
  162. exceed 64k. The default is to use the <code>basr</code> instruction instead,
  163. which does not have this limitation.
  164. </p>
  165. </dd>
  166. <dt><code>-m64</code></dt>
  167. <dt><code>-m31</code></dt>
  168. <dd><a name="index-m64-2"></a>
  169. <a name="index-m31"></a>
  170. <p>When <samp>-m31</samp> is specified, generate code compliant to the
  171. GNU/Linux for S/390 ABI. When <samp>-m64</samp> is specified, generate
  172. code compliant to the GNU/Linux for zSeries ABI. This allows GCC in
  173. particular to generate 64-bit instructions. For the &lsquo;<samp>s390</samp>&rsquo;
  174. targets, the default is <samp>-m31</samp>, while the &lsquo;<samp>s390x</samp>&rsquo;
  175. targets default to <samp>-m64</samp>.
  176. </p>
  177. </dd>
  178. <dt><code>-mzarch</code></dt>
  179. <dt><code>-mesa</code></dt>
  180. <dd><a name="index-mzarch"></a>
  181. <a name="index-mesa"></a>
  182. <p>When <samp>-mzarch</samp> is specified, generate code using the
  183. instructions available on z/Architecture.
  184. When <samp>-mesa</samp> is specified, generate code using the
  185. instructions available on ESA/390. Note that <samp>-mesa</samp> is
  186. not possible with <samp>-m64</samp>.
  187. When generating code compliant to the GNU/Linux for S/390 ABI,
  188. the default is <samp>-mesa</samp>. When generating code compliant
  189. to the GNU/Linux for zSeries ABI, the default is <samp>-mzarch</samp>.
  190. </p>
  191. </dd>
  192. <dt><code>-mhtm</code></dt>
  193. <dt><code>-mno-htm</code></dt>
  194. <dd><a name="index-mhtm-1"></a>
  195. <a name="index-mno_002dhtm-1"></a>
  196. <p>The <samp>-mhtm</samp> option enables a set of builtins making use of
  197. instructions available with the transactional execution facility
  198. introduced with the IBM zEnterprise EC12 machine generation
  199. <a href="S_002f390-System-z-Built_002din-Functions.html#S_002f390-System-z-Built_002din-Functions">S/390 System z Built-in Functions</a>.
  200. <samp>-mhtm</samp> is enabled by default when using <samp>-march=zEC12</samp>.
  201. </p>
  202. </dd>
  203. <dt><code>-mvx</code></dt>
  204. <dt><code>-mno-vx</code></dt>
  205. <dd><a name="index-mvx"></a>
  206. <a name="index-mno_002dvx"></a>
  207. <p>When <samp>-mvx</samp> is specified, generate code using the instructions
  208. available with the vector extension facility introduced with the IBM
  209. z13 machine generation.
  210. This option changes the ABI for some vector type values with regard to
  211. alignment and calling conventions. In case vector type values are
  212. being used in an ABI-relevant context a GAS &lsquo;<samp>.gnu_attribute</samp>&rsquo;
  213. command will be added to mark the resulting binary with the ABI used.
  214. <samp>-mvx</samp> is enabled by default when using <samp>-march=z13</samp>.
  215. </p>
  216. </dd>
  217. <dt><code>-mzvector</code></dt>
  218. <dt><code>-mno-zvector</code></dt>
  219. <dd><a name="index-mzvector"></a>
  220. <a name="index-mno_002dzvector"></a>
  221. <p>The <samp>-mzvector</samp> option enables vector language extensions and
  222. builtins using instructions available with the vector extension
  223. facility introduced with the IBM z13 machine generation.
  224. This option adds support for &lsquo;<samp>vector</samp>&rsquo; to be used as a keyword to
  225. define vector type variables and arguments. &lsquo;<samp>vector</samp>&rsquo; is only
  226. available when GNU extensions are enabled. It will not be expanded
  227. when requesting strict standard compliance e.g. with <samp>-std=c99</samp>.
  228. In addition to the GCC low-level builtins <samp>-mzvector</samp> enables
  229. a set of builtins added for compatibility with AltiVec-style
  230. implementations like Power and Cell. In order to make use of these
  231. builtins the header file <samp>vecintrin.h</samp> needs to be included.
  232. <samp>-mzvector</samp> is disabled by default.
  233. </p>
  234. </dd>
  235. <dt><code>-mmvcle</code></dt>
  236. <dt><code>-mno-mvcle</code></dt>
  237. <dd><a name="index-mmvcle"></a>
  238. <a name="index-mno_002dmvcle"></a>
  239. <p>Generate (or do not generate) code using the <code>mvcle</code> instruction
  240. to perform block moves. When <samp>-mno-mvcle</samp> is specified,
  241. use a <code>mvc</code> loop instead. This is the default unless optimizing for
  242. size.
  243. </p>
  244. </dd>
  245. <dt><code>-mdebug</code></dt>
  246. <dt><code>-mno-debug</code></dt>
  247. <dd><a name="index-mdebug-1"></a>
  248. <a name="index-mno_002ddebug"></a>
  249. <p>Print (or do not print) additional debug information when compiling.
  250. The default is to not print debug information.
  251. </p>
  252. </dd>
  253. <dt><code>-march=<var>cpu-type</var></code></dt>
  254. <dd><a name="index-march-13"></a>
  255. <p>Generate code that runs on <var>cpu-type</var>, which is the name of a
  256. system representing a certain processor type. Possible values for
  257. <var>cpu-type</var> are &lsquo;<samp>z900</samp>&rsquo;/&lsquo;<samp>arch5</samp>&rsquo;, &lsquo;<samp>z990</samp>&rsquo;/&lsquo;<samp>arch6</samp>&rsquo;,
  258. &lsquo;<samp>z9-109</samp>&rsquo;, &lsquo;<samp>z9-ec</samp>&rsquo;/&lsquo;<samp>arch7</samp>&rsquo;, &lsquo;<samp>z10</samp>&rsquo;/&lsquo;<samp>arch8</samp>&rsquo;,
  259. &lsquo;<samp>z196</samp>&rsquo;/&lsquo;<samp>arch9</samp>&rsquo;, &lsquo;<samp>zEC12</samp>&rsquo;, &lsquo;<samp>z13</samp>&rsquo;/&lsquo;<samp>arch11</samp>&rsquo;,
  260. &lsquo;<samp>z14</samp>&rsquo;/&lsquo;<samp>arch12</samp>&rsquo;, &lsquo;<samp>z15</samp>&rsquo;/&lsquo;<samp>arch13</samp>&rsquo;, and &lsquo;<samp>native</samp>&rsquo;.
  261. </p>
  262. <p>The default is <samp>-march=z900</samp>.
  263. </p>
  264. <p>Specifying &lsquo;<samp>native</samp>&rsquo; as cpu type can be used to select the best
  265. architecture option for the host processor.
  266. <samp>-march=native</samp> has no effect if GCC does not recognize the
  267. processor.
  268. </p>
  269. </dd>
  270. <dt><code>-mtune=<var>cpu-type</var></code></dt>
  271. <dd><a name="index-mtune-13"></a>
  272. <p>Tune to <var>cpu-type</var> everything applicable about the generated code,
  273. except for the ABI and the set of available instructions.
  274. The list of <var>cpu-type</var> values is the same as for <samp>-march</samp>.
  275. The default is the value used for <samp>-march</samp>.
  276. </p>
  277. </dd>
  278. <dt><code>-mtpf-trace</code></dt>
  279. <dt><code>-mno-tpf-trace</code></dt>
  280. <dd><a name="index-mtpf_002dtrace"></a>
  281. <a name="index-mno_002dtpf_002dtrace"></a>
  282. <p>Generate code that adds (does not add) in TPF OS specific branches to trace
  283. routines in the operating system. This option is off by default, even
  284. when compiling for the TPF OS.
  285. </p>
  286. </dd>
  287. <dt><code>-mtpf-trace-skip</code></dt>
  288. <dt><code>-mno-tpf-trace-skip</code></dt>
  289. <dd><a name="index-mtpf_002dtrace_002dskip"></a>
  290. <a name="index-mno_002dtpf_002dtrace_002dskip"></a>
  291. <p>Generate code that changes (does not change) the default branch
  292. targets enabled by <samp>-mtpf-trace</samp> to point to specialized trace
  293. routines providing the ability of selectively skipping function trace
  294. entries for the TPF OS. This option is off by default, even when
  295. compiling for the TPF OS and specifying <samp>-mtpf-trace</samp>.
  296. </p>
  297. </dd>
  298. <dt><code>-mfused-madd</code></dt>
  299. <dt><code>-mno-fused-madd</code></dt>
  300. <dd><a name="index-mfused_002dmadd-3"></a>
  301. <a name="index-mno_002dfused_002dmadd-3"></a>
  302. <p>Generate code that uses (does not use) the floating-point multiply and
  303. accumulate instructions. These instructions are generated by default if
  304. hardware floating point is used.
  305. </p>
  306. </dd>
  307. <dt><code>-mwarn-framesize=<var>framesize</var></code></dt>
  308. <dd><a name="index-mwarn_002dframesize"></a>
  309. <p>Emit a warning if the current function exceeds the given frame size. Because
  310. this is a compile-time check it doesn&rsquo;t need to be a real problem when the program
  311. runs. It is intended to identify functions that most probably cause
  312. a stack overflow. It is useful to be used in an environment with limited stack
  313. size e.g. the linux kernel.
  314. </p>
  315. </dd>
  316. <dt><code>-mwarn-dynamicstack</code></dt>
  317. <dd><a name="index-mwarn_002ddynamicstack"></a>
  318. <p>Emit a warning if the function calls <code>alloca</code> or uses dynamically-sized
  319. arrays. This is generally a bad idea with a limited stack size.
  320. </p>
  321. </dd>
  322. <dt><code>-mstack-guard=<var>stack-guard</var></code></dt>
  323. <dt><code>-mstack-size=<var>stack-size</var></code></dt>
  324. <dd><a name="index-mstack_002dguard"></a>
  325. <a name="index-mstack_002dsize-2"></a>
  326. <p>If these options are provided the S/390 back end emits additional instructions in
  327. the function prologue that trigger a trap if the stack size is <var>stack-guard</var>
  328. bytes above the <var>stack-size</var> (remember that the stack on S/390 grows downward).
  329. If the <var>stack-guard</var> option is omitted the smallest power of 2 larger than
  330. the frame size of the compiled function is chosen.
  331. These options are intended to be used to help debugging stack overflow problems.
  332. The additionally emitted code causes only little overhead and hence can also be
  333. used in production-like systems without greater performance degradation. The given
  334. values have to be exact powers of 2 and <var>stack-size</var> has to be greater than
  335. <var>stack-guard</var> without exceeding 64k.
  336. In order to be efficient the extra code makes the assumption that the stack starts
  337. at an address aligned to the value given by <var>stack-size</var>.
  338. The <var>stack-guard</var> option can only be used in conjunction with <var>stack-size</var>.
  339. </p>
  340. </dd>
  341. <dt><code>-mhotpatch=<var>pre-halfwords</var>,<var>post-halfwords</var></code></dt>
  342. <dd><a name="index-mhotpatch"></a>
  343. <p>If the hotpatch option is enabled, a &ldquo;hot-patching&rdquo; function
  344. prologue is generated for all functions in the compilation unit.
  345. The funtion label is prepended with the given number of two-byte
  346. NOP instructions (<var>pre-halfwords</var>, maximum 1000000). After
  347. the label, 2 * <var>post-halfwords</var> bytes are appended, using the
  348. largest NOP like instructions the architecture allows (maximum
  349. 1000000).
  350. </p>
  351. <p>If both arguments are zero, hotpatching is disabled.
  352. </p>
  353. <p>This option can be overridden for individual functions with the
  354. <code>hotpatch</code> attribute.
  355. </p></dd>
  356. </dl>
  357. <hr>
  358. <div class="header">
  359. <p>
  360. Next: <a href="Score-Options.html#Score-Options" accesskey="n" rel="next">Score Options</a>, Previous: <a href="RX-Options.html#RX-Options" accesskey="p" rel="prev">RX Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  361. </div>
  362. </body>
  363. </html>