DEC-Alpha-Options.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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): DEC Alpha Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): DEC Alpha Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): DEC Alpha 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="FR30-Options.html#FR30-Options" rel="next" title="FR30 Options">
  31. <link href="Darwin-Options.html#Darwin-Options" rel="prev" title="Darwin 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="DEC-Alpha-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="FR30-Options.html#FR30-Options" accesskey="n" rel="next">FR30 Options</a>, Previous: <a href="Darwin-Options.html#Darwin-Options" accesskey="p" rel="prev">Darwin 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="DEC-Alpha-Options-1"></a>
  69. <h4 class="subsection">3.18.11 DEC Alpha Options</h4>
  70. <p>These &lsquo;<samp>-m</samp>&rsquo; options are defined for the DEC Alpha implementations:
  71. </p>
  72. <dl compact="compact">
  73. <dt><code>-mno-soft-float</code></dt>
  74. <dt><code>-msoft-float</code></dt>
  75. <dd><a name="index-mno_002dsoft_002dfloat"></a>
  76. <a name="index-msoft_002dfloat-1"></a>
  77. <p>Use (do not use) the hardware floating-point instructions for
  78. 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. Unless they are replaced by routines that emulate the
  81. floating-point operations, or compiled in such a way as to call such
  82. emulations routines, these routines issue floating-point
  83. operations. If you are compiling for an Alpha without floating-point
  84. operations, you must ensure that the library is built so as not to call
  85. them.
  86. </p>
  87. <p>Note that Alpha implementations without floating-point operations are
  88. required to have floating-point registers.
  89. </p>
  90. </dd>
  91. <dt><code>-mfp-reg</code></dt>
  92. <dt><code>-mno-fp-regs</code></dt>
  93. <dd><a name="index-mfp_002dreg"></a>
  94. <a name="index-mno_002dfp_002dregs"></a>
  95. <p>Generate code that uses (does not use) the floating-point register set.
  96. <samp>-mno-fp-regs</samp> implies <samp>-msoft-float</samp>. If the floating-point
  97. register set is not used, floating-point operands are passed in integer
  98. registers as if they were integers and floating-point results are passed
  99. in <code>$0</code> instead of <code>$f0</code>. This is a non-standard calling sequence,
  100. so any function with a floating-point argument or return value called by code
  101. compiled with <samp>-mno-fp-regs</samp> must also be compiled with that
  102. option.
  103. </p>
  104. <p>A typical use of this option is building a kernel that does not use,
  105. and hence need not save and restore, any floating-point registers.
  106. </p>
  107. </dd>
  108. <dt><code>-mieee</code></dt>
  109. <dd><a name="index-mieee"></a>
  110. <p>The Alpha architecture implements floating-point hardware optimized for
  111. maximum performance. It is mostly compliant with the IEEE floating-point
  112. standard. However, for full compliance, software assistance is
  113. required. This option generates code fully IEEE-compliant code
  114. <em>except</em> that the <var>inexact-flag</var> is not maintained (see below).
  115. If this option is turned on, the preprocessor macro <code>_IEEE_FP</code> is
  116. defined during compilation. The resulting code is less efficient but is
  117. able to correctly support denormalized numbers and exceptional IEEE
  118. values such as not-a-number and plus/minus infinity. Other Alpha
  119. compilers call this option <samp>-ieee_with_no_inexact</samp>.
  120. </p>
  121. </dd>
  122. <dt><code>-mieee-with-inexact</code></dt>
  123. <dd><a name="index-mieee_002dwith_002dinexact"></a>
  124. <p>This is like <samp>-mieee</samp> except the generated code also maintains
  125. the IEEE <var>inexact-flag</var>. Turning on this option causes the
  126. generated code to implement fully-compliant IEEE math. In addition to
  127. <code>_IEEE_FP</code>, <code>_IEEE_FP_EXACT</code> is defined as a preprocessor
  128. macro. On some Alpha implementations the resulting code may execute
  129. significantly slower than the code generated by default. Since there is
  130. very little code that depends on the <var>inexact-flag</var>, you should
  131. normally not specify this option. Other Alpha compilers call this
  132. option <samp>-ieee_with_inexact</samp>.
  133. </p>
  134. </dd>
  135. <dt><code>-mfp-trap-mode=<var>trap-mode</var></code></dt>
  136. <dd><a name="index-mfp_002dtrap_002dmode"></a>
  137. <p>This option controls what floating-point related traps are enabled.
  138. Other Alpha compilers call this option <samp>-fptm <var>trap-mode</var></samp>.
  139. The trap mode can be set to one of four values:
  140. </p>
  141. <dl compact="compact">
  142. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  143. <dd><p>This is the default (normal) setting. The only traps that are enabled
  144. are the ones that cannot be disabled in software (e.g., division by zero
  145. trap).
  146. </p>
  147. </dd>
  148. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  149. <dd><p>In addition to the traps enabled by &lsquo;<samp>n</samp>&rsquo;, underflow traps are enabled
  150. as well.
  151. </p>
  152. </dd>
  153. <dt>&lsquo;<samp>su</samp>&rsquo;</dt>
  154. <dd><p>Like &lsquo;<samp>u</samp>&rsquo;, but the instructions are marked to be safe for software
  155. completion (see Alpha architecture manual for details).
  156. </p>
  157. </dd>
  158. <dt>&lsquo;<samp>sui</samp>&rsquo;</dt>
  159. <dd><p>Like &lsquo;<samp>su</samp>&rsquo;, but inexact traps are enabled as well.
  160. </p></dd>
  161. </dl>
  162. </dd>
  163. <dt><code>-mfp-rounding-mode=<var>rounding-mode</var></code></dt>
  164. <dd><a name="index-mfp_002drounding_002dmode"></a>
  165. <p>Selects the IEEE rounding mode. Other Alpha compilers call this option
  166. <samp>-fprm <var>rounding-mode</var></samp>. The <var>rounding-mode</var> can be one
  167. of:
  168. </p>
  169. <dl compact="compact">
  170. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  171. <dd><p>Normal IEEE rounding mode. Floating-point numbers are rounded towards
  172. the nearest machine number or towards the even machine number in case
  173. of a tie.
  174. </p>
  175. </dd>
  176. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  177. <dd><p>Round towards minus infinity.
  178. </p>
  179. </dd>
  180. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  181. <dd><p>Chopped rounding mode. Floating-point numbers are rounded towards zero.
  182. </p>
  183. </dd>
  184. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  185. <dd><p>Dynamic rounding mode. A field in the floating-point control register
  186. (<var>fpcr</var>, see Alpha architecture reference manual) controls the
  187. rounding mode in effect. The C library initializes this register for
  188. rounding towards plus infinity. Thus, unless your program modifies the
  189. <var>fpcr</var>, &lsquo;<samp>d</samp>&rsquo; corresponds to round towards plus infinity.
  190. </p></dd>
  191. </dl>
  192. </dd>
  193. <dt><code>-mtrap-precision=<var>trap-precision</var></code></dt>
  194. <dd><a name="index-mtrap_002dprecision"></a>
  195. <p>In the Alpha architecture, floating-point traps are imprecise. This
  196. means without software assistance it is impossible to recover from a
  197. floating trap and program execution normally needs to be terminated.
  198. GCC can generate code that can assist operating system trap handlers
  199. in determining the exact location that caused a floating-point trap.
  200. Depending on the requirements of an application, different levels of
  201. precisions can be selected:
  202. </p>
  203. <dl compact="compact">
  204. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  205. <dd><p>Program precision. This option is the default and means a trap handler
  206. can only identify which program caused a floating-point exception.
  207. </p>
  208. </dd>
  209. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  210. <dd><p>Function precision. The trap handler can determine the function that
  211. caused a floating-point exception.
  212. </p>
  213. </dd>
  214. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  215. <dd><p>Instruction precision. The trap handler can determine the exact
  216. instruction that caused a floating-point exception.
  217. </p></dd>
  218. </dl>
  219. <p>Other Alpha compilers provide the equivalent options called
  220. <samp>-scope_safe</samp> and <samp>-resumption_safe</samp>.
  221. </p>
  222. </dd>
  223. <dt><code>-mieee-conformant</code></dt>
  224. <dd><a name="index-mieee_002dconformant"></a>
  225. <p>This option marks the generated code as IEEE conformant. You must not
  226. use this option unless you also specify <samp>-mtrap-precision=i</samp> and either
  227. <samp>-mfp-trap-mode=su</samp> or <samp>-mfp-trap-mode=sui</samp>. Its only effect
  228. is to emit the line &lsquo;<samp>.eflag 48</samp>&rsquo; in the function prologue of the
  229. generated assembly file.
  230. </p>
  231. </dd>
  232. <dt><code>-mbuild-constants</code></dt>
  233. <dd><a name="index-mbuild_002dconstants"></a>
  234. <p>Normally GCC examines a 32- or 64-bit integer constant to
  235. see if it can construct it from smaller constants in two or three
  236. instructions. If it cannot, it outputs the constant as a literal and
  237. generates code to load it from the data segment at run time.
  238. </p>
  239. <p>Use this option to require GCC to construct <em>all</em> integer constants
  240. using code, even if it takes more instructions (the maximum is six).
  241. </p>
  242. <p>You typically use this option to build a shared library dynamic
  243. loader. Itself a shared library, it must relocate itself in memory
  244. before it can find the variables and constants in its own data segment.
  245. </p>
  246. </dd>
  247. <dt><code>-mbwx</code></dt>
  248. <dt><code>-mno-bwx</code></dt>
  249. <dt><code>-mcix</code></dt>
  250. <dt><code>-mno-cix</code></dt>
  251. <dt><code>-mfix</code></dt>
  252. <dt><code>-mno-fix</code></dt>
  253. <dt><code>-mmax</code></dt>
  254. <dt><code>-mno-max</code></dt>
  255. <dd><a name="index-mbwx"></a>
  256. <a name="index-mno_002dbwx"></a>
  257. <a name="index-mcix"></a>
  258. <a name="index-mno_002dcix"></a>
  259. <a name="index-mfix"></a>
  260. <a name="index-mno_002dfix"></a>
  261. <a name="index-mmax"></a>
  262. <a name="index-mno_002dmax"></a>
  263. <p>Indicate whether GCC should generate code to use the optional BWX,
  264. CIX, FIX and MAX instruction sets. The default is to use the instruction
  265. sets supported by the CPU type specified via <samp>-mcpu=</samp> option or that
  266. of the CPU on which GCC was built if none is specified.
  267. </p>
  268. </dd>
  269. <dt><code>-mfloat-vax</code></dt>
  270. <dt><code>-mfloat-ieee</code></dt>
  271. <dd><a name="index-mfloat_002dvax"></a>
  272. <a name="index-mfloat_002dieee"></a>
  273. <p>Generate code that uses (does not use) VAX F and G floating-point
  274. arithmetic instead of IEEE single and double precision.
  275. </p>
  276. </dd>
  277. <dt><code>-mexplicit-relocs</code></dt>
  278. <dt><code>-mno-explicit-relocs</code></dt>
  279. <dd><a name="index-mexplicit_002drelocs"></a>
  280. <a name="index-mno_002dexplicit_002drelocs"></a>
  281. <p>Older Alpha assemblers provided no way to generate symbol relocations
  282. except via assembler macros. Use of these macros does not allow
  283. optimal instruction scheduling. GNU binutils as of version 2.12
  284. supports a new syntax that allows the compiler to explicitly mark
  285. which relocations should apply to which instructions. This option
  286. is mostly useful for debugging, as GCC detects the capabilities of
  287. the assembler when it is built and sets the default accordingly.
  288. </p>
  289. </dd>
  290. <dt><code>-msmall-data</code></dt>
  291. <dt><code>-mlarge-data</code></dt>
  292. <dd><a name="index-msmall_002ddata"></a>
  293. <a name="index-mlarge_002ddata"></a>
  294. <p>When <samp>-mexplicit-relocs</samp> is in effect, static data is
  295. accessed via <em>gp-relative</em> relocations. When <samp>-msmall-data</samp>
  296. is used, objects 8 bytes long or smaller are placed in a <em>small data area</em>
  297. (the <code>.sdata</code> and <code>.sbss</code> sections) and are accessed via
  298. 16-bit relocations off of the <code>$gp</code> register. This limits the
  299. size of the small data area to 64KB, but allows the variables to be
  300. directly accessed via a single instruction.
  301. </p>
  302. <p>The default is <samp>-mlarge-data</samp>. With this option the data area
  303. is limited to just below 2GB. Programs that require more than 2GB of
  304. data must use <code>malloc</code> or <code>mmap</code> to allocate the data in the
  305. heap instead of in the program&rsquo;s data segment.
  306. </p>
  307. <p>When generating code for shared libraries, <samp>-fpic</samp> implies
  308. <samp>-msmall-data</samp> and <samp>-fPIC</samp> implies <samp>-mlarge-data</samp>.
  309. </p>
  310. </dd>
  311. <dt><code>-msmall-text</code></dt>
  312. <dt><code>-mlarge-text</code></dt>
  313. <dd><a name="index-msmall_002dtext"></a>
  314. <a name="index-mlarge_002dtext"></a>
  315. <p>When <samp>-msmall-text</samp> is used, the compiler assumes that the
  316. code of the entire program (or shared library) fits in 4MB, and is
  317. thus reachable with a branch instruction. When <samp>-msmall-data</samp>
  318. is used, the compiler can assume that all local symbols share the
  319. same <code>$gp</code> value, and thus reduce the number of instructions
  320. required for a function call from 4 to 1.
  321. </p>
  322. <p>The default is <samp>-mlarge-text</samp>.
  323. </p>
  324. </dd>
  325. <dt><code>-mcpu=<var>cpu_type</var></code></dt>
  326. <dd><a name="index-mcpu-4"></a>
  327. <p>Set the instruction set and instruction scheduling parameters for
  328. machine type <var>cpu_type</var>. You can specify either the &lsquo;<samp>EV</samp>&rsquo;
  329. style name or the corresponding chip number. GCC supports scheduling
  330. parameters for the EV4, EV5 and EV6 family of processors and
  331. chooses the default values for the instruction set from the processor
  332. you specify. If you do not specify a processor type, GCC defaults
  333. to the processor on which the compiler was built.
  334. </p>
  335. <p>Supported values for <var>cpu_type</var> are
  336. </p>
  337. <dl compact="compact">
  338. <dt>&lsquo;<samp>ev4</samp>&rsquo;</dt>
  339. <dt>&lsquo;<samp>ev45</samp>&rsquo;</dt>
  340. <dt>&lsquo;<samp>21064</samp>&rsquo;</dt>
  341. <dd><p>Schedules as an EV4 and has no instruction set extensions.
  342. </p>
  343. </dd>
  344. <dt>&lsquo;<samp>ev5</samp>&rsquo;</dt>
  345. <dt>&lsquo;<samp>21164</samp>&rsquo;</dt>
  346. <dd><p>Schedules as an EV5 and has no instruction set extensions.
  347. </p>
  348. </dd>
  349. <dt>&lsquo;<samp>ev56</samp>&rsquo;</dt>
  350. <dt>&lsquo;<samp>21164a</samp>&rsquo;</dt>
  351. <dd><p>Schedules as an EV5 and supports the BWX extension.
  352. </p>
  353. </dd>
  354. <dt>&lsquo;<samp>pca56</samp>&rsquo;</dt>
  355. <dt>&lsquo;<samp>21164pc</samp>&rsquo;</dt>
  356. <dt>&lsquo;<samp>21164PC</samp>&rsquo;</dt>
  357. <dd><p>Schedules as an EV5 and supports the BWX and MAX extensions.
  358. </p>
  359. </dd>
  360. <dt>&lsquo;<samp>ev6</samp>&rsquo;</dt>
  361. <dt>&lsquo;<samp>21264</samp>&rsquo;</dt>
  362. <dd><p>Schedules as an EV6 and supports the BWX, FIX, and MAX extensions.
  363. </p>
  364. </dd>
  365. <dt>&lsquo;<samp>ev67</samp>&rsquo;</dt>
  366. <dt>&lsquo;<samp>21264a</samp>&rsquo;</dt>
  367. <dd><p>Schedules as an EV6 and supports the BWX, CIX, FIX, and MAX extensions.
  368. </p></dd>
  369. </dl>
  370. <p>Native toolchains also support the value &lsquo;<samp>native</samp>&rsquo;,
  371. which selects the best architecture option for the host processor.
  372. <samp>-mcpu=native</samp> has no effect if GCC does not recognize
  373. the processor.
  374. </p>
  375. </dd>
  376. <dt><code>-mtune=<var>cpu_type</var></code></dt>
  377. <dd><a name="index-mtune-5"></a>
  378. <p>Set only the instruction scheduling parameters for machine type
  379. <var>cpu_type</var>. The instruction set is not changed.
  380. </p>
  381. <p>Native toolchains also support the value &lsquo;<samp>native</samp>&rsquo;,
  382. which selects the best architecture option for the host processor.
  383. <samp>-mtune=native</samp> has no effect if GCC does not recognize
  384. the processor.
  385. </p>
  386. </dd>
  387. <dt><code>-mmemory-latency=<var>time</var></code></dt>
  388. <dd><a name="index-mmemory_002dlatency"></a>
  389. <p>Sets the latency the scheduler should assume for typical memory
  390. references as seen by the application. This number is highly
  391. dependent on the memory access patterns used by the application
  392. and the size of the external cache on the machine.
  393. </p>
  394. <p>Valid options for <var>time</var> are
  395. </p>
  396. <dl compact="compact">
  397. <dt>&lsquo;<samp><var>number</var></samp>&rsquo;</dt>
  398. <dd><p>A decimal number representing clock cycles.
  399. </p>
  400. </dd>
  401. <dt>&lsquo;<samp>L1</samp>&rsquo;</dt>
  402. <dt>&lsquo;<samp>L2</samp>&rsquo;</dt>
  403. <dt>&lsquo;<samp>L3</samp>&rsquo;</dt>
  404. <dt>&lsquo;<samp>main</samp>&rsquo;</dt>
  405. <dd><p>The compiler contains estimates of the number of clock cycles for
  406. &ldquo;typical&rdquo; EV4 &amp; EV5 hardware for the Level 1, 2 &amp; 3 caches
  407. (also called Dcache, Scache, and Bcache), as well as to main memory.
  408. Note that L3 is only valid for EV5.
  409. </p>
  410. </dd>
  411. </dl>
  412. </dd>
  413. </dl>
  414. <hr>
  415. <div class="header">
  416. <p>
  417. Next: <a href="FR30-Options.html#FR30-Options" accesskey="n" rel="next">FR30 Options</a>, Previous: <a href="Darwin-Options.html#Darwin-Options" accesskey="p" rel="prev">Darwin 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>
  418. </div>
  419. </body>
  420. </html>