選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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