Misc.html 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482
  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>GNU Compiler Collection (GCC) Internals: Misc</title>
  20. <meta name="description" content="GNU Compiler Collection (GCC) Internals: Misc">
  21. <meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Misc">
  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="Target-Macros.html#Target-Macros" rel="up" title="Target Macros">
  30. <link href="Host-Config.html#Host-Config" rel="next" title="Host Config">
  31. <link href="Named-Address-Spaces.html#Named-Address-Spaces" rel="prev" title="Named Address Spaces">
  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="Misc"></a>
  63. <div class="header">
  64. <p>
  65. Previous: <a href="Named-Address-Spaces.html#Named-Address-Spaces" accesskey="p" rel="prev">Named Address Spaces</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</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="Miscellaneous-Parameters"></a>
  69. <h3 class="section">17.30 Miscellaneous Parameters</h3>
  70. <a name="index-parameters_002c-miscellaneous"></a>
  71. <p>Here are several miscellaneous parameters.
  72. </p>
  73. <dl>
  74. <dt><a name="index-HAS_005fLONG_005fCOND_005fBRANCH"></a>Macro: <strong>HAS_LONG_COND_BRANCH</strong></dt>
  75. <dd><p>Define this boolean macro to indicate whether or not your architecture
  76. has conditional branches that can span all of memory. It is used in
  77. conjunction with an optimization that partitions hot and cold basic
  78. blocks into separate sections of the executable. If this macro is
  79. set to false, gcc will convert any conditional branches that attempt
  80. to cross between sections into unconditional branches or indirect jumps.
  81. </p></dd></dl>
  82. <dl>
  83. <dt><a name="index-HAS_005fLONG_005fUNCOND_005fBRANCH"></a>Macro: <strong>HAS_LONG_UNCOND_BRANCH</strong></dt>
  84. <dd><p>Define this boolean macro to indicate whether or not your architecture
  85. has unconditional branches that can span all of memory. It is used in
  86. conjunction with an optimization that partitions hot and cold basic
  87. blocks into separate sections of the executable. If this macro is
  88. set to false, gcc will convert any unconditional branches that attempt
  89. to cross between sections into indirect jumps.
  90. </p></dd></dl>
  91. <dl>
  92. <dt><a name="index-CASE_005fVECTOR_005fMODE"></a>Macro: <strong>CASE_VECTOR_MODE</strong></dt>
  93. <dd><p>An alias for a machine mode name. This is the machine mode that
  94. elements of a jump-table should have.
  95. </p></dd></dl>
  96. <dl>
  97. <dt><a name="index-CASE_005fVECTOR_005fSHORTEN_005fMODE"></a>Macro: <strong>CASE_VECTOR_SHORTEN_MODE</strong> <em>(<var>min_offset</var>, <var>max_offset</var>, <var>body</var>)</em></dt>
  98. <dd><p>Optional: return the preferred mode for an <code>addr_diff_vec</code>
  99. when the minimum and maximum offset are known. If you define this,
  100. it enables extra code in branch shortening to deal with <code>addr_diff_vec</code>.
  101. To make this work, you also have to define <code>INSN_ALIGN</code> and
  102. make the alignment for <code>addr_diff_vec</code> explicit.
  103. The <var>body</var> argument is provided so that the offset_unsigned and scale
  104. flags can be updated.
  105. </p></dd></dl>
  106. <dl>
  107. <dt><a name="index-CASE_005fVECTOR_005fPC_005fRELATIVE"></a>Macro: <strong>CASE_VECTOR_PC_RELATIVE</strong></dt>
  108. <dd><p>Define this macro to be a C expression to indicate when jump-tables
  109. should contain relative addresses. You need not define this macro if
  110. jump-tables never contain relative addresses, or jump-tables should
  111. contain relative addresses only when <samp>-fPIC</samp> or <samp>-fPIC</samp>
  112. is in effect.
  113. </p></dd></dl>
  114. <dl>
  115. <dt><a name="index-TARGET_005fCASE_005fVALUES_005fTHRESHOLD"></a>Target Hook: <em>unsigned int</em> <strong>TARGET_CASE_VALUES_THRESHOLD</strong> <em>(void)</em></dt>
  116. <dd><p>This function return the smallest number of different values for which it
  117. is best to use a jump-table instead of a tree of conditional branches.
  118. The default is four for machines with a <code>casesi</code> instruction and
  119. five otherwise. This is best for most machines.
  120. </p></dd></dl>
  121. <dl>
  122. <dt><a name="index-WORD_005fREGISTER_005fOPERATIONS"></a>Macro: <strong>WORD_REGISTER_OPERATIONS</strong></dt>
  123. <dd><p>Define this macro to 1 if operations between registers with integral mode
  124. smaller than a word are always performed on the entire register. To be
  125. more explicit, if you start with a pair of <code>word_mode</code> registers with
  126. known values and you do a subword, for example <code>QImode</code>, addition on
  127. the low part of the registers, then the compiler may consider that the
  128. result has a known value in <code>word_mode</code> too if the macro is defined
  129. to 1. Most RISC machines have this property and most CISC machines do not.
  130. </p></dd></dl>
  131. <dl>
  132. <dt><a name="index-TARGET_005fMIN_005fARITHMETIC_005fPRECISION"></a>Target Hook: <em>unsigned int</em> <strong>TARGET_MIN_ARITHMETIC_PRECISION</strong> <em>(void)</em></dt>
  133. <dd><p>On some RISC architectures with 64-bit registers, the processor also
  134. maintains 32-bit condition codes that make it possible to do real 32-bit
  135. arithmetic, although the operations are performed on the full registers.
  136. </p>
  137. <p>On such architectures, defining this hook to 32 tells the compiler to try
  138. using 32-bit arithmetical operations setting the condition codes instead
  139. of doing full 64-bit arithmetic.
  140. </p>
  141. <p>More generally, define this hook on RISC architectures if you want the
  142. compiler to try using arithmetical operations setting the condition codes
  143. with a precision lower than the word precision.
  144. </p>
  145. <p>You need not define this hook if <code>WORD_REGISTER_OPERATIONS</code> is not
  146. defined to 1.
  147. </p></dd></dl>
  148. <dl>
  149. <dt><a name="index-LOAD_005fEXTEND_005fOP"></a>Macro: <strong>LOAD_EXTEND_OP</strong> <em>(<var>mem_mode</var>)</em></dt>
  150. <dd><p>Define this macro to be a C expression indicating when insns that read
  151. memory in <var>mem_mode</var>, an integral mode narrower than a word, set the
  152. bits outside of <var>mem_mode</var> to be either the sign-extension or the
  153. zero-extension of the data read. Return <code>SIGN_EXTEND</code> for values
  154. of <var>mem_mode</var> for which the
  155. insn sign-extends, <code>ZERO_EXTEND</code> for which it zero-extends, and
  156. <code>UNKNOWN</code> for other modes.
  157. </p>
  158. <p>This macro is not called with <var>mem_mode</var> non-integral or with a width
  159. greater than or equal to <code>BITS_PER_WORD</code>, so you may return any
  160. value in this case. Do not define this macro if it would always return
  161. <code>UNKNOWN</code>. On machines where this macro is defined, you will normally
  162. define it as the constant <code>SIGN_EXTEND</code> or <code>ZERO_EXTEND</code>.
  163. </p>
  164. <p>You may return a non-<code>UNKNOWN</code> value even if for some hard registers
  165. the sign extension is not performed, if for the <code>REGNO_REG_CLASS</code>
  166. of these hard registers <code>CANNOT_CHANGE_MODE_CLASS</code> returns nonzero
  167. when the <var>from</var> mode is <var>mem_mode</var> and the <var>to</var> mode is any
  168. integral mode larger than this but not larger than <code>word_mode</code>.
  169. </p>
  170. <p>You must return <code>UNKNOWN</code> if for some hard registers that allow this
  171. mode, <code>CANNOT_CHANGE_MODE_CLASS</code> says that they cannot change to
  172. <code>word_mode</code>, but that they can change to another integral mode that
  173. is larger then <var>mem_mode</var> but still smaller than <code>word_mode</code>.
  174. </p></dd></dl>
  175. <dl>
  176. <dt><a name="index-SHORT_005fIMMEDIATES_005fSIGN_005fEXTEND"></a>Macro: <strong>SHORT_IMMEDIATES_SIGN_EXTEND</strong></dt>
  177. <dd><p>Define this macro to 1 if loading short immediate values into registers sign
  178. extends.
  179. </p></dd></dl>
  180. <dl>
  181. <dt><a name="index-TARGET_005fMIN_005fDIVISIONS_005fFOR_005fRECIP_005fMUL"></a>Target Hook: <em>unsigned int</em> <strong>TARGET_MIN_DIVISIONS_FOR_RECIP_MUL</strong> <em>(machine_mode <var>mode</var>)</em></dt>
  182. <dd><p>When <samp>-ffast-math</samp> is in effect, GCC tries to optimize
  183. divisions by the same divisor, by turning them into multiplications by
  184. the reciprocal. This target hook specifies the minimum number of divisions
  185. that should be there for GCC to perform the optimization for a variable
  186. of mode <var>mode</var>. The default implementation returns 3 if the machine
  187. has an instruction for the division, and 2 if it does not.
  188. </p></dd></dl>
  189. <dl>
  190. <dt><a name="index-MOVE_005fMAX"></a>Macro: <strong>MOVE_MAX</strong></dt>
  191. <dd><p>The maximum number of bytes that a single instruction can move quickly
  192. between memory and registers or between two memory locations.
  193. </p></dd></dl>
  194. <dl>
  195. <dt><a name="index-MAX_005fMOVE_005fMAX"></a>Macro: <strong>MAX_MOVE_MAX</strong></dt>
  196. <dd><p>The maximum number of bytes that a single instruction can move quickly
  197. between memory and registers or between two memory locations. If this
  198. is undefined, the default is <code>MOVE_MAX</code>. Otherwise, it is the
  199. constant value that is the largest value that <code>MOVE_MAX</code> can have
  200. at run-time.
  201. </p></dd></dl>
  202. <dl>
  203. <dt><a name="index-SHIFT_005fCOUNT_005fTRUNCATED"></a>Macro: <strong>SHIFT_COUNT_TRUNCATED</strong></dt>
  204. <dd><p>A C expression that is nonzero if on this machine the number of bits
  205. actually used for the count of a shift operation is equal to the number
  206. of bits needed to represent the size of the object being shifted. When
  207. this macro is nonzero, the compiler will assume that it is safe to omit
  208. a sign-extend, zero-extend, and certain bitwise &lsquo;and&rsquo; instructions that
  209. truncates the count of a shift operation. On machines that have
  210. instructions that act on bit-fields at variable positions, which may
  211. include &lsquo;bit test&rsquo; instructions, a nonzero <code>SHIFT_COUNT_TRUNCATED</code>
  212. also enables deletion of truncations of the values that serve as
  213. arguments to bit-field instructions.
  214. </p>
  215. <p>If both types of instructions truncate the count (for shifts) and
  216. position (for bit-field operations), or if no variable-position bit-field
  217. instructions exist, you should define this macro.
  218. </p>
  219. <p>However, on some machines, such as the 80386 and the 680x0, truncation
  220. only applies to shift operations and not the (real or pretended)
  221. bit-field operations. Define <code>SHIFT_COUNT_TRUNCATED</code> to be zero on
  222. such machines. Instead, add patterns to the <samp>md</samp> file that include
  223. the implied truncation of the shift instructions.
  224. </p>
  225. <p>You need not define this macro if it would always have the value of zero.
  226. </p></dd></dl>
  227. <a name="TARGET_005fSHIFT_005fTRUNCATION_005fMASK"></a><dl>
  228. <dt><a name="index-TARGET_005fSHIFT_005fTRUNCATION_005fMASK"></a>Target Hook: <em>unsigned HOST_WIDE_INT</em> <strong>TARGET_SHIFT_TRUNCATION_MASK</strong> <em>(machine_mode <var>mode</var>)</em></dt>
  229. <dd><p>This function describes how the standard shift patterns for <var>mode</var>
  230. deal with shifts by negative amounts or by more than the width of the mode.
  231. See <a href="Standard-Names.html#shift-patterns">shift patterns</a>.
  232. </p>
  233. <p>On many machines, the shift patterns will apply a mask <var>m</var> to the
  234. shift count, meaning that a fixed-width shift of <var>x</var> by <var>y</var> is
  235. equivalent to an arbitrary-width shift of <var>x</var> by <var>y &amp; m</var>. If
  236. this is true for mode <var>mode</var>, the function should return <var>m</var>,
  237. otherwise it should return 0. A return value of 0 indicates that no
  238. particular behavior is guaranteed.
  239. </p>
  240. <p>Note that, unlike <code>SHIFT_COUNT_TRUNCATED</code>, this function does
  241. <em>not</em> apply to general shift rtxes; it applies only to instructions
  242. that are generated by the named shift patterns.
  243. </p>
  244. <p>The default implementation of this function returns
  245. <code>GET_MODE_BITSIZE (<var>mode</var>) - 1</code> if <code>SHIFT_COUNT_TRUNCATED</code>
  246. and 0 otherwise. This definition is always safe, but if
  247. <code>SHIFT_COUNT_TRUNCATED</code> is false, and some shift patterns
  248. nevertheless truncate the shift count, you may get better code
  249. by overriding it.
  250. </p></dd></dl>
  251. <dl>
  252. <dt><a name="index-TRULY_005fNOOP_005fTRUNCATION"></a>Macro: <strong>TRULY_NOOP_TRUNCATION</strong> <em>(<var>outprec</var>, <var>inprec</var>)</em></dt>
  253. <dd><p>A C expression which is nonzero if on this machine it is safe to
  254. &ldquo;convert&rdquo; an integer of <var>inprec</var> bits to one of <var>outprec</var>
  255. bits (where <var>outprec</var> is smaller than <var>inprec</var>) by merely
  256. operating on it as if it had only <var>outprec</var> bits.
  257. </p>
  258. <p>On many machines, this expression can be 1.
  259. </p>
  260. <p>When <code>TRULY_NOOP_TRUNCATION</code> returns 1 for a pair of sizes for
  261. modes for which <code>MODES_TIEABLE_P</code> is 0, suboptimal code can result.
  262. If this is the case, making <code>TRULY_NOOP_TRUNCATION</code> return 0 in
  263. such cases may improve things.
  264. </p></dd></dl>
  265. <dl>
  266. <dt><a name="index-TARGET_005fMODE_005fREP_005fEXTENDED"></a>Target Hook: <em>int</em> <strong>TARGET_MODE_REP_EXTENDED</strong> <em>(machine_mode <var>mode</var>, machine_mode <var>rep_mode</var>)</em></dt>
  267. <dd><p>The representation of an integral mode can be such that the values
  268. are always extended to a wider integral mode. Return
  269. <code>SIGN_EXTEND</code> if values of <var>mode</var> are represented in
  270. sign-extended form to <var>rep_mode</var>. Return <code>UNKNOWN</code>
  271. otherwise. (Currently, none of the targets use zero-extended
  272. representation this way so unlike <code>LOAD_EXTEND_OP</code>,
  273. <code>TARGET_MODE_REP_EXTENDED</code> is expected to return either
  274. <code>SIGN_EXTEND</code> or <code>UNKNOWN</code>. Also no target extends
  275. <var>mode</var> to <var>rep_mode</var> so that <var>rep_mode</var> is not the next
  276. widest integral mode and currently we take advantage of this fact.)
  277. </p>
  278. <p>Similarly to <code>LOAD_EXTEND_OP</code> you may return a non-<code>UNKNOWN</code>
  279. value even if the extension is not performed on certain hard registers
  280. as long as for the <code>REGNO_REG_CLASS</code> of these hard registers
  281. <code>CANNOT_CHANGE_MODE_CLASS</code> returns nonzero.
  282. </p>
  283. <p>Note that <code>TARGET_MODE_REP_EXTENDED</code> and <code>LOAD_EXTEND_OP</code>
  284. describe two related properties. If you define
  285. <code>TARGET_MODE_REP_EXTENDED (mode, word_mode)</code> you probably also want
  286. to define <code>LOAD_EXTEND_OP (mode)</code> to return the same type of
  287. extension.
  288. </p>
  289. <p>In order to enforce the representation of <code>mode</code>,
  290. <code>TRULY_NOOP_TRUNCATION</code> should return false when truncating to
  291. <code>mode</code>.
  292. </p></dd></dl>
  293. <dl>
  294. <dt><a name="index-STORE_005fFLAG_005fVALUE"></a>Macro: <strong>STORE_FLAG_VALUE</strong></dt>
  295. <dd><p>A C expression describing the value returned by a comparison operator
  296. with an integral mode and stored by a store-flag instruction
  297. (&lsquo;<samp>cstore<var>mode</var>4</samp>&rsquo;) when the condition is true. This description must
  298. apply to <em>all</em> the &lsquo;<samp>cstore<var>mode</var>4</samp>&rsquo; patterns and all the
  299. comparison operators whose results have a <code>MODE_INT</code> mode.
  300. </p>
  301. <p>A value of 1 or -1 means that the instruction implementing the
  302. comparison operator returns exactly 1 or -1 when the comparison is true
  303. and 0 when the comparison is false. Otherwise, the value indicates
  304. which bits of the result are guaranteed to be 1 when the comparison is
  305. true. This value is interpreted in the mode of the comparison
  306. operation, which is given by the mode of the first operand in the
  307. &lsquo;<samp>cstore<var>mode</var>4</samp>&rsquo; pattern. Either the low bit or the sign bit of
  308. <code>STORE_FLAG_VALUE</code> be on. Presently, only those bits are used by
  309. the compiler.
  310. </p>
  311. <p>If <code>STORE_FLAG_VALUE</code> is neither 1 or -1, the compiler will
  312. generate code that depends only on the specified bits. It can also
  313. replace comparison operators with equivalent operations if they cause
  314. the required bits to be set, even if the remaining bits are undefined.
  315. For example, on a machine whose comparison operators return an
  316. <code>SImode</code> value and where <code>STORE_FLAG_VALUE</code> is defined as
  317. &lsquo;<samp>0x80000000</samp>&rsquo;, saying that just the sign bit is relevant, the
  318. expression
  319. </p>
  320. <div class="smallexample">
  321. <pre class="smallexample">(ne:SI (and:SI <var>x</var> (const_int <var>power-of-2</var>)) (const_int 0))
  322. </pre></div>
  323. <p>can be converted to
  324. </p>
  325. <div class="smallexample">
  326. <pre class="smallexample">(ashift:SI <var>x</var> (const_int <var>n</var>))
  327. </pre></div>
  328. <p>where <var>n</var> is the appropriate shift count to move the bit being
  329. tested into the sign bit.
  330. </p>
  331. <p>There is no way to describe a machine that always sets the low-order bit
  332. for a true value, but does not guarantee the value of any other bits,
  333. but we do not know of any machine that has such an instruction. If you
  334. are trying to port GCC to such a machine, include an instruction to
  335. perform a logical-and of the result with 1 in the pattern for the
  336. comparison operators and let us know at <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a>.
  337. </p>
  338. <p>Often, a machine will have multiple instructions that obtain a value
  339. from a comparison (or the condition codes). Here are rules to guide the
  340. choice of value for <code>STORE_FLAG_VALUE</code>, and hence the instructions
  341. to be used:
  342. </p>
  343. <ul>
  344. <li> Use the shortest sequence that yields a valid definition for
  345. <code>STORE_FLAG_VALUE</code>. It is more efficient for the compiler to
  346. &ldquo;normalize&rdquo; the value (convert it to, e.g., 1 or 0) than for the
  347. comparison operators to do so because there may be opportunities to
  348. combine the normalization with other operations.
  349. </li><li> For equal-length sequences, use a value of 1 or -1, with -1 being
  350. slightly preferred on machines with expensive jumps and 1 preferred on
  351. other machines.
  352. </li><li> As a second choice, choose a value of &lsquo;<samp>0x80000001</samp>&rsquo; if instructions
  353. exist that set both the sign and low-order bits but do not define the
  354. others.
  355. </li><li> Otherwise, use a value of &lsquo;<samp>0x80000000</samp>&rsquo;.
  356. </li></ul>
  357. <p>Many machines can produce both the value chosen for
  358. <code>STORE_FLAG_VALUE</code> and its negation in the same number of
  359. instructions. On those machines, you should also define a pattern for
  360. those cases, e.g., one matching
  361. </p>
  362. <div class="smallexample">
  363. <pre class="smallexample">(set <var>A</var> (neg:<var>m</var> (ne:<var>m</var> <var>B</var> <var>C</var>)))
  364. </pre></div>
  365. <p>Some machines can also perform <code>and</code> or <code>plus</code> operations on
  366. condition code values with less instructions than the corresponding
  367. &lsquo;<samp>cstore<var>mode</var>4</samp>&rsquo; insn followed by <code>and</code> or <code>plus</code>. On those
  368. machines, define the appropriate patterns. Use the names <code>incscc</code>
  369. and <code>decscc</code>, respectively, for the patterns which perform
  370. <code>plus</code> or <code>minus</code> operations on condition code values. See
  371. <samp>rs6000.md</samp> for some examples. The GNU Superoptimizer can be used to
  372. find such instruction sequences on other machines.
  373. </p>
  374. <p>If this macro is not defined, the default value, 1, is used. You need
  375. not define <code>STORE_FLAG_VALUE</code> if the machine has no store-flag
  376. instructions, or if the value generated by these instructions is 1.
  377. </p></dd></dl>
  378. <dl>
  379. <dt><a name="index-FLOAT_005fSTORE_005fFLAG_005fVALUE"></a>Macro: <strong>FLOAT_STORE_FLAG_VALUE</strong> <em>(<var>mode</var>)</em></dt>
  380. <dd><p>A C expression that gives a nonzero <code>REAL_VALUE_TYPE</code> value that is
  381. returned when comparison operators with floating-point results are true.
  382. Define this macro on machines that have comparison operations that return
  383. floating-point values. If there are no such operations, do not define
  384. this macro.
  385. </p></dd></dl>
  386. <dl>
  387. <dt><a name="index-VECTOR_005fSTORE_005fFLAG_005fVALUE"></a>Macro: <strong>VECTOR_STORE_FLAG_VALUE</strong> <em>(<var>mode</var>)</em></dt>
  388. <dd><p>A C expression that gives a rtx representing the nonzero true element
  389. for vector comparisons. The returned rtx should be valid for the inner
  390. mode of <var>mode</var> which is guaranteed to be a vector mode. Define
  391. this macro on machines that have vector comparison operations that
  392. return a vector result. If there are no such operations, do not define
  393. this macro. Typically, this macro is defined as <code>const1_rtx</code> or
  394. <code>constm1_rtx</code>. This macro may return <code>NULL_RTX</code> to prevent
  395. the compiler optimizing such vector comparison operations for the
  396. given mode.
  397. </p></dd></dl>
  398. <dl>
  399. <dt><a name="index-CLZ_005fDEFINED_005fVALUE_005fAT_005fZERO"></a>Macro: <strong>CLZ_DEFINED_VALUE_AT_ZERO</strong> <em>(<var>mode</var>, <var>value</var>)</em></dt>
  400. <dt><a name="index-CTZ_005fDEFINED_005fVALUE_005fAT_005fZERO"></a>Macro: <strong>CTZ_DEFINED_VALUE_AT_ZERO</strong> <em>(<var>mode</var>, <var>value</var>)</em></dt>
  401. <dd><p>A C expression that indicates whether the architecture defines a value
  402. for <code>clz</code> or <code>ctz</code> with a zero operand.
  403. A result of <code>0</code> indicates the value is undefined.
  404. If the value is defined for only the RTL expression, the macro should
  405. evaluate to <code>1</code>; if the value applies also to the corresponding optab
  406. entry (which is normally the case if it expands directly into
  407. the corresponding RTL), then the macro should evaluate to <code>2</code>.
  408. In the cases where the value is defined, <var>value</var> should be set to
  409. this value.
  410. </p>
  411. <p>If this macro is not defined, the value of <code>clz</code> or
  412. <code>ctz</code> at zero is assumed to be undefined.
  413. </p>
  414. <p>This macro must be defined if the target&rsquo;s expansion for <code>ffs</code>
  415. relies on a particular value to get correct results. Otherwise it
  416. is not necessary, though it may be used to optimize some corner cases, and
  417. to provide a default expansion for the <code>ffs</code> optab.
  418. </p>
  419. <p>Note that regardless of this macro the &ldquo;definedness&rdquo; of <code>clz</code>
  420. and <code>ctz</code> at zero do <em>not</em> extend to the builtin functions
  421. visible to the user. Thus one may be free to adjust the value at will
  422. to match the target expansion of these operations without fear of
  423. breaking the API.
  424. </p></dd></dl>
  425. <dl>
  426. <dt><a name="index-Pmode"></a>Macro: <strong>Pmode</strong></dt>
  427. <dd><p>An alias for the machine mode for pointers. On most machines, define
  428. this to be the integer mode corresponding to the width of a hardware
  429. pointer; <code>SImode</code> on 32-bit machine or <code>DImode</code> on 64-bit machines.
  430. On some machines you must define this to be one of the partial integer
  431. modes, such as <code>PSImode</code>.
  432. </p>
  433. <p>The width of <code>Pmode</code> must be at least as large as the value of
  434. <code>POINTER_SIZE</code>. If it is not equal, you must define the macro
  435. <code>POINTERS_EXTEND_UNSIGNED</code> to specify how pointers are extended
  436. to <code>Pmode</code>.
  437. </p></dd></dl>
  438. <dl>
  439. <dt><a name="index-FUNCTION_005fMODE"></a>Macro: <strong>FUNCTION_MODE</strong></dt>
  440. <dd><p>An alias for the machine mode used for memory references to functions
  441. being called, in <code>call</code> RTL expressions. On most CISC machines,
  442. where an instruction can begin at any byte address, this should be
  443. <code>QImode</code>. On most RISC machines, where all instructions have fixed
  444. size and alignment, this should be a mode with the same size and alignment
  445. as the machine instruction words - typically <code>SImode</code> or <code>HImode</code>.
  446. </p></dd></dl>
  447. <dl>
  448. <dt><a name="index-STDC_005f0_005fIN_005fSYSTEM_005fHEADERS"></a>Macro: <strong>STDC_0_IN_SYSTEM_HEADERS</strong></dt>
  449. <dd><p>In normal operation, the preprocessor expands <code>__STDC__</code> to the
  450. constant 1, to signify that GCC conforms to ISO Standard C. On some
  451. hosts, like Solaris, the system compiler uses a different convention,
  452. where <code>__STDC__</code> is normally 0, but is 1 if the user specifies
  453. strict conformance to the C Standard.
  454. </p>
  455. <p>Defining <code>STDC_0_IN_SYSTEM_HEADERS</code> makes GNU CPP follows the host
  456. convention when processing system header files, but when processing user
  457. files <code>__STDC__</code> will always expand to 1.
  458. </p></dd></dl>
  459. <dl>
  460. <dt><a name="index-TARGET_005fC_005fPREINCLUDE"></a>C Target Hook: <em>const char *</em> <strong>TARGET_C_PREINCLUDE</strong> <em>(void)</em></dt>
  461. <dd><p>Define this hook to return the name of a header file to be included at the start of all compilations, as if it had been included with <code>#include &lt;<var>file</var>&gt;</code>. If this hook returns <code>NULL</code>, or is not defined, or the header is not found, or if the user specifies <samp>-ffreestanding</samp> or <samp>-nostdinc</samp>, no header is included.
  462. </p>
  463. <p>This hook can be used together with a header provided by the system C library to implement ISO C requirements for certain macros to be predefined that describe properties of the whole implementation rather than just the compiler.
  464. </p></dd></dl>
  465. <dl>
  466. <dt><a name="index-TARGET_005fCXX_005fIMPLICIT_005fEXTERN_005fC"></a>C Target Hook: <em>bool</em> <strong>TARGET_CXX_IMPLICIT_EXTERN_C</strong> <em>(const char*<var></var>)</em></dt>
  467. <dd><p>Define this hook to add target-specific C++ implicit extern C functions. If this function returns true for the name of a file-scope function, that function implicitly gets extern &quot;C&quot; linkage rather than whatever language linkage the declaration would normally have. An example of such function is WinMain on Win32 targets.
  468. </p></dd></dl>
  469. <dl>
  470. <dt><a name="index-NO_005fIMPLICIT_005fEXTERN_005fC"></a>Macro: <strong>NO_IMPLICIT_EXTERN_C</strong></dt>
  471. <dd><p>Define this macro if the system header files support C++ as well as C.
  472. This macro inhibits the usual method of using system header files in
  473. C++, which is to pretend that the file&rsquo;s contents are enclosed in
  474. &lsquo;<samp>extern &quot;C&quot; {&hellip;}</samp>&rsquo;.
  475. </p></dd></dl>
  476. <a name="index-_0023pragma"></a>
  477. <a name="index-pragma"></a>
  478. <dl>
  479. <dt><a name="index-REGISTER_005fTARGET_005fPRAGMAS"></a>Macro: <strong>REGISTER_TARGET_PRAGMAS</strong> <em>()</em></dt>
  480. <dd><p>Define this macro if you want to implement any target-specific pragmas.
  481. If defined, it is a C expression which makes a series of calls to
  482. <code>c_register_pragma</code> or <code>c_register_pragma_with_expansion</code>
  483. for each pragma. The macro may also do any
  484. setup required for the pragmas.
  485. </p>
  486. <p>The primary reason to define this macro is to provide compatibility with
  487. other compilers for the same target. In general, we discourage
  488. definition of target-specific pragmas for GCC.
  489. </p>
  490. <p>If the pragma can be implemented by attributes then you should consider
  491. defining the target hook &lsquo;<samp>TARGET_INSERT_ATTRIBUTES</samp>&rsquo; as well.
  492. </p>
  493. <p>Preprocessor macros that appear on pragma lines are not expanded. All
  494. &lsquo;<samp>#pragma</samp>&rsquo; directives that do not match any registered pragma are
  495. silently ignored, unless the user specifies <samp>-Wunknown-pragmas</samp>.
  496. </p></dd></dl>
  497. <dl>
  498. <dt><a name="index-c_005fregister_005fpragma"></a>Function: <em>void</em> <strong>c_register_pragma</strong> <em>(const char *<var>space</var>, const char *<var>name</var>, void (*<var>callback</var>) (struct cpp_reader *))</em></dt>
  499. <dt><a name="index-c_005fregister_005fpragma_005fwith_005fexpansion"></a>Function: <em>void</em> <strong>c_register_pragma_with_expansion</strong> <em>(const char *<var>space</var>, const char *<var>name</var>, void (*<var>callback</var>) (struct cpp_reader *))</em></dt>
  500. <dd>
  501. <p>Each call to <code>c_register_pragma</code> or
  502. <code>c_register_pragma_with_expansion</code> establishes one pragma. The
  503. <var>callback</var> routine will be called when the preprocessor encounters a
  504. pragma of the form
  505. </p>
  506. <div class="smallexample">
  507. <pre class="smallexample">#pragma [<var>space</var>] <var>name</var> &hellip;
  508. </pre></div>
  509. <p><var>space</var> is the case-sensitive namespace of the pragma, or
  510. <code>NULL</code> to put the pragma in the global namespace. The callback
  511. routine receives <var>pfile</var> as its first argument, which can be passed
  512. on to cpplib&rsquo;s functions if necessary. You can lex tokens after the
  513. <var>name</var> by calling <code>pragma_lex</code>. Tokens that are not read by the
  514. callback will be silently ignored. The end of the line is indicated by
  515. a token of type <code>CPP_EOF</code>. Macro expansion occurs on the
  516. arguments of pragmas registered with
  517. <code>c_register_pragma_with_expansion</code> but not on the arguments of
  518. pragmas registered with <code>c_register_pragma</code>.
  519. </p>
  520. <p>Note that the use of <code>pragma_lex</code> is specific to the C and C++
  521. compilers. It will not work in the Java or Fortran compilers, or any
  522. other language compilers for that matter. Thus if <code>pragma_lex</code> is going
  523. to be called from target-specific code, it must only be done so when
  524. building the C and C++ compilers. This can be done by defining the
  525. variables <code>c_target_objs</code> and <code>cxx_target_objs</code> in the
  526. target entry in the <samp>config.gcc</samp> file. These variables should name
  527. the target-specific, language-specific object file which contains the
  528. code that uses <code>pragma_lex</code>. Note it will also be necessary to add a
  529. rule to the makefile fragment pointed to by <code>tmake_file</code> that shows
  530. how to build this object file.
  531. </p></dd></dl>
  532. <dl>
  533. <dt><a name="index-HANDLE_005fPRAGMA_005fPACK_005fWITH_005fEXPANSION"></a>Macro: <strong>HANDLE_PRAGMA_PACK_WITH_EXPANSION</strong></dt>
  534. <dd><p>Define this macro if macros should be expanded in the
  535. arguments of &lsquo;<samp>#pragma pack</samp>&rsquo;.
  536. </p></dd></dl>
  537. <dl>
  538. <dt><a name="index-TARGET_005fDEFAULT_005fPACK_005fSTRUCT"></a>Macro: <strong>TARGET_DEFAULT_PACK_STRUCT</strong></dt>
  539. <dd><p>If your target requires a structure packing default other than 0 (meaning
  540. the machine default), define this macro to the necessary value (in bytes).
  541. This must be a value that would also be valid to use with
  542. &lsquo;<samp>#pragma pack()</samp>&rsquo; (that is, a small power of two).
  543. </p></dd></dl>
  544. <dl>
  545. <dt><a name="index-DOLLARS_005fIN_005fIDENTIFIERS"></a>Macro: <strong>DOLLARS_IN_IDENTIFIERS</strong></dt>
  546. <dd><p>Define this macro to control use of the character &lsquo;<samp>$</samp>&rsquo; in
  547. identifier names for the C family of languages. 0 means &lsquo;<samp>$</samp>&rsquo; is
  548. not allowed by default; 1 means it is allowed. 1 is the default;
  549. there is no need to define this macro in that case.
  550. </p></dd></dl>
  551. <dl>
  552. <dt><a name="index-INSN_005fSETS_005fARE_005fDELAYED"></a>Macro: <strong>INSN_SETS_ARE_DELAYED</strong> <em>(<var>insn</var>)</em></dt>
  553. <dd><p>Define this macro as a C expression that is nonzero if it is safe for the
  554. delay slot scheduler to place instructions in the delay slot of <var>insn</var>,
  555. even if they appear to use a resource set or clobbered in <var>insn</var>.
  556. <var>insn</var> is always a <code>jump_insn</code> or an <code>insn</code>; GCC knows that
  557. every <code>call_insn</code> has this behavior. On machines where some <code>insn</code>
  558. or <code>jump_insn</code> is really a function call and hence has this behavior,
  559. you should define this macro.
  560. </p>
  561. <p>You need not define this macro if it would always return zero.
  562. </p></dd></dl>
  563. <dl>
  564. <dt><a name="index-INSN_005fREFERENCES_005fARE_005fDELAYED"></a>Macro: <strong>INSN_REFERENCES_ARE_DELAYED</strong> <em>(<var>insn</var>)</em></dt>
  565. <dd><p>Define this macro as a C expression that is nonzero if it is safe for the
  566. delay slot scheduler to place instructions in the delay slot of <var>insn</var>,
  567. even if they appear to set or clobber a resource referenced in <var>insn</var>.
  568. <var>insn</var> is always a <code>jump_insn</code> or an <code>insn</code>. On machines where
  569. some <code>insn</code> or <code>jump_insn</code> is really a function call and its operands
  570. are registers whose use is actually in the subroutine it calls, you should
  571. define this macro. Doing so allows the delay slot scheduler to move
  572. instructions which copy arguments into the argument registers into the delay
  573. slot of <var>insn</var>.
  574. </p>
  575. <p>You need not define this macro if it would always return zero.
  576. </p></dd></dl>
  577. <dl>
  578. <dt><a name="index-MULTIPLE_005fSYMBOL_005fSPACES"></a>Macro: <strong>MULTIPLE_SYMBOL_SPACES</strong></dt>
  579. <dd><p>Define this macro as a C expression that is nonzero if, in some cases,
  580. global symbols from one translation unit may not be bound to undefined
  581. symbols in another translation unit without user intervention. For
  582. instance, under Microsoft Windows symbols must be explicitly imported
  583. from shared libraries (DLLs).
  584. </p>
  585. <p>You need not define this macro if it would always evaluate to zero.
  586. </p></dd></dl>
  587. <dl>
  588. <dt><a name="index-TARGET_005fMD_005fASM_005fADJUST"></a>Target Hook: <em>rtx_insn *</em> <strong>TARGET_MD_ASM_ADJUST</strong> <em>(vec&lt;rtx&gt;&amp; <var>outputs</var>, vec&lt;rtx&gt;&amp; <var>inputs</var>, vec&lt;const char *&gt;&amp; <var>constraints</var>, vec&lt;rtx&gt;&amp; <var>clobbers</var>, HARD_REG_SET&amp; <var>clobbered_regs</var>)</em></dt>
  589. <dd><p>This target hook may add <em>clobbers</em> to <var>clobbers</var> and
  590. <var>clobbered_regs</var> for any hard regs the port wishes to automatically
  591. clobber for an asm. The <var>outputs</var> and <var>inputs</var> may be inspected
  592. to avoid clobbering a register that is already used by the asm.
  593. </p>
  594. <p>It may modify the <var>outputs</var>, <var>inputs</var>, and <var>constraints</var>
  595. as necessary for other pre-processing. In this case the return value is
  596. a sequence of insns to emit after the asm.
  597. </p></dd></dl>
  598. <dl>
  599. <dt><a name="index-MATH_005fLIBRARY"></a>Macro: <strong>MATH_LIBRARY</strong></dt>
  600. <dd><p>Define this macro as a C string constant for the linker argument to link
  601. in the system math library, minus the initial &lsquo;<samp>&quot;-l&quot;</samp>&rsquo;, or
  602. &lsquo;<samp>&quot;&quot;</samp>&rsquo; if the target does not have a
  603. separate math library.
  604. </p>
  605. <p>You need only define this macro if the default of &lsquo;<samp>&quot;m&quot;</samp>&rsquo; is wrong.
  606. </p></dd></dl>
  607. <dl>
  608. <dt><a name="index-LIBRARY_005fPATH_005fENV"></a>Macro: <strong>LIBRARY_PATH_ENV</strong></dt>
  609. <dd><p>Define this macro as a C string constant for the environment variable that
  610. specifies where the linker should look for libraries.
  611. </p>
  612. <p>You need only define this macro if the default of &lsquo;<samp>&quot;LIBRARY_PATH&quot;</samp>&rsquo;
  613. is wrong.
  614. </p></dd></dl>
  615. <dl>
  616. <dt><a name="index-TARGET_005fPOSIX_005fIO"></a>Macro: <strong>TARGET_POSIX_IO</strong></dt>
  617. <dd><p>Define this macro if the target supports the following POSIX&nbsp;file
  618. functions, access, mkdir and file locking with fcntl / F_SETLKW.
  619. Defining <code>TARGET_POSIX_IO</code> will enable the test coverage code
  620. to use file locking when exiting a program, which avoids race conditions
  621. if the program has forked. It will also create directories at run-time
  622. for cross-profiling.
  623. </p></dd></dl>
  624. <dl>
  625. <dt><a name="index-MAX_005fCONDITIONAL_005fEXECUTE"></a>Macro: <strong>MAX_CONDITIONAL_EXECUTE</strong></dt>
  626. <dd>
  627. <p>A C expression for the maximum number of instructions to execute via
  628. conditional execution instructions instead of a branch. A value of
  629. <code>BRANCH_COST</code>+1 is the default if the machine does not use cc0, and
  630. 1 if it does use cc0.
  631. </p></dd></dl>
  632. <dl>
  633. <dt><a name="index-IFCVT_005fMODIFY_005fTESTS"></a>Macro: <strong>IFCVT_MODIFY_TESTS</strong> <em>(<var>ce_info</var>, <var>true_expr</var>, <var>false_expr</var>)</em></dt>
  634. <dd><p>Used if the target needs to perform machine-dependent modifications on the
  635. conditionals used for turning basic blocks into conditionally executed code.
  636. <var>ce_info</var> points to a data structure, <code>struct ce_if_block</code>, which
  637. contains information about the currently processed blocks. <var>true_expr</var>
  638. and <var>false_expr</var> are the tests that are used for converting the
  639. then-block and the else-block, respectively. Set either <var>true_expr</var> or
  640. <var>false_expr</var> to a null pointer if the tests cannot be converted.
  641. </p></dd></dl>
  642. <dl>
  643. <dt><a name="index-IFCVT_005fMODIFY_005fMULTIPLE_005fTESTS"></a>Macro: <strong>IFCVT_MODIFY_MULTIPLE_TESTS</strong> <em>(<var>ce_info</var>, <var>bb</var>, <var>true_expr</var>, <var>false_expr</var>)</em></dt>
  644. <dd><p>Like <code>IFCVT_MODIFY_TESTS</code>, but used when converting more complicated
  645. if-statements into conditions combined by <code>and</code> and <code>or</code> operations.
  646. <var>bb</var> contains the basic block that contains the test that is currently
  647. being processed and about to be turned into a condition.
  648. </p></dd></dl>
  649. <dl>
  650. <dt><a name="index-IFCVT_005fMODIFY_005fINSN"></a>Macro: <strong>IFCVT_MODIFY_INSN</strong> <em>(<var>ce_info</var>, <var>pattern</var>, <var>insn</var>)</em></dt>
  651. <dd><p>A C expression to modify the <var>PATTERN</var> of an <var>INSN</var> that is to
  652. be converted to conditional execution format. <var>ce_info</var> points to
  653. a data structure, <code>struct ce_if_block</code>, which contains information
  654. about the currently processed blocks.
  655. </p></dd></dl>
  656. <dl>
  657. <dt><a name="index-IFCVT_005fMODIFY_005fFINAL"></a>Macro: <strong>IFCVT_MODIFY_FINAL</strong> <em>(<var>ce_info</var>)</em></dt>
  658. <dd><p>A C expression to perform any final machine dependent modifications in
  659. converting code to conditional execution. The involved basic blocks
  660. can be found in the <code>struct ce_if_block</code> structure that is pointed
  661. to by <var>ce_info</var>.
  662. </p></dd></dl>
  663. <dl>
  664. <dt><a name="index-IFCVT_005fMODIFY_005fCANCEL"></a>Macro: <strong>IFCVT_MODIFY_CANCEL</strong> <em>(<var>ce_info</var>)</em></dt>
  665. <dd><p>A C expression to cancel any machine dependent modifications in
  666. converting code to conditional execution. The involved basic blocks
  667. can be found in the <code>struct ce_if_block</code> structure that is pointed
  668. to by <var>ce_info</var>.
  669. </p></dd></dl>
  670. <dl>
  671. <dt><a name="index-IFCVT_005fMACHDEP_005fINIT"></a>Macro: <strong>IFCVT_MACHDEP_INIT</strong> <em>(<var>ce_info</var>)</em></dt>
  672. <dd><p>A C expression to initialize any machine specific data for if-conversion
  673. of the if-block in the <code>struct ce_if_block</code> structure that is pointed
  674. to by <var>ce_info</var>.
  675. </p></dd></dl>
  676. <dl>
  677. <dt><a name="index-TARGET_005fMACHINE_005fDEPENDENT_005fREORG"></a>Target Hook: <em>void</em> <strong>TARGET_MACHINE_DEPENDENT_REORG</strong> <em>(void)</em></dt>
  678. <dd><p>If non-null, this hook performs a target-specific pass over the
  679. instruction stream. The compiler will run it at all optimization levels,
  680. just before the point at which it normally does delayed-branch scheduling.
  681. </p>
  682. <p>The exact purpose of the hook varies from target to target. Some use
  683. it to do transformations that are necessary for correctness, such as
  684. laying out in-function constant pools or avoiding hardware hazards.
  685. Others use it as an opportunity to do some machine-dependent optimizations.
  686. </p>
  687. <p>You need not implement the hook if it has nothing to do. The default
  688. definition is null.
  689. </p></dd></dl>
  690. <dl>
  691. <dt><a name="index-TARGET_005fINIT_005fBUILTINS"></a>Target Hook: <em>void</em> <strong>TARGET_INIT_BUILTINS</strong> <em>(void)</em></dt>
  692. <dd><p>Define this hook if you have any machine-specific built-in functions
  693. that need to be defined. It should be a function that performs the
  694. necessary setup.
  695. </p>
  696. <p>Machine specific built-in functions can be useful to expand special machine
  697. instructions that would otherwise not normally be generated because
  698. they have no equivalent in the source language (for example, SIMD vector
  699. instructions or prefetch instructions).
  700. </p>
  701. <p>To create a built-in function, call the function
  702. <code>lang_hooks.builtin_function</code>
  703. which is defined by the language front end. You can use any type nodes set
  704. up by <code>build_common_tree_nodes</code>;
  705. only language front ends that use those two functions will call
  706. &lsquo;<samp>TARGET_INIT_BUILTINS</samp>&rsquo;.
  707. </p></dd></dl>
  708. <dl>
  709. <dt><a name="index-TARGET_005fBUILTIN_005fDECL"></a>Target Hook: <em>tree</em> <strong>TARGET_BUILTIN_DECL</strong> <em>(unsigned <var>code</var>, bool <var>initialize_p</var>)</em></dt>
  710. <dd><p>Define this hook if you have any machine-specific built-in functions
  711. that need to be defined. It should be a function that returns the
  712. builtin function declaration for the builtin function code <var>code</var>.
  713. If there is no such builtin and it cannot be initialized at this time
  714. if <var>initialize_p</var> is true the function should return <code>NULL_TREE</code>.
  715. If <var>code</var> is out of range the function should return
  716. <code>error_mark_node</code>.
  717. </p></dd></dl>
  718. <dl>
  719. <dt><a name="index-TARGET_005fEXPAND_005fBUILTIN"></a>Target Hook: <em>rtx</em> <strong>TARGET_EXPAND_BUILTIN</strong> <em>(tree <var>exp</var>, rtx <var>target</var>, rtx <var>subtarget</var>, machine_mode <var>mode</var>, int <var>ignore</var>)</em></dt>
  720. <dd>
  721. <p>Expand a call to a machine specific built-in function that was set up by
  722. &lsquo;<samp>TARGET_INIT_BUILTINS</samp>&rsquo;. <var>exp</var> is the expression for the
  723. function call; the result should go to <var>target</var> if that is
  724. convenient, and have mode <var>mode</var> if that is convenient.
  725. <var>subtarget</var> may be used as the target for computing one of
  726. <var>exp</var>&rsquo;s operands. <var>ignore</var> is nonzero if the value is to be
  727. ignored. This function should return the result of the call to the
  728. built-in function.
  729. </p></dd></dl>
  730. <dl>
  731. <dt><a name="index-TARGET_005fBUILTIN_005fCHKP_005fFUNCTION"></a>Target Hook: <em>tree</em> <strong>TARGET_BUILTIN_CHKP_FUNCTION</strong> <em>(unsigned <var>fcode</var>)</em></dt>
  732. <dd><p>This hook allows target to redefine built-in functions used by
  733. Pointer Bounds Checker for code instrumentation. Hook should return
  734. fndecl of function implementing generic builtin whose code is
  735. passed in <var>fcode</var>. Currently following built-in functions are
  736. obtained using this hook:
  737. </p><dl>
  738. <dt><a name="index-_005f_005fchkp_005fbndmk"></a>Built-in Function: <em>__bounds_type</em> <strong>__chkp_bndmk</strong> <em>(const void *<var>lb</var>, size_t <var>size</var>)</em></dt>
  739. <dd><p>Function code - BUILT_IN_CHKP_BNDMK. This built-in function is used
  740. by Pointer Bounds Checker to create bound values. <var>lb</var> holds low
  741. bound of the resulting bounds. <var>size</var> holds size of created bounds.
  742. </p></dd></dl>
  743. <dl>
  744. <dt><a name="index-_005f_005fchkp_005fbndstx"></a>Built-in Function: <em>void</em> <strong>__chkp_bndstx</strong> <em>(const void *<var>ptr</var>, __bounds_type <var>b</var>, const void **<var>loc</var>)</em></dt>
  745. <dd><p>Function code - <code>BUILT_IN_CHKP_BNDSTX</code>. This built-in function is used
  746. by Pointer Bounds Checker to store bounds <var>b</var> for pointer <var>ptr</var>
  747. when <var>ptr</var> is stored by address <var>loc</var>.
  748. </p></dd></dl>
  749. <dl>
  750. <dt><a name="index-_005f_005fchkp_005fbndldx"></a>Built-in Function: <em>__bounds_type</em> <strong>__chkp_bndldx</strong> <em>(const void **<var>loc</var>, const void *<var>ptr</var>)</em></dt>
  751. <dd><p>Function code - <code>BUILT_IN_CHKP_BNDLDX</code>. This built-in function is used
  752. by Pointer Bounds Checker to get bounds of pointer <var>ptr</var> loaded by
  753. address <var>loc</var>.
  754. </p></dd></dl>
  755. <dl>
  756. <dt><a name="index-_005f_005fchkp_005fbndcl"></a>Built-in Function: <em>void</em> <strong>__chkp_bndcl</strong> <em>(const void *<var>ptr</var>, __bounds_type <var>b</var>)</em></dt>
  757. <dd><p>Function code - <code>BUILT_IN_CHKP_BNDCL</code>. This built-in function is used
  758. by Pointer Bounds Checker to perform check for pointer <var>ptr</var> against
  759. lower bound of bounds <var>b</var>.
  760. </p></dd></dl>
  761. <dl>
  762. <dt><a name="index-_005f_005fchkp_005fbndcu"></a>Built-in Function: <em>void</em> <strong>__chkp_bndcu</strong> <em>(const void *<var>ptr</var>, __bounds_type <var>b</var>)</em></dt>
  763. <dd><p>Function code - <code>BUILT_IN_CHKP_BNDCU</code>. This built-in function is used
  764. by Pointer Bounds Checker to perform check for pointer <var>ptr</var> against
  765. upper bound of bounds <var>b</var>.
  766. </p></dd></dl>
  767. <dl>
  768. <dt><a name="index-_005f_005fchkp_005fbndret"></a>Built-in Function: <em>__bounds_type</em> <strong>__chkp_bndret</strong> <em>(void *<var>ptr</var>)</em></dt>
  769. <dd><p>Function code - <code>BUILT_IN_CHKP_BNDRET</code>. This built-in function is used
  770. by Pointer Bounds Checker to obtain bounds returned by a call statement.
  771. <var>ptr</var> passed to built-in is <code>SSA_NAME</code> returned by the call.
  772. </p></dd></dl>
  773. <dl>
  774. <dt><a name="index-_005f_005fchkp_005fintersect"></a>Built-in Function: <em>__bounds_type</em> <strong>__chkp_intersect</strong> <em>(__bounds_type <var>b1</var>, __bounds_type <var>b2</var>)</em></dt>
  775. <dd><p>Function code - <code>BUILT_IN_CHKP_INTERSECT</code>. This built-in function
  776. returns intersection of bounds <var>b1</var> and <var>b2</var>.
  777. </p></dd></dl>
  778. <dl>
  779. <dt><a name="index-_005f_005fchkp_005fnarrow"></a>Built-in Function: <em>__bounds_type</em> <strong>__chkp_narrow</strong> <em>(const void *<var>ptr</var>, __bounds_type <var>b</var>, size_t <var>s</var>)</em></dt>
  780. <dd><p>Function code - <code>BUILT_IN_CHKP_NARROW</code>. This built-in function
  781. returns intersection of bounds <var>b</var> and
  782. [<var>ptr</var>, <var>ptr</var> + <var>s</var> - <code>1</code>].
  783. </p></dd></dl>
  784. <dl>
  785. <dt><a name="index-_005f_005fchkp_005fsizeof"></a>Built-in Function: <em>size_t</em> <strong>__chkp_sizeof</strong> <em>(const void *<var>ptr</var>)</em></dt>
  786. <dd><p>Function code - <code>BUILT_IN_CHKP_SIZEOF</code>. This built-in function
  787. returns size of object referenced by <var>ptr</var>. <var>ptr</var> is always
  788. <code>ADDR_EXPR</code> of <code>VAR_DECL</code>. This built-in is used by
  789. Pointer Bounds Checker when bounds of object cannot be computed statically
  790. (e.g. object has incomplete type).
  791. </p></dd></dl>
  792. <dl>
  793. <dt><a name="index-void"></a>Built-in Function: <em>const</em> <strong>void</strong> <em>*__chkp_extract_lower (__bounds_type <var>b</var>)</em></dt>
  794. <dd><p>Function code - <code>BUILT_IN_CHKP_EXTRACT_LOWER</code>. This built-in function
  795. returns lower bound of bounds <var>b</var>.
  796. </p></dd></dl>
  797. <dl>
  798. <dt><a name="index-void-1"></a>Built-in Function: <em>const</em> <strong>void</strong> <em>*__chkp_extract_upper (__bounds_type <var>b</var>)</em></dt>
  799. <dd><p>Function code - <code>BUILT_IN_CHKP_EXTRACT_UPPER</code>. This built-in function
  800. returns upper bound of bounds <var>b</var>.
  801. </p></dd></dl>
  802. </dd></dl>
  803. <dl>
  804. <dt><a name="index-TARGET_005fCHKP_005fBOUND_005fTYPE"></a>Target Hook: <em>tree</em> <strong>TARGET_CHKP_BOUND_TYPE</strong> <em>(void)</em></dt>
  805. <dd><p>Return type to be used for bounds
  806. </p></dd></dl>
  807. <dl>
  808. <dt><a name="index-TARGET_005fCHKP_005fBOUND_005fMODE"></a>Target Hook: <em>enum machine_mode</em> <strong>TARGET_CHKP_BOUND_MODE</strong> <em>(void)</em></dt>
  809. <dd><p>Return mode to be used for bounds.
  810. </p></dd></dl>
  811. <dl>
  812. <dt><a name="index-TARGET_005fCHKP_005fMAKE_005fBOUNDS_005fCONSTANT"></a>Target Hook: <em>tree</em> <strong>TARGET_CHKP_MAKE_BOUNDS_CONSTANT</strong> <em>(HOST_WIDE_INT <var>lb</var>, HOST_WIDE_INT <var>ub</var>)</em></dt>
  813. <dd><p>Return constant used to statically initialize constant bounds
  814. with specified lower bound <var>lb</var> and upper bounds <var>ub</var>.
  815. </p></dd></dl>
  816. <dl>
  817. <dt><a name="index-TARGET_005fCHKP_005fINITIALIZE_005fBOUNDS"></a>Target Hook: <em>int</em> <strong>TARGET_CHKP_INITIALIZE_BOUNDS</strong> <em>(tree <var>var</var>, tree <var>lb</var>, tree <var>ub</var>, tree *<var>stmts</var>)</em></dt>
  818. <dd><p>Generate a list of statements <var>stmts</var> to initialize pointer
  819. bounds variable <var>var</var> with bounds <var>lb</var> and <var>ub</var>. Return
  820. the number of generated statements.
  821. </p></dd></dl>
  822. <dl>
  823. <dt><a name="index-TARGET_005fRESOLVE_005fOVERLOADED_005fBUILTIN"></a>Target Hook: <em>tree</em> <strong>TARGET_RESOLVE_OVERLOADED_BUILTIN</strong> <em>(unsigned int <var>loc</var>, tree <var>fndecl</var>, void *<var>arglist</var>)</em></dt>
  824. <dd><p>Select a replacement for a machine specific built-in function that
  825. was set up by &lsquo;<samp>TARGET_INIT_BUILTINS</samp>&rsquo;. This is done
  826. <em>before</em> regular type checking, and so allows the target to
  827. implement a crude form of function overloading. <var>fndecl</var> is the
  828. declaration of the built-in function. <var>arglist</var> is the list of
  829. arguments passed to the built-in function. The result is a
  830. complete expression that implements the operation, usually
  831. another <code>CALL_EXPR</code>.
  832. <var>arglist</var> really has type &lsquo;<samp>VEC(tree,gc)*</samp>&rsquo;
  833. </p></dd></dl>
  834. <dl>
  835. <dt><a name="index-TARGET_005fFOLD_005fBUILTIN"></a>Target Hook: <em>tree</em> <strong>TARGET_FOLD_BUILTIN</strong> <em>(tree <var>fndecl</var>, int <var>n_args</var>, tree *<var>argp</var>, bool <var>ignore</var>)</em></dt>
  836. <dd><p>Fold a call to a machine specific built-in function that was set up by
  837. &lsquo;<samp>TARGET_INIT_BUILTINS</samp>&rsquo;. <var>fndecl</var> is the declaration of the
  838. built-in function. <var>n_args</var> is the number of arguments passed to
  839. the function; the arguments themselves are pointed to by <var>argp</var>.
  840. The result is another tree, valid for both GIMPLE and GENERIC,
  841. containing a simplified expression for the call&rsquo;s result. If
  842. <var>ignore</var> is true the value will be ignored.
  843. </p></dd></dl>
  844. <dl>
  845. <dt><a name="index-TARGET_005fGIMPLE_005fFOLD_005fBUILTIN"></a>Target Hook: <em>bool</em> <strong>TARGET_GIMPLE_FOLD_BUILTIN</strong> <em>(gimple_stmt_iterator *<var>gsi</var>)</em></dt>
  846. <dd><p>Fold a call to a machine specific built-in function that was set up
  847. by &lsquo;<samp>TARGET_INIT_BUILTINS</samp>&rsquo;. <var>gsi</var> points to the gimple
  848. statement holding the function call. Returns true if any change
  849. was made to the GIMPLE stream.
  850. </p></dd></dl>
  851. <dl>
  852. <dt><a name="index-TARGET_005fCOMPARE_005fVERSION_005fPRIORITY"></a>Target Hook: <em>int</em> <strong>TARGET_COMPARE_VERSION_PRIORITY</strong> <em>(tree <var>decl1</var>, tree <var>decl2</var>)</em></dt>
  853. <dd><p>This hook is used to compare the target attributes in two functions to
  854. determine which function&rsquo;s features get higher priority. This is used
  855. during function multi-versioning to figure out the order in which two
  856. versions must be dispatched. A function version with a higher priority
  857. is checked for dispatching earlier. <var>decl1</var> and <var>decl2</var> are
  858. the two function decls that will be compared.
  859. </p></dd></dl>
  860. <dl>
  861. <dt><a name="index-TARGET_005fGET_005fFUNCTION_005fVERSIONS_005fDISPATCHER"></a>Target Hook: <em>tree</em> <strong>TARGET_GET_FUNCTION_VERSIONS_DISPATCHER</strong> <em>(void *<var>decl</var>)</em></dt>
  862. <dd><p>This hook is used to get the dispatcher function for a set of function
  863. versions. The dispatcher function is called to invoke the right function
  864. version at run-time. <var>decl</var> is one version from a set of semantically
  865. identical versions.
  866. </p></dd></dl>
  867. <dl>
  868. <dt><a name="index-TARGET_005fGENERATE_005fVERSION_005fDISPATCHER_005fBODY"></a>Target Hook: <em>tree</em> <strong>TARGET_GENERATE_VERSION_DISPATCHER_BODY</strong> <em>(void *<var>arg</var>)</em></dt>
  869. <dd><p>This hook is used to generate the dispatcher logic to invoke the right
  870. function version at run-time for a given set of function versions.
  871. <var>arg</var> points to the callgraph node of the dispatcher function whose
  872. body must be generated.
  873. </p></dd></dl>
  874. <dl>
  875. <dt><a name="index-TARGET_005fCAN_005fUSE_005fDOLOOP_005fP"></a>Target Hook: <em>bool</em> <strong>TARGET_CAN_USE_DOLOOP_P</strong> <em>(const widest_int <var>&amp;iterations</var>, const widest_int <var>&amp;iterations_max</var>, unsigned int <var>loop_depth</var>, bool <var>entered_at_top</var>)</em></dt>
  876. <dd><p>Return true if it is possible to use low-overhead loops (<code>doloop_end</code>
  877. and <code>doloop_begin</code>) for a particular loop. <var>iterations</var> gives the
  878. exact number of iterations, or 0 if not known. <var>iterations_max</var> gives
  879. the maximum number of iterations, or 0 if not known. <var>loop_depth</var> is
  880. the nesting depth of the loop, with 1 for innermost loops, 2 for loops that
  881. contain innermost loops, and so on. <var>entered_at_top</var> is true if the
  882. loop is only entered from the top.
  883. </p>
  884. <p>This hook is only used if <code>doloop_end</code> is available. The default
  885. implementation returns true. You can use <code>can_use_doloop_if_innermost</code>
  886. if the loop must be the innermost, and if there are no other restrictions.
  887. </p></dd></dl>
  888. <dl>
  889. <dt><a name="index-TARGET_005fINVALID_005fWITHIN_005fDOLOOP"></a>Target Hook: <em>const char *</em> <strong>TARGET_INVALID_WITHIN_DOLOOP</strong> <em>(const rtx_insn *<var>insn</var>)</em></dt>
  890. <dd>
  891. <p>Take an instruction in <var>insn</var> and return NULL if it is valid within a
  892. low-overhead loop, otherwise return a string explaining why doloop
  893. could not be applied.
  894. </p>
  895. <p>Many targets use special registers for low-overhead looping. For any
  896. instruction that clobbers these this function should return a string indicating
  897. the reason why the doloop could not be applied.
  898. By default, the RTL loop optimizer does not use a present doloop pattern for
  899. loops containing function calls or branch on table instructions.
  900. </p></dd></dl>
  901. <dl>
  902. <dt><a name="index-TARGET_005fLEGITIMATE_005fCOMBINED_005fINSN"></a>Target Hook: <em>bool</em> <strong>TARGET_LEGITIMATE_COMBINED_INSN</strong> <em>(rtx_insn *<var>insn</var>)</em></dt>
  903. <dd><p>Take an instruction in <var>insn</var> and return <code>false</code> if the instruction is not appropriate as a combination of two or more instructions. The default is to accept all instructions.
  904. </p></dd></dl>
  905. <dl>
  906. <dt><a name="index-TARGET_005fCAN_005fFOLLOW_005fJUMP"></a>Target Hook: <em>bool</em> <strong>TARGET_CAN_FOLLOW_JUMP</strong> <em>(const rtx_insn *<var>follower</var>, const rtx_insn *<var>followee</var>)</em></dt>
  907. <dd><p>FOLLOWER and FOLLOWEE are JUMP_INSN instructions; return true if FOLLOWER may be modified to follow FOLLOWEE; false, if it can&rsquo;t. For example, on some targets, certain kinds of branches can&rsquo;t be made to follow through a hot/cold partitioning.
  908. </p></dd></dl>
  909. <dl>
  910. <dt><a name="index-TARGET_005fCOMMUTATIVE_005fP"></a>Target Hook: <em>bool</em> <strong>TARGET_COMMUTATIVE_P</strong> <em>(const_rtx <var>x</var>, int <var>outer_code</var>)</em></dt>
  911. <dd><p>This target hook returns <code>true</code> if <var>x</var> is considered to be commutative.
  912. Usually, this is just COMMUTATIVE_P (<var>x</var>), but the HP PA doesn&rsquo;t consider
  913. PLUS to be commutative inside a MEM. <var>outer_code</var> is the rtx code
  914. of the enclosing rtl, if known, otherwise it is UNKNOWN.
  915. </p></dd></dl>
  916. <dl>
  917. <dt><a name="index-TARGET_005fALLOCATE_005fINITIAL_005fVALUE"></a>Target Hook: <em>rtx</em> <strong>TARGET_ALLOCATE_INITIAL_VALUE</strong> <em>(rtx <var>hard_reg</var>)</em></dt>
  918. <dd>
  919. <p>When the initial value of a hard register has been copied in a pseudo
  920. register, it is often not necessary to actually allocate another register
  921. to this pseudo register, because the original hard register or a stack slot
  922. it has been saved into can be used. <code>TARGET_ALLOCATE_INITIAL_VALUE</code>
  923. is called at the start of register allocation once for each hard register
  924. that had its initial value copied by using
  925. <code>get_func_hard_reg_initial_val</code> or <code>get_hard_reg_initial_val</code>.
  926. Possible values are <code>NULL_RTX</code>, if you don&rsquo;t want
  927. to do any special allocation, a <code>REG</code> rtx&mdash;that would typically be
  928. the hard register itself, if it is known not to be clobbered&mdash;or a
  929. <code>MEM</code>.
  930. If you are returning a <code>MEM</code>, this is only a hint for the allocator;
  931. it might decide to use another register anyways.
  932. You may use <code>current_function_is_leaf</code> or
  933. <code>REG_N_SETS</code> in the hook to determine if the hard
  934. register in question will not be clobbered.
  935. The default value of this hook is <code>NULL</code>, which disables any special
  936. allocation.
  937. </p></dd></dl>
  938. <dl>
  939. <dt><a name="index-TARGET_005fUNSPEC_005fMAY_005fTRAP_005fP"></a>Target Hook: <em>int</em> <strong>TARGET_UNSPEC_MAY_TRAP_P</strong> <em>(const_rtx <var>x</var>, unsigned <var>flags</var>)</em></dt>
  940. <dd><p>This target hook returns nonzero if <var>x</var>, an <code>unspec</code> or
  941. <code>unspec_volatile</code> operation, might cause a trap. Targets can use
  942. this hook to enhance precision of analysis for <code>unspec</code> and
  943. <code>unspec_volatile</code> operations. You may call <code>may_trap_p_1</code>
  944. to analyze inner elements of <var>x</var> in which case <var>flags</var> should be
  945. passed along.
  946. </p></dd></dl>
  947. <dl>
  948. <dt><a name="index-TARGET_005fSET_005fCURRENT_005fFUNCTION"></a>Target Hook: <em>void</em> <strong>TARGET_SET_CURRENT_FUNCTION</strong> <em>(tree <var>decl</var>)</em></dt>
  949. <dd><p>The compiler invokes this hook whenever it changes its current function
  950. context (<code>cfun</code>). You can define this function if
  951. the back end needs to perform any initialization or reset actions on a
  952. per-function basis. For example, it may be used to implement function
  953. attributes that affect register usage or code generation patterns.
  954. The argument <var>decl</var> is the declaration for the new function context,
  955. and may be null to indicate that the compiler has left a function context
  956. and is returning to processing at the top level.
  957. The default hook function does nothing.
  958. </p>
  959. <p>GCC sets <code>cfun</code> to a dummy function context during initialization of
  960. some parts of the back end. The hook function is not invoked in this
  961. situation; you need not worry about the hook being invoked recursively,
  962. or when the back end is in a partially-initialized state.
  963. <code>cfun</code> might be <code>NULL</code> to indicate processing at top level,
  964. outside of any function scope.
  965. </p></dd></dl>
  966. <dl>
  967. <dt><a name="index-TARGET_005fOBJECT_005fSUFFIX"></a>Macro: <strong>TARGET_OBJECT_SUFFIX</strong></dt>
  968. <dd><p>Define this macro to be a C string representing the suffix for object
  969. files on your target machine. If you do not define this macro, GCC will
  970. use &lsquo;<samp>.o</samp>&rsquo; as the suffix for object files.
  971. </p></dd></dl>
  972. <dl>
  973. <dt><a name="index-TARGET_005fEXECUTABLE_005fSUFFIX"></a>Macro: <strong>TARGET_EXECUTABLE_SUFFIX</strong></dt>
  974. <dd><p>Define this macro to be a C string representing the suffix to be
  975. automatically added to executable files on your target machine. If you
  976. do not define this macro, GCC will use the null string as the suffix for
  977. executable files.
  978. </p></dd></dl>
  979. <dl>
  980. <dt><a name="index-COLLECT_005fEXPORT_005fLIST"></a>Macro: <strong>COLLECT_EXPORT_LIST</strong></dt>
  981. <dd><p>If defined, <code>collect2</code> will scan the individual object files
  982. specified on its command line and create an export list for the linker.
  983. Define this macro for systems like AIX, where the linker discards
  984. object files that are not referenced from <code>main</code> and uses export
  985. lists.
  986. </p></dd></dl>
  987. <dl>
  988. <dt><a name="index-MODIFY_005fJNI_005fMETHOD_005fCALL"></a>Macro: <strong>MODIFY_JNI_METHOD_CALL</strong> <em>(<var>mdecl</var>)</em></dt>
  989. <dd><p>Define this macro to a C expression representing a variant of the
  990. method call <var>mdecl</var>, if Java Native Interface (JNI) methods
  991. must be invoked differently from other methods on your target.
  992. For example, on 32-bit Microsoft Windows, JNI methods must be invoked using
  993. the <code>stdcall</code> calling convention and this macro is then
  994. defined as this expression:
  995. </p>
  996. <div class="smallexample">
  997. <pre class="smallexample">build_type_attribute_variant (<var>mdecl</var>,
  998. build_tree_list
  999. (get_identifier (&quot;stdcall&quot;),
  1000. NULL))
  1001. </pre></div>
  1002. </dd></dl>
  1003. <dl>
  1004. <dt><a name="index-TARGET_005fCANNOT_005fMODIFY_005fJUMPS_005fP"></a>Target Hook: <em>bool</em> <strong>TARGET_CANNOT_MODIFY_JUMPS_P</strong> <em>(void)</em></dt>
  1005. <dd><p>This target hook returns <code>true</code> past the point in which new jump
  1006. instructions could be created. On machines that require a register for
  1007. every jump such as the SHmedia ISA of SH5, this point would typically be
  1008. reload, so this target hook should be defined to a function such as:
  1009. </p>
  1010. <div class="smallexample">
  1011. <pre class="smallexample">static bool
  1012. cannot_modify_jumps_past_reload_p ()
  1013. {
  1014. return (reload_completed || reload_in_progress);
  1015. }
  1016. </pre></div>
  1017. </dd></dl>
  1018. <dl>
  1019. <dt><a name="index-TARGET_005fBRANCH_005fTARGET_005fREGISTER_005fCLASS"></a>Target Hook: <em>reg_class_t</em> <strong>TARGET_BRANCH_TARGET_REGISTER_CLASS</strong> <em>(void)</em></dt>
  1020. <dd><p>This target hook returns a register class for which branch target register
  1021. optimizations should be applied. All registers in this class should be
  1022. usable interchangeably. After reload, registers in this class will be
  1023. re-allocated and loads will be hoisted out of loops and be subjected
  1024. to inter-block scheduling.
  1025. </p></dd></dl>
  1026. <dl>
  1027. <dt><a name="index-TARGET_005fBRANCH_005fTARGET_005fREGISTER_005fCALLEE_005fSAVED"></a>Target Hook: <em>bool</em> <strong>TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED</strong> <em>(bool <var>after_prologue_epilogue_gen</var>)</em></dt>
  1028. <dd><p>Branch target register optimization will by default exclude callee-saved
  1029. registers
  1030. that are not already live during the current function; if this target hook
  1031. returns true, they will be included. The target code must than make sure
  1032. that all target registers in the class returned by
  1033. &lsquo;<samp>TARGET_BRANCH_TARGET_REGISTER_CLASS</samp>&rsquo; that might need saving are
  1034. saved. <var>after_prologue_epilogue_gen</var> indicates if prologues and
  1035. epilogues have already been generated. Note, even if you only return
  1036. true when <var>after_prologue_epilogue_gen</var> is false, you still are likely
  1037. to have to make special provisions in <code>INITIAL_ELIMINATION_OFFSET</code>
  1038. to reserve space for caller-saved target registers.
  1039. </p></dd></dl>
  1040. <dl>
  1041. <dt><a name="index-TARGET_005fHAVE_005fCONDITIONAL_005fEXECUTION"></a>Target Hook: <em>bool</em> <strong>TARGET_HAVE_CONDITIONAL_EXECUTION</strong> <em>(void)</em></dt>
  1042. <dd><p>This target hook returns true if the target supports conditional execution.
  1043. This target hook is required only when the target has several different
  1044. modes and they have different conditional execution capability, such as ARM.
  1045. </p></dd></dl>
  1046. <dl>
  1047. <dt><a name="index-TARGET_005fGEN_005fCCMP_005fFIRST"></a>Target Hook: <em>rtx</em> <strong>TARGET_GEN_CCMP_FIRST</strong> <em>(rtx_insn **<var>prep_seq</var>, rtx_insn **<var>gen_seq</var>, int <var>code</var>, tree <var>op0</var>, tree <var>op1</var>)</em></dt>
  1048. <dd><p>This function prepares to emit a comparison insn for the first compare in a
  1049. sequence of conditional comparisions. It returns an appropriate comparison
  1050. with <code>CC</code> for passing to <code>gen_ccmp_next</code> or <code>cbranch_optab</code>.
  1051. The insns to prepare the compare are saved in <var>prep_seq</var> and the compare
  1052. insns are saved in <var>gen_seq</var>. They will be emitted when all the
  1053. compares in the the conditional comparision are generated without error.
  1054. <var>code</var> is the <code>rtx_code</code> of the compare for <var>op0</var> and <var>op1</var>.
  1055. </p></dd></dl>
  1056. <dl>
  1057. <dt><a name="index-TARGET_005fGEN_005fCCMP_005fNEXT"></a>Target Hook: <em>rtx</em> <strong>TARGET_GEN_CCMP_NEXT</strong> <em>(rtx_insn **<var>prep_seq</var>, rtx_insn **<var>gen_seq</var>, rtx <var>prev</var>, int <var>cmp_code</var>, tree <var>op0</var>, tree <var>op1</var>, int <var>bit_code</var>)</em></dt>
  1058. <dd><p>This function prepares to emit a conditional comparison within a sequence
  1059. of conditional comparisons. It returns an appropriate comparison with
  1060. <code>CC</code> for passing to <code>gen_ccmp_next</code> or <code>cbranch_optab</code>.
  1061. The insns to prepare the compare are saved in <var>prep_seq</var> and the compare
  1062. insns are saved in <var>gen_seq</var>. They will be emitted when all the
  1063. compares in the conditional comparision are generated without error. The
  1064. <var>prev</var> expression is the result of a prior call to <code>gen_ccmp_first</code>
  1065. or <code>gen_ccmp_next</code>. It may return <code>NULL</code> if the combination of
  1066. <var>prev</var> and this comparison is not supported, otherwise the result must
  1067. be appropriate for passing to <code>gen_ccmp_next</code> or <code>cbranch_optab</code>.
  1068. <var>code</var> is the <code>rtx_code</code> of the compare for <var>op0</var> and <var>op1</var>.
  1069. <var>bit_code</var> is <code>AND</code> or <code>IOR</code>, which is the op on the compares.
  1070. </p></dd></dl>
  1071. <dl>
  1072. <dt><a name="index-TARGET_005fLOOP_005fUNROLL_005fADJUST"></a>Target Hook: <em>unsigned</em> <strong>TARGET_LOOP_UNROLL_ADJUST</strong> <em>(unsigned <var>nunroll</var>, struct loop *<var>loop</var>)</em></dt>
  1073. <dd><p>This target hook returns a new value for the number of times <var>loop</var>
  1074. should be unrolled. The parameter <var>nunroll</var> is the number of times
  1075. the loop is to be unrolled. The parameter <var>loop</var> is a pointer to
  1076. the loop, which is going to be checked for unrolling. This target hook
  1077. is required only when the target has special constraints like maximum
  1078. number of memory accesses.
  1079. </p></dd></dl>
  1080. <dl>
  1081. <dt><a name="index-POWI_005fMAX_005fMULTS"></a>Macro: <strong>POWI_MAX_MULTS</strong></dt>
  1082. <dd><p>If defined, this macro is interpreted as a signed integer C expression
  1083. that specifies the maximum number of floating point multiplications
  1084. that should be emitted when expanding exponentiation by an integer
  1085. constant inline. When this value is defined, exponentiation requiring
  1086. more than this number of multiplications is implemented by calling the
  1087. system library&rsquo;s <code>pow</code>, <code>powf</code> or <code>powl</code> routines.
  1088. The default value places no upper bound on the multiplication count.
  1089. </p></dd></dl>
  1090. <dl>
  1091. <dt><a name="index-TARGET_005fEXTRA_005fINCLUDES"></a>Macro: <em>void</em> <strong>TARGET_EXTRA_INCLUDES</strong> <em>(const char *<var>sysroot</var>, const char *<var>iprefix</var>, int <var>stdinc</var>)</em></dt>
  1092. <dd><p>This target hook should register any extra include files for the
  1093. target. The parameter <var>stdinc</var> indicates if normal include files
  1094. are present. The parameter <var>sysroot</var> is the system root directory.
  1095. The parameter <var>iprefix</var> is the prefix for the gcc directory.
  1096. </p></dd></dl>
  1097. <dl>
  1098. <dt><a name="index-TARGET_005fEXTRA_005fPRE_005fINCLUDES"></a>Macro: <em>void</em> <strong>TARGET_EXTRA_PRE_INCLUDES</strong> <em>(const char *<var>sysroot</var>, const char *<var>iprefix</var>, int <var>stdinc</var>)</em></dt>
  1099. <dd><p>This target hook should register any extra include files for the
  1100. target before any standard headers. The parameter <var>stdinc</var>
  1101. indicates if normal include files are present. The parameter
  1102. <var>sysroot</var> is the system root directory. The parameter
  1103. <var>iprefix</var> is the prefix for the gcc directory.
  1104. </p></dd></dl>
  1105. <dl>
  1106. <dt><a name="index-TARGET_005fOPTF"></a>Macro: <em>void</em> <strong>TARGET_OPTF</strong> <em>(char *<var>path</var>)</em></dt>
  1107. <dd><p>This target hook should register special include paths for the target.
  1108. The parameter <var>path</var> is the include to register. On Darwin
  1109. systems, this is used for Framework includes, which have semantics
  1110. that are different from <samp>-I</samp>.
  1111. </p></dd></dl>
  1112. <dl>
  1113. <dt><a name="index-bool"></a>Macro: <strong>bool</strong> <em>TARGET_USE_LOCAL_THUNK_ALIAS_P (tree <var>fndecl</var>)</em></dt>
  1114. <dd><p>This target macro returns <code>true</code> if it is safe to use a local alias
  1115. for a virtual function <var>fndecl</var> when constructing thunks,
  1116. <code>false</code> otherwise. By default, the macro returns <code>true</code> for all
  1117. functions, if a target supports aliases (i.e. defines
  1118. <code>ASM_OUTPUT_DEF</code>), <code>false</code> otherwise,
  1119. </p></dd></dl>
  1120. <dl>
  1121. <dt><a name="index-TARGET_005fFORMAT_005fTYPES"></a>Macro: <strong>TARGET_FORMAT_TYPES</strong></dt>
  1122. <dd><p>If defined, this macro is the name of a global variable containing
  1123. target-specific format checking information for the <samp>-Wformat</samp>
  1124. option. The default is to have no target-specific format checks.
  1125. </p></dd></dl>
  1126. <dl>
  1127. <dt><a name="index-TARGET_005fN_005fFORMAT_005fTYPES"></a>Macro: <strong>TARGET_N_FORMAT_TYPES</strong></dt>
  1128. <dd><p>If defined, this macro is the number of entries in
  1129. <code>TARGET_FORMAT_TYPES</code>.
  1130. </p></dd></dl>
  1131. <dl>
  1132. <dt><a name="index-TARGET_005fOVERRIDES_005fFORMAT_005fATTRIBUTES"></a>Macro: <strong>TARGET_OVERRIDES_FORMAT_ATTRIBUTES</strong></dt>
  1133. <dd><p>If defined, this macro is the name of a global variable containing
  1134. target-specific format overrides for the <samp>-Wformat</samp> option. The
  1135. default is to have no target-specific format overrides. If defined,
  1136. <code>TARGET_FORMAT_TYPES</code> must be defined, too.
  1137. </p></dd></dl>
  1138. <dl>
  1139. <dt><a name="index-TARGET_005fOVERRIDES_005fFORMAT_005fATTRIBUTES_005fCOUNT"></a>Macro: <strong>TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT</strong></dt>
  1140. <dd><p>If defined, this macro specifies the number of entries in
  1141. <code>TARGET_OVERRIDES_FORMAT_ATTRIBUTES</code>.
  1142. </p></dd></dl>
  1143. <dl>
  1144. <dt><a name="index-TARGET_005fOVERRIDES_005fFORMAT_005fINIT"></a>Macro: <strong>TARGET_OVERRIDES_FORMAT_INIT</strong></dt>
  1145. <dd><p>If defined, this macro specifies the optional initialization
  1146. routine for target specific customizations of the system printf
  1147. and scanf formatter settings.
  1148. </p></dd></dl>
  1149. <dl>
  1150. <dt><a name="index-TARGET_005fINVALID_005fARG_005fFOR_005fUNPROTOTYPED_005fFN"></a>Target Hook: <em>const char *</em> <strong>TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN</strong> <em>(const_tree <var>typelist</var>, const_tree <var>funcdecl</var>, const_tree <var>val</var>)</em></dt>
  1151. <dd><p>If defined, this macro returns the diagnostic message when it is
  1152. illegal to pass argument <var>val</var> to function <var>funcdecl</var>
  1153. with prototype <var>typelist</var>.
  1154. </p></dd></dl>
  1155. <dl>
  1156. <dt><a name="index-TARGET_005fINVALID_005fCONVERSION"></a>Target Hook: <em>const char *</em> <strong>TARGET_INVALID_CONVERSION</strong> <em>(const_tree <var>fromtype</var>, const_tree <var>totype</var>)</em></dt>
  1157. <dd><p>If defined, this macro returns the diagnostic message when it is
  1158. invalid to convert from <var>fromtype</var> to <var>totype</var>, or <code>NULL</code>
  1159. if validity should be determined by the front end.
  1160. </p></dd></dl>
  1161. <dl>
  1162. <dt><a name="index-TARGET_005fINVALID_005fUNARY_005fOP"></a>Target Hook: <em>const char *</em> <strong>TARGET_INVALID_UNARY_OP</strong> <em>(int <var>op</var>, const_tree <var>type</var>)</em></dt>
  1163. <dd><p>If defined, this macro returns the diagnostic message when it is
  1164. invalid to apply operation <var>op</var> (where unary plus is denoted by
  1165. <code>CONVERT_EXPR</code>) to an operand of type <var>type</var>, or <code>NULL</code>
  1166. if validity should be determined by the front end.
  1167. </p></dd></dl>
  1168. <dl>
  1169. <dt><a name="index-TARGET_005fINVALID_005fBINARY_005fOP"></a>Target Hook: <em>const char *</em> <strong>TARGET_INVALID_BINARY_OP</strong> <em>(int <var>op</var>, const_tree <var>type1</var>, const_tree <var>type2</var>)</em></dt>
  1170. <dd><p>If defined, this macro returns the diagnostic message when it is
  1171. invalid to apply operation <var>op</var> to operands of types <var>type1</var>
  1172. and <var>type2</var>, or <code>NULL</code> if validity should be determined by
  1173. the front end.
  1174. </p></dd></dl>
  1175. <dl>
  1176. <dt><a name="index-TARGET_005fPROMOTED_005fTYPE"></a>Target Hook: <em>tree</em> <strong>TARGET_PROMOTED_TYPE</strong> <em>(const_tree <var>type</var>)</em></dt>
  1177. <dd><p>If defined, this target hook returns the type to which values of
  1178. <var>type</var> should be promoted when they appear in expressions,
  1179. analogous to the integer promotions, or <code>NULL_TREE</code> to use the
  1180. front end&rsquo;s normal promotion rules. This hook is useful when there are
  1181. target-specific types with special promotion rules.
  1182. This is currently used only by the C and C++ front ends.
  1183. </p></dd></dl>
  1184. <dl>
  1185. <dt><a name="index-TARGET_005fCONVERT_005fTO_005fTYPE"></a>Target Hook: <em>tree</em> <strong>TARGET_CONVERT_TO_TYPE</strong> <em>(tree <var>type</var>, tree <var>expr</var>)</em></dt>
  1186. <dd><p>If defined, this hook returns the result of converting <var>expr</var> to
  1187. <var>type</var>. It should return the converted expression,
  1188. or <code>NULL_TREE</code> to apply the front end&rsquo;s normal conversion rules.
  1189. This hook is useful when there are target-specific types with special
  1190. conversion rules.
  1191. This is currently used only by the C and C++ front ends.
  1192. </p></dd></dl>
  1193. <dl>
  1194. <dt><a name="index-OBJC_005fJBLEN"></a>Macro: <strong>OBJC_JBLEN</strong></dt>
  1195. <dd><p>This macro determines the size of the objective C jump buffer for the
  1196. NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value.
  1197. </p></dd></dl>
  1198. <dl>
  1199. <dt><a name="index-LIBGCC2_005fUNWIND_005fATTRIBUTE"></a>Macro: <strong>LIBGCC2_UNWIND_ATTRIBUTE</strong></dt>
  1200. <dd><p>Define this macro if any target-specific attributes need to be attached
  1201. to the functions in <samp>libgcc</samp> that provide low-level support for
  1202. call stack unwinding. It is used in declarations in <samp>unwind-generic.h</samp>
  1203. and the associated definitions of those functions.
  1204. </p></dd></dl>
  1205. <dl>
  1206. <dt><a name="index-TARGET_005fUPDATE_005fSTACK_005fBOUNDARY"></a>Target Hook: <em>void</em> <strong>TARGET_UPDATE_STACK_BOUNDARY</strong> <em>(void)</em></dt>
  1207. <dd><p>Define this macro to update the current function stack boundary if
  1208. necessary.
  1209. </p></dd></dl>
  1210. <dl>
  1211. <dt><a name="index-TARGET_005fGET_005fDRAP_005fRTX"></a>Target Hook: <em>rtx</em> <strong>TARGET_GET_DRAP_RTX</strong> <em>(void)</em></dt>
  1212. <dd><p>This hook should return an rtx for Dynamic Realign Argument Pointer (DRAP) if a
  1213. different argument pointer register is needed to access the function&rsquo;s
  1214. argument list due to stack realignment. Return <code>NULL</code> if no DRAP
  1215. is needed.
  1216. </p></dd></dl>
  1217. <dl>
  1218. <dt><a name="index-TARGET_005fALLOCATE_005fSTACK_005fSLOTS_005fFOR_005fARGS"></a>Target Hook: <em>bool</em> <strong>TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS</strong> <em>(void)</em></dt>
  1219. <dd><p>When optimization is disabled, this hook indicates whether or not
  1220. arguments should be allocated to stack slots. Normally, GCC allocates
  1221. stacks slots for arguments when not optimizing in order to make
  1222. debugging easier. However, when a function is declared with
  1223. <code>__attribute__((naked))</code>, there is no stack frame, and the compiler
  1224. cannot safely move arguments from the registers in which they are passed
  1225. to the stack. Therefore, this hook should return true in general, but
  1226. false for naked functions. The default implementation always returns true.
  1227. </p></dd></dl>
  1228. <dl>
  1229. <dt><a name="index-TARGET_005fCONST_005fANCHOR"></a>Target Hook: <em>unsigned HOST_WIDE_INT</em> <strong>TARGET_CONST_ANCHOR</strong></dt>
  1230. <dd><p>On some architectures it can take multiple instructions to synthesize
  1231. a constant. If there is another constant already in a register that
  1232. is close enough in value then it is preferable that the new constant
  1233. is computed from this register using immediate addition or
  1234. subtraction. We accomplish this through CSE. Besides the value of
  1235. the constant we also add a lower and an upper constant anchor to the
  1236. available expressions. These are then queried when encountering new
  1237. constants. The anchors are computed by rounding the constant up and
  1238. down to a multiple of the value of <code>TARGET_CONST_ANCHOR</code>.
  1239. <code>TARGET_CONST_ANCHOR</code> should be the maximum positive value
  1240. accepted by immediate-add plus one. We currently assume that the
  1241. value of <code>TARGET_CONST_ANCHOR</code> is a power of 2. For example, on
  1242. MIPS, where add-immediate takes a 16-bit signed value,
  1243. <code>TARGET_CONST_ANCHOR</code> is set to &lsquo;<samp>0x8000</samp>&rsquo;. The default value
  1244. is zero, which disables this optimization.
  1245. </p></dd></dl>
  1246. <dl>
  1247. <dt><a name="index-TARGET_005fASAN_005fSHADOW_005fOFFSET"></a>Target Hook: <em>unsigned HOST_WIDE_INT</em> <strong>TARGET_ASAN_SHADOW_OFFSET</strong> <em>(void)</em></dt>
  1248. <dd><p>Return the offset bitwise ored into shifted address to get corresponding
  1249. Address Sanitizer shadow memory address. NULL if Address Sanitizer is not
  1250. supported by the target.
  1251. </p></dd></dl>
  1252. <dl>
  1253. <dt><a name="index-TARGET_005fMEMMODEL_005fCHECK"></a>Target Hook: <em>unsigned HOST_WIDE_INT</em> <strong>TARGET_MEMMODEL_CHECK</strong> <em>(unsigned HOST_WIDE_INT <var>val</var>)</em></dt>
  1254. <dd><p>Validate target specific memory model mask bits. When NULL no target specific
  1255. memory model bits are allowed.
  1256. </p></dd></dl>
  1257. <dl>
  1258. <dt><a name="index-TARGET_005fATOMIC_005fTEST_005fAND_005fSET_005fTRUEVAL"></a>Target Hook: <em>unsigned char</em> <strong>TARGET_ATOMIC_TEST_AND_SET_TRUEVAL</strong></dt>
  1259. <dd><p>This value should be set if the result written by <code>atomic_test_and_set</code> is not exactly 1, i.e. the <code>bool</code> <code>true</code>.
  1260. </p></dd></dl>
  1261. <dl>
  1262. <dt><a name="index-TARGET_005fHAS_005fIFUNC_005fP"></a>Target Hook: <em>bool</em> <strong>TARGET_HAS_IFUNC_P</strong> <em>(void)</em></dt>
  1263. <dd><p>It returns true if the target supports GNU indirect functions.
  1264. The support includes the assembler, linker and dynamic linker.
  1265. The default value of this hook is based on target&rsquo;s libc.
  1266. </p></dd></dl>
  1267. <dl>
  1268. <dt><a name="index-TARGET_005fATOMIC_005fALIGN_005fFOR_005fMODE"></a>Target Hook: <em>unsigned int</em> <strong>TARGET_ATOMIC_ALIGN_FOR_MODE</strong> <em>(machine_mode <var>mode</var>)</em></dt>
  1269. <dd><p>If defined, this function returns an appropriate alignment in bits for an atomic object of machine_mode <var>mode</var>. If 0 is returned then the default alignment for the specified mode is used.
  1270. </p></dd></dl>
  1271. <dl>
  1272. <dt><a name="index-TARGET_005fATOMIC_005fASSIGN_005fEXPAND_005fFENV"></a>Target Hook: <em>void</em> <strong>TARGET_ATOMIC_ASSIGN_EXPAND_FENV</strong> <em>(tree *<var>hold</var>, tree *<var>clear</var>, tree *<var>update</var>)</em></dt>
  1273. <dd><p>ISO C11 requires atomic compound assignments that may raise floating-point exceptions to raise exceptions corresponding to the arithmetic operation whose result was successfully stored in a compare-and-exchange sequence. This requires code equivalent to calls to <code>feholdexcept</code>, <code>feclearexcept</code> and <code>feupdateenv</code> to be generated at appropriate points in the compare-and-exchange sequence. This hook should set <code>*<var>hold</var></code> to an expression equivalent to the call to <code>feholdexcept</code>, <code>*<var>clear</var></code> to an expression equivalent to the call to <code>feclearexcept</code> and <code>*<var>update</var></code> to an expression equivalent to the call to <code>feupdateenv</code>. The three expressions are <code>NULL_TREE</code> on entry to the hook and may be left as <code>NULL_TREE</code> if no code is required in a particular place. The default implementation leaves all three expressions as <code>NULL_TREE</code>. The <code>__atomic_feraiseexcept</code> function from <code>libatomic</code> may be of use as part of the code generated in <code>*<var>update</var></code>.
  1274. </p></dd></dl>
  1275. <dl>
  1276. <dt><a name="index-TARGET_005fRECORD_005fOFFLOAD_005fSYMBOL"></a>Target Hook: <em>void</em> <strong>TARGET_RECORD_OFFLOAD_SYMBOL</strong> <em>(tree)</em></dt>
  1277. <dd><p>Used when offloaded functions are seen in the compilation unit and no named
  1278. sections are available. It is called once for each symbol that must be
  1279. recorded in the offload function and variable table.
  1280. </p></dd></dl>
  1281. <dl>
  1282. <dt><a name="index-TARGET_005fOFFLOAD_005fOPTIONS"></a>Target Hook: <em>char *</em> <strong>TARGET_OFFLOAD_OPTIONS</strong> <em>(void)</em></dt>
  1283. <dd><p>Used when writing out the list of options into an LTO file. It should
  1284. translate any relevant target-specific options (such as the ABI in use)
  1285. into one of the <samp>-foffload</samp> options that exist as a common interface
  1286. to express such options. It should return a string containing these options,
  1287. separated by spaces, which the caller will free.
  1288. </p>
  1289. </dd></dl>
  1290. <dl>
  1291. <dt><a name="index-TARGET_005fSUPPORTS_005fWIDE_005fINT"></a>Macro: <strong>TARGET_SUPPORTS_WIDE_INT</strong></dt>
  1292. <dd>
  1293. <p>On older ports, large integers are stored in <code>CONST_DOUBLE</code> rtl
  1294. objects. Newer ports define <code>TARGET_SUPPORTS_WIDE_INT</code> to be nonzero
  1295. to indicate that large integers are stored in
  1296. <code>CONST_WIDE_INT</code> rtl objects. The <code>CONST_WIDE_INT</code> allows
  1297. very large integer constants to be represented. <code>CONST_DOUBLE</code>
  1298. is limited to twice the size of the host&rsquo;s <code>HOST_WIDE_INT</code>
  1299. representation.
  1300. </p>
  1301. <p>Converting a port mostly requires looking for the places where
  1302. <code>CONST_DOUBLE</code>s are used with <code>VOIDmode</code> and replacing that
  1303. code with code that accesses <code>CONST_WIDE_INT</code>s. &lsquo;<samp>&quot;grep -i
  1304. const_double&quot;</samp>&rsquo; at the port level gets you to 95% of the changes that
  1305. need to be made. There are a few places that require a deeper look.
  1306. </p>
  1307. <ul>
  1308. <li> There is no equivalent to <code>hval</code> and <code>lval</code> for
  1309. <code>CONST_WIDE_INT</code>s. This would be difficult to express in the md
  1310. language since there are a variable number of elements.
  1311. <p>Most ports only check that <code>hval</code> is either 0 or -1 to see if the
  1312. value is small. As mentioned above, this will no longer be necessary
  1313. since small constants are always <code>CONST_INT</code>. Of course there
  1314. are still a few exceptions, the alpha&rsquo;s constraint used by the zap
  1315. instruction certainly requires careful examination by C code.
  1316. However, all the current code does is pass the hval and lval to C
  1317. code, so evolving the c code to look at the <code>CONST_WIDE_INT</code> is
  1318. not really a large change.
  1319. </p>
  1320. </li><li> Because there is no standard template that ports use to materialize
  1321. constants, there is likely to be some futzing that is unique to each
  1322. port in this code.
  1323. </li><li> The rtx costs may have to be adjusted to properly account for larger
  1324. constants that are represented as <code>CONST_WIDE_INT</code>.
  1325. </li></ul>
  1326. <p>All and all it does not take long to convert ports that the
  1327. maintainer is familiar with.
  1328. </p>
  1329. </dd></dl>
  1330. <dl>
  1331. <dt><a name="index-TARGET_005fRUN_005fTARGET_005fSELFTESTS"></a>Target Hook: <em>void</em> <strong>TARGET_RUN_TARGET_SELFTESTS</strong> <em>(void)</em></dt>
  1332. <dd><p>If selftests are enabled, run any selftests for this target.
  1333. </p></dd></dl>
  1334. <hr>
  1335. <div class="header">
  1336. <p>
  1337. Previous: <a href="Named-Address-Spaces.html#Named-Address-Spaces" accesskey="p" rel="prev">Named Address Spaces</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</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>
  1338. </div>
  1339. </body>
  1340. </html>