1<html lang="en"> 2<head> 3<title>S/390 and zSeries Options - Using the GNU Compiler Collection (GCC)</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using the GNU Compiler Collection (GCC)"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options"> 9<link rel="prev" href="RX-Options.html#RX-Options" title="RX Options"> 10<link rel="next" href="Score-Options.html#Score-Options" title="Score Options"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 152010 Free Software Foundation, Inc. 16 17Permission is granted to copy, distribute and/or modify this document 18under the terms of the GNU Free Documentation License, Version 1.3 or 19any later version published by the Free Software Foundation; with the 20Invariant Sections being ``Funding Free Software'', the Front-Cover 21Texts being (a) (see below), and with the Back-Cover Texts being (b) 22(see below). A copy of the license is included in the section entitled 23``GNU Free Documentation License''. 24 25(a) The FSF's Front-Cover Text is: 26 27 A GNU Manual 28 29(b) The FSF's Back-Cover Text is: 30 31 You have freedom to copy and modify this GNU Manual, like GNU 32 software. Copies published by the Free Software Foundation raise 33 funds for GNU development.--> 34<meta http-equiv="Content-Style-Type" content="text/css"> 35<style type="text/css"><!-- 36 pre.display { font-family:inherit } 37 pre.format { font-family:inherit } 38 pre.smalldisplay { font-family:inherit; font-size:smaller } 39 pre.smallformat { font-family:inherit; font-size:smaller } 40 pre.smallexample { font-size:smaller } 41 pre.smalllisp { font-size:smaller } 42 span.sc { font-variant:small-caps } 43 span.roman { font-family:serif; font-weight:normal; } 44 span.sansserif { font-family:sans-serif; font-weight:normal; } 45--></style> 46<link rel="stylesheet" type="text/css" href="../cs.css"> 47</head> 48<body> 49<div class="node"> 50<a name="S%2f390-and-zSeries-Options"></a> 51<a name="S_002f390-and-zSeries-Options"></a> 52<p> 53Next: <a rel="next" accesskey="n" href="Score-Options.html#Score-Options">Score Options</a>, 54Previous: <a rel="previous" accesskey="p" href="RX-Options.html#RX-Options">RX Options</a>, 55Up: <a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a> 56<hr> 57</div> 58 59<h4 class="subsection">3.17.35 S/390 and zSeries Options</h4> 60 61<p><a name="index-S_002f390-and-zSeries-Options-1969"></a> 62These are the ‘<samp><span class="samp">-m</span></samp>’ options defined for the S/390 and zSeries architecture. 63 64 <dl> 65<dt><code>-mhard-float</code><dt><code>-msoft-float</code><dd><a name="index-mhard_002dfloat-1970"></a><a name="index-msoft_002dfloat-1971"></a>Use (do not use) the hardware floating-point instructions and registers 66for floating-point operations. When <samp><span class="option">-msoft-float</span></samp> is specified, 67functions in <samp><span class="file">libgcc.a</span></samp> will be used to perform floating-point 68operations. When <samp><span class="option">-mhard-float</span></samp> is specified, the compiler 69generates IEEE floating-point instructions. This is the default. 70 71 <br><dt><code>-mhard-dfp</code><dt><code>-mno-hard-dfp</code><dd><a name="index-mhard_002ddfp-1972"></a><a name="index-mno_002dhard_002ddfp-1973"></a>Use (do not use) the hardware decimal-floating-point instructions for 72decimal-floating-point operations. When <samp><span class="option">-mno-hard-dfp</span></samp> is 73specified, functions in <samp><span class="file">libgcc.a</span></samp> will be used to perform 74decimal-floating-point operations. When <samp><span class="option">-mhard-dfp</span></samp> is 75specified, the compiler generates decimal-floating-point hardware 76instructions. This is the default for <samp><span class="option">-march=z9-ec</span></samp> or higher. 77 78 <br><dt><code>-mlong-double-64</code><dt><code>-mlong-double-128</code><dd><a name="index-mlong_002ddouble_002d64-1974"></a><a name="index-mlong_002ddouble_002d128-1975"></a>These switches control the size of <code>long double</code> type. A size 79of 64bit makes the <code>long double</code> type equivalent to the <code>double</code> 80type. This is the default. 81 82 <br><dt><code>-mbackchain</code><dt><code>-mno-backchain</code><dd><a name="index-mbackchain-1976"></a><a name="index-mno_002dbackchain-1977"></a>Store (do not store) the address of the caller's frame as backchain pointer 83into the callee's stack frame. 84A backchain may be needed to allow debugging using tools that do not understand 85DWARF-2 call frame information. 86When <samp><span class="option">-mno-packed-stack</span></samp> is in effect, the backchain pointer is stored 87at the bottom of the stack frame; when <samp><span class="option">-mpacked-stack</span></samp> is in effect, 88the backchain is placed into the topmost word of the 96/160 byte register 89save area. 90 91 <p>In general, code compiled with <samp><span class="option">-mbackchain</span></samp> is call-compatible with 92code compiled with <samp><span class="option">-mmo-backchain</span></samp>; however, use of the backchain 93for debugging purposes usually requires that the whole binary is built with 94<samp><span class="option">-mbackchain</span></samp>. Note that the combination of <samp><span class="option">-mbackchain</span></samp>, 95<samp><span class="option">-mpacked-stack</span></samp> and <samp><span class="option">-mhard-float</span></samp> is not supported. In order 96to build a linux kernel use <samp><span class="option">-msoft-float</span></samp>. 97 98 <p>The default is to not maintain the backchain. 99 100 <br><dt><code>-mpacked-stack</code><dt><code>-mno-packed-stack</code><dd><a name="index-mpacked_002dstack-1978"></a><a name="index-mno_002dpacked_002dstack-1979"></a>Use (do not use) the packed stack layout. When <samp><span class="option">-mno-packed-stack</span></samp> is 101specified, the compiler uses the all fields of the 96/160 byte register save 102area only for their default purpose; unused fields still take up stack space. 103When <samp><span class="option">-mpacked-stack</span></samp> is specified, register save slots are densely 104packed at the top of the register save area; unused space is reused for other 105purposes, allowing for more efficient use of the available stack space. 106However, when <samp><span class="option">-mbackchain</span></samp> is also in effect, the topmost word of 107the save area is always used to store the backchain, and the return address 108register is always saved two words below the backchain. 109 110 <p>As long as the stack frame backchain is not used, code generated with 111<samp><span class="option">-mpacked-stack</span></samp> is call-compatible with code generated with 112<samp><span class="option">-mno-packed-stack</span></samp>. Note that some non-FSF releases of GCC 2.95 for 113S/390 or zSeries generated code that uses the stack frame backchain at run 114time, not just for debugging purposes. Such code is not call-compatible 115with code compiled with <samp><span class="option">-mpacked-stack</span></samp>. Also, note that the 116combination of <samp><span class="option">-mbackchain</span></samp>, 117<samp><span class="option">-mpacked-stack</span></samp> and <samp><span class="option">-mhard-float</span></samp> is not supported. In order 118to build a linux kernel use <samp><span class="option">-msoft-float</span></samp>. 119 120 <p>The default is to not use the packed stack layout. 121 122 <br><dt><code>-msmall-exec</code><dt><code>-mno-small-exec</code><dd><a name="index-msmall_002dexec-1980"></a><a name="index-mno_002dsmall_002dexec-1981"></a>Generate (or do not generate) code using the <code>bras</code> instruction 123to do subroutine calls. 124This only works reliably if the total executable size does not 125exceed 64k. The default is to use the <code>basr</code> instruction instead, 126which does not have this limitation. 127 128 <br><dt><code>-m64</code><dt><code>-m31</code><dd><a name="index-m64-1982"></a><a name="index-m31-1983"></a>When <samp><span class="option">-m31</span></samp> is specified, generate code compliant to the 129GNU/Linux for S/390 ABI. When <samp><span class="option">-m64</span></samp> is specified, generate 130code compliant to the GNU/Linux for zSeries ABI. This allows GCC in 131particular to generate 64-bit instructions. For the ‘<samp><span class="samp">s390</span></samp>’ 132targets, the default is <samp><span class="option">-m31</span></samp>, while the ‘<samp><span class="samp">s390x</span></samp>’ 133targets default to <samp><span class="option">-m64</span></samp>. 134 135 <br><dt><code>-mzarch</code><dt><code>-mesa</code><dd><a name="index-mzarch-1984"></a><a name="index-mesa-1985"></a>When <samp><span class="option">-mzarch</span></samp> is specified, generate code using the 136instructions available on z/Architecture. 137When <samp><span class="option">-mesa</span></samp> is specified, generate code using the 138instructions available on ESA/390. Note that <samp><span class="option">-mesa</span></samp> is 139not possible with <samp><span class="option">-m64</span></samp>. 140When generating code compliant to the GNU/Linux for S/390 ABI, 141the default is <samp><span class="option">-mesa</span></samp>. When generating code compliant 142to the GNU/Linux for zSeries ABI, the default is <samp><span class="option">-mzarch</span></samp>. 143 144 <br><dt><code>-mmvcle</code><dt><code>-mno-mvcle</code><dd><a name="index-mmvcle-1986"></a><a name="index-mno_002dmvcle-1987"></a>Generate (or do not generate) code using the <code>mvcle</code> instruction 145to perform block moves. When <samp><span class="option">-mno-mvcle</span></samp> is specified, 146use a <code>mvc</code> loop instead. This is the default unless optimizing for 147size. 148 149 <br><dt><code>-mdebug</code><dt><code>-mno-debug</code><dd><a name="index-mdebug-1988"></a><a name="index-mno_002ddebug-1989"></a>Print (or do not print) additional debug information when compiling. 150The default is to not print debug information. 151 152 <br><dt><code>-march=</code><var>cpu-type</var><dd><a name="index-march-1990"></a>Generate code that will run on <var>cpu-type</var>, which is the name of a system 153representing a certain processor type. Possible values for 154<var>cpu-type</var> are ‘<samp><span class="samp">g5</span></samp>’, ‘<samp><span class="samp">g6</span></samp>’, ‘<samp><span class="samp">z900</span></samp>’, ‘<samp><span class="samp">z990</span></samp>’, 155‘<samp><span class="samp">z9-109</span></samp>’, ‘<samp><span class="samp">z9-ec</span></samp>’ and ‘<samp><span class="samp">z10</span></samp>’. 156When generating code using the instructions available on z/Architecture, 157the default is <samp><span class="option">-march=z900</span></samp>. Otherwise, the default is 158<samp><span class="option">-march=g5</span></samp>. 159 160 <br><dt><code>-mtune=</code><var>cpu-type</var><dd><a name="index-mtune-1991"></a>Tune to <var>cpu-type</var> everything applicable about the generated code, 161except for the ABI and the set of available instructions. 162The list of <var>cpu-type</var> values is the same as for <samp><span class="option">-march</span></samp>. 163The default is the value used for <samp><span class="option">-march</span></samp>. 164 165 <br><dt><code>-mtpf-trace</code><dt><code>-mno-tpf-trace</code><dd><a name="index-mtpf_002dtrace-1992"></a><a name="index-mno_002dtpf_002dtrace-1993"></a>Generate code that adds (does not add) in TPF OS specific branches to trace 166routines in the operating system. This option is off by default, even 167when compiling for the TPF OS. 168 169 <br><dt><code>-mfused-madd</code><dt><code>-mno-fused-madd</code><dd><a name="index-mfused_002dmadd-1994"></a><a name="index-mno_002dfused_002dmadd-1995"></a>Generate code that uses (does not use) the floating point multiply and 170accumulate instructions. These instructions are generated by default if 171hardware floating point is used. 172 173 <br><dt><code>-mwarn-framesize=</code><var>framesize</var><dd><a name="index-mwarn_002dframesize-1996"></a>Emit a warning if the current function exceeds the given frame size. Because 174this is a compile time check it doesn't need to be a real problem when the program 175runs. It is intended to identify functions which most probably cause 176a stack overflow. It is useful to be used in an environment with limited stack 177size e.g. the linux kernel. 178 179 <br><dt><code>-mwarn-dynamicstack</code><dd><a name="index-mwarn_002ddynamicstack-1997"></a>Emit a warning if the function calls alloca or uses dynamically 180sized arrays. This is generally a bad idea with a limited stack size. 181 182 <br><dt><code>-mstack-guard=</code><var>stack-guard</var><dt><code>-mstack-size=</code><var>stack-size</var><dd><a name="index-mstack_002dguard-1998"></a><a name="index-mstack_002dsize-1999"></a>If these options are provided the s390 back end emits additional instructions in 183the function prologue which trigger a trap if the stack size is <var>stack-guard</var> 184bytes above the <var>stack-size</var> (remember that the stack on s390 grows downward). 185If the <var>stack-guard</var> option is omitted the smallest power of 2 larger than 186the frame size of the compiled function is chosen. 187These options are intended to be used to help debugging stack overflow problems. 188The additionally emitted code causes only little overhead and hence can also be 189used in production like systems without greater performance degradation. The given 190values have to be exact powers of 2 and <var>stack-size</var> has to be greater than 191<var>stack-guard</var> without exceeding 64k. 192In order to be efficient the extra code makes the assumption that the stack starts 193at an address aligned to the value given by <var>stack-size</var>. 194The <var>stack-guard</var> option can only be used in conjunction with <var>stack-size</var>. 195</dl> 196 197 </body></html> 198 199