S_002f390-and-zSeries-Options.html 18 KB

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