defaults.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458
  1. /* Definitions of various defaults for tm.h macros.
  2. Copyright (C) 1992-2018 Free Software Foundation, Inc.
  3. Contributed by Ron Guilmette (rfg@monkeys.com)
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify it under
  6. the terms of the GNU General Public License as published by the Free
  7. Software Foundation; either version 3, or (at your option) any later
  8. version.
  9. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. for more details.
  13. Under Section 7 of GPL version 3, you are granted additional
  14. permissions described in the GCC Runtime Library Exception, version
  15. 3.1, as published by the Free Software Foundation.
  16. You should have received a copy of the GNU General Public License and
  17. a copy of the GCC Runtime Library Exception along with this program;
  18. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. <http://www.gnu.org/licenses/>. */
  20. #ifndef GCC_DEFAULTS_H
  21. #define GCC_DEFAULTS_H
  22. /* How to start an assembler comment. */
  23. #ifndef ASM_COMMENT_START
  24. #define ASM_COMMENT_START ";#"
  25. #endif
  26. /* Store in OUTPUT a string (made with alloca) containing an
  27. assembler-name for a local static variable or function named NAME.
  28. LABELNO is an integer which is different for each call. */
  29. #ifndef ASM_PN_FORMAT
  30. # ifndef NO_DOT_IN_LABEL
  31. # define ASM_PN_FORMAT "%s.%lu"
  32. # else
  33. # ifndef NO_DOLLAR_IN_LABEL
  34. # define ASM_PN_FORMAT "%s$%lu"
  35. # else
  36. # define ASM_PN_FORMAT "__%s_%lu"
  37. # endif
  38. # endif
  39. #endif /* ! ASM_PN_FORMAT */
  40. #ifndef ASM_FORMAT_PRIVATE_NAME
  41. # define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
  42. do { const char *const name_ = (NAME); \
  43. char *const output_ = (OUTPUT) = \
  44. (char *) alloca (strlen (name_) + 32); \
  45. sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
  46. } while (0)
  47. #endif
  48. /* Choose a reasonable default for ASM_OUTPUT_ASCII. */
  49. #ifndef ASM_OUTPUT_ASCII
  50. #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
  51. do { \
  52. FILE *_hide_asm_out_file = (MYFILE); \
  53. const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
  54. int _hide_thissize = (MYLENGTH); \
  55. { \
  56. FILE *asm_out_file = _hide_asm_out_file; \
  57. const unsigned char *p = _hide_p; \
  58. int thissize = _hide_thissize; \
  59. int i; \
  60. fprintf (asm_out_file, "\t.ascii \""); \
  61. \
  62. for (i = 0; i < thissize; i++) \
  63. { \
  64. int c = p[i]; \
  65. if (c == '\"' || c == '\\') \
  66. putc ('\\', asm_out_file); \
  67. if (ISPRINT (c)) \
  68. putc (c, asm_out_file); \
  69. else \
  70. { \
  71. fprintf (asm_out_file, "\\%o", c); \
  72. /* After an octal-escape, if a digit follows, \
  73. terminate one string constant and start another. \
  74. The VAX assembler fails to stop reading the escape \
  75. after three digits, so this is the only way we \
  76. can get it to parse the data properly. */ \
  77. if (i < thissize - 1 && ISDIGIT (p[i + 1])) \
  78. fprintf (asm_out_file, "\"\n\t.ascii \""); \
  79. } \
  80. } \
  81. fprintf (asm_out_file, "\"\n"); \
  82. } \
  83. } \
  84. while (0)
  85. #endif
  86. /* This is how we tell the assembler to equate two values. */
  87. #ifdef SET_ASM_OP
  88. #ifndef ASM_OUTPUT_DEF
  89. #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
  90. do { fprintf ((FILE), "%s", SET_ASM_OP); \
  91. assemble_name (FILE, LABEL1); \
  92. fprintf (FILE, ","); \
  93. assemble_name (FILE, LABEL2); \
  94. fprintf (FILE, "\n"); \
  95. } while (0)
  96. #endif
  97. #endif
  98. #ifndef IFUNC_ASM_TYPE
  99. #define IFUNC_ASM_TYPE "gnu_indirect_function"
  100. #endif
  101. #ifndef TLS_COMMON_ASM_OP
  102. #define TLS_COMMON_ASM_OP ".tls_common"
  103. #endif
  104. #if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON)
  105. #define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \
  106. do \
  107. { \
  108. fprintf ((FILE), "\t%s\t", TLS_COMMON_ASM_OP); \
  109. assemble_name ((FILE), (NAME)); \
  110. fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
  111. (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \
  112. } \
  113. while (0)
  114. #endif
  115. /* Decide whether to defer emitting the assembler output for an equate
  116. of two values. The default is to not defer output. */
  117. #ifndef TARGET_DEFERRED_OUTPUT_DEFS
  118. #define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) false
  119. #endif
  120. /* This is how to output the definition of a user-level label named
  121. NAME, such as the label on variable NAME. */
  122. #ifndef ASM_OUTPUT_LABEL
  123. #define ASM_OUTPUT_LABEL(FILE,NAME) \
  124. do { \
  125. assemble_name ((FILE), (NAME)); \
  126. fputs (":\n", (FILE)); \
  127. } while (0)
  128. #endif
  129. /* This is how to output the definition of a user-level label named
  130. NAME, such as the label on a function. */
  131. #ifndef ASM_OUTPUT_FUNCTION_LABEL
  132. #define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \
  133. ASM_OUTPUT_LABEL ((FILE), (NAME))
  134. #endif
  135. /* Output the definition of a compiler-generated label named NAME. */
  136. #ifndef ASM_OUTPUT_INTERNAL_LABEL
  137. #define ASM_OUTPUT_INTERNAL_LABEL(FILE,NAME) \
  138. do { \
  139. assemble_name_raw ((FILE), (NAME)); \
  140. fputs (":\n", (FILE)); \
  141. } while (0)
  142. #endif
  143. /* This is how to output a reference to a user-level label named NAME. */
  144. #ifndef ASM_OUTPUT_LABELREF
  145. #define ASM_OUTPUT_LABELREF(FILE,NAME) \
  146. do { \
  147. fputs (user_label_prefix, (FILE)); \
  148. fputs ((NAME), (FILE)); \
  149. } while (0)
  150. #endif
  151. /* Allow target to print debug info labels specially. This is useful for
  152. VLIW targets, since debug info labels should go into the middle of
  153. instruction bundles instead of breaking them. */
  154. #ifndef ASM_OUTPUT_DEBUG_LABEL
  155. #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
  156. (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
  157. #endif
  158. /* This is how we tell the assembler that a symbol is weak. */
  159. #ifndef ASM_OUTPUT_WEAK_ALIAS
  160. #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
  161. #define ASM_OUTPUT_WEAK_ALIAS(STREAM, NAME, VALUE) \
  162. do \
  163. { \
  164. ASM_WEAKEN_LABEL (STREAM, NAME); \
  165. if (VALUE) \
  166. ASM_OUTPUT_DEF (STREAM, NAME, VALUE); \
  167. } \
  168. while (0)
  169. #endif
  170. #endif
  171. /* This is how we tell the assembler that a symbol is a weak alias to
  172. another symbol that doesn't require the other symbol to be defined.
  173. Uses of the former will turn into weak uses of the latter, i.e.,
  174. uses that, in case the latter is undefined, will not cause errors,
  175. and will add it to the symbol table as weak undefined. However, if
  176. the latter is referenced directly, a strong reference prevails. */
  177. #ifndef ASM_OUTPUT_WEAKREF
  178. #if defined HAVE_GAS_WEAKREF
  179. #define ASM_OUTPUT_WEAKREF(FILE, DECL, NAME, VALUE) \
  180. do \
  181. { \
  182. fprintf ((FILE), "\t.weakref\t"); \
  183. assemble_name ((FILE), (NAME)); \
  184. fprintf ((FILE), ","); \
  185. assemble_name ((FILE), (VALUE)); \
  186. fprintf ((FILE), "\n"); \
  187. } \
  188. while (0)
  189. #endif
  190. #endif
  191. /* How to emit a .type directive. */
  192. #ifndef ASM_OUTPUT_TYPE_DIRECTIVE
  193. #if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
  194. #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
  195. do \
  196. { \
  197. fputs (TYPE_ASM_OP, STREAM); \
  198. assemble_name (STREAM, NAME); \
  199. fputs (", ", STREAM); \
  200. fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
  201. putc ('\n', STREAM); \
  202. } \
  203. while (0)
  204. #endif
  205. #endif
  206. /* How to emit a .size directive. */
  207. #ifndef ASM_OUTPUT_SIZE_DIRECTIVE
  208. #ifdef SIZE_ASM_OP
  209. #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
  210. do \
  211. { \
  212. HOST_WIDE_INT size_ = (SIZE); \
  213. fputs (SIZE_ASM_OP, STREAM); \
  214. assemble_name (STREAM, NAME); \
  215. fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
  216. } \
  217. while (0)
  218. #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
  219. do \
  220. { \
  221. fputs (SIZE_ASM_OP, STREAM); \
  222. assemble_name (STREAM, NAME); \
  223. fputs (", .-", STREAM); \
  224. assemble_name (STREAM, NAME); \
  225. putc ('\n', STREAM); \
  226. } \
  227. while (0)
  228. #endif
  229. #endif
  230. /* This determines whether or not we support weak symbols. SUPPORTS_WEAK
  231. must be a preprocessor constant. */
  232. #ifndef SUPPORTS_WEAK
  233. #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)
  234. #define SUPPORTS_WEAK 1
  235. #else
  236. #define SUPPORTS_WEAK 0
  237. #endif
  238. #endif
  239. /* This determines whether or not we support weak symbols during target
  240. code generation. TARGET_SUPPORTS_WEAK can be any valid C expression. */
  241. #ifndef TARGET_SUPPORTS_WEAK
  242. #define TARGET_SUPPORTS_WEAK (SUPPORTS_WEAK)
  243. #endif
  244. /* This determines whether or not we support the discriminator
  245. attribute in the .loc directive. */
  246. #ifndef SUPPORTS_DISCRIMINATOR
  247. #ifdef HAVE_GAS_DISCRIMINATOR
  248. #define SUPPORTS_DISCRIMINATOR 1
  249. #else
  250. #define SUPPORTS_DISCRIMINATOR 0
  251. #endif
  252. #endif
  253. /* This determines whether or not we support link-once semantics. */
  254. #ifndef SUPPORTS_ONE_ONLY
  255. #ifdef MAKE_DECL_ONE_ONLY
  256. #define SUPPORTS_ONE_ONLY 1
  257. #else
  258. #define SUPPORTS_ONE_ONLY 0
  259. #endif
  260. #endif
  261. /* This determines whether weak symbols must be left out of a static
  262. archive's table of contents. Defining this macro to be nonzero has
  263. the consequence that certain symbols will not be made weak that
  264. otherwise would be. The C++ ABI requires this macro to be zero;
  265. see the documentation. */
  266. #ifndef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
  267. #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 0
  268. #endif
  269. /* This determines whether or not we need linkonce unwind information. */
  270. #ifndef TARGET_USES_WEAK_UNWIND_INFO
  271. #define TARGET_USES_WEAK_UNWIND_INFO 0
  272. #endif
  273. /* By default, there is no prefix on user-defined symbols. */
  274. #ifndef USER_LABEL_PREFIX
  275. #define USER_LABEL_PREFIX ""
  276. #endif
  277. /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
  278. provide a weak attribute. Else define it to nothing.
  279. This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
  280. not available at that time.
  281. Note, this is only for use by target files which we know are to be
  282. compiled by GCC. */
  283. #ifndef TARGET_ATTRIBUTE_WEAK
  284. # if SUPPORTS_WEAK
  285. # define TARGET_ATTRIBUTE_WEAK __attribute__ ((weak))
  286. # else
  287. # define TARGET_ATTRIBUTE_WEAK
  288. # endif
  289. #endif
  290. /* By default we can assume that all global symbols are in one namespace,
  291. across all shared libraries. */
  292. #ifndef MULTIPLE_SYMBOL_SPACES
  293. # define MULTIPLE_SYMBOL_SPACES 0
  294. #endif
  295. /* If the target supports init_priority C++ attribute, give
  296. SUPPORTS_INIT_PRIORITY a nonzero value. */
  297. #ifndef SUPPORTS_INIT_PRIORITY
  298. #define SUPPORTS_INIT_PRIORITY 1
  299. #endif /* SUPPORTS_INIT_PRIORITY */
  300. /* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
  301. the rest of the DWARF 2 frame unwind support is also provided. */
  302. #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
  303. #define DWARF2_UNWIND_INFO 1
  304. #endif
  305. /* If we have named sections, and we're using crtstuff to run ctors,
  306. use them for registering eh frame information. */
  307. #if defined (TARGET_ASM_NAMED_SECTION) && DWARF2_UNWIND_INFO \
  308. && !defined (EH_FRAME_THROUGH_COLLECT2)
  309. #ifndef EH_FRAME_SECTION_NAME
  310. #define EH_FRAME_SECTION_NAME ".eh_frame"
  311. #endif
  312. #endif
  313. /* On many systems, different EH table encodings are used under
  314. difference circumstances. Some will require runtime relocations;
  315. some will not. For those that do not require runtime relocations,
  316. we would like to make the table read-only. However, since the
  317. read-only tables may need to be combined with read-write tables
  318. that do require runtime relocation, it is not safe to make the
  319. tables read-only unless the linker will merge read-only and
  320. read-write sections into a single read-write section. If your
  321. linker does not have this ability, but your system is such that no
  322. encoding used with non-PIC code will ever require a runtime
  323. relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
  324. your target configuration file. */
  325. #ifndef EH_TABLES_CAN_BE_READ_ONLY
  326. #ifdef HAVE_LD_RO_RW_SECTION_MIXING
  327. #define EH_TABLES_CAN_BE_READ_ONLY 1
  328. #else
  329. #define EH_TABLES_CAN_BE_READ_ONLY 0
  330. #endif
  331. #endif
  332. /* Provide defaults for stuff that may not be defined when using
  333. sjlj exceptions. */
  334. #ifndef EH_RETURN_DATA_REGNO
  335. #define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM
  336. #endif
  337. /* Offset between the eh handler address and entry in eh tables. */
  338. #ifndef RETURN_ADDR_OFFSET
  339. #define RETURN_ADDR_OFFSET 0
  340. #endif
  341. #ifndef MASK_RETURN_ADDR
  342. #define MASK_RETURN_ADDR NULL_RTX
  343. #endif
  344. /* Number of hardware registers that go into the DWARF-2 unwind info.
  345. If not defined, equals FIRST_PSEUDO_REGISTER */
  346. #ifndef DWARF_FRAME_REGISTERS
  347. #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
  348. #endif
  349. /* Offsets recorded in opcodes are a multiple of this alignment factor. */
  350. #ifndef DWARF_CIE_DATA_ALIGNMENT
  351. #ifdef STACK_GROWS_DOWNWARD
  352. #define DWARF_CIE_DATA_ALIGNMENT (-((int) UNITS_PER_WORD))
  353. #else
  354. #define DWARF_CIE_DATA_ALIGNMENT ((int) UNITS_PER_WORD)
  355. #endif
  356. #endif
  357. /* The DWARF 2 CFA column which tracks the return address. Normally this
  358. is the column for PC, or the first column after all of the hard
  359. registers. */
  360. #ifndef DWARF_FRAME_RETURN_COLUMN
  361. #ifdef PC_REGNUM
  362. #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PC_REGNUM)
  363. #else
  364. #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGISTERS
  365. #endif
  366. #endif
  367. /* How to renumber registers for dbx and gdb. If not defined, assume
  368. no renumbering is necessary. */
  369. #ifndef DBX_REGISTER_NUMBER
  370. #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
  371. #endif
  372. /* The mapping from gcc register number to DWARF 2 CFA column number.
  373. By default, we just provide columns for all registers. */
  374. #ifndef DWARF_FRAME_REGNUM
  375. #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
  376. #endif
  377. /* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
  378. #ifndef DWARF_REG_TO_UNWIND_COLUMN
  379. #define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
  380. #endif
  381. /* Map register numbers held in the call frame info that gcc has
  382. collected using DWARF_FRAME_REGNUM to those that should be output in
  383. .debug_frame and .eh_frame. */
  384. #ifndef DWARF2_FRAME_REG_OUT
  385. #define DWARF2_FRAME_REG_OUT(REGNO, FOR_EH) (REGNO)
  386. #endif
  387. /* The size of addresses as they appear in the Dwarf 2 data.
  388. Some architectures use word addresses to refer to code locations,
  389. but Dwarf 2 info always uses byte addresses. On such machines,
  390. Dwarf 2 addresses need to be larger than the architecture's
  391. pointers. */
  392. #ifndef DWARF2_ADDR_SIZE
  393. #define DWARF2_ADDR_SIZE ((POINTER_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT)
  394. #endif
  395. /* The size in bytes of a DWARF field indicating an offset or length
  396. relative to a debug info section, specified to be 4 bytes in the
  397. DWARF-2 specification. The SGI/MIPS ABI defines it to be the same
  398. as PTR_SIZE. */
  399. #ifndef DWARF_OFFSET_SIZE
  400. #define DWARF_OFFSET_SIZE 4
  401. #endif
  402. /* The size in bytes of a DWARF 4 type signature. */
  403. #ifndef DWARF_TYPE_SIGNATURE_SIZE
  404. #define DWARF_TYPE_SIGNATURE_SIZE 8
  405. #endif
  406. /* Default sizes for base C types. If the sizes are different for
  407. your target, you should override these values by defining the
  408. appropriate symbols in your tm.h file. */
  409. #ifndef BITS_PER_WORD
  410. #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
  411. #endif
  412. #ifndef CHAR_TYPE_SIZE
  413. #define CHAR_TYPE_SIZE BITS_PER_UNIT
  414. #endif
  415. #ifndef BOOL_TYPE_SIZE
  416. /* `bool' has size and alignment `1', on almost all platforms. */
  417. #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
  418. #endif
  419. #ifndef SHORT_TYPE_SIZE
  420. #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
  421. #endif
  422. #ifndef INT_TYPE_SIZE
  423. #define INT_TYPE_SIZE BITS_PER_WORD
  424. #endif
  425. #ifndef LONG_TYPE_SIZE
  426. #define LONG_TYPE_SIZE BITS_PER_WORD
  427. #endif
  428. #ifndef LONG_LONG_TYPE_SIZE
  429. #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
  430. #endif
  431. #ifndef WCHAR_TYPE_SIZE
  432. #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
  433. #endif
  434. #ifndef FLOAT_TYPE_SIZE
  435. #define FLOAT_TYPE_SIZE BITS_PER_WORD
  436. #endif
  437. #ifndef DOUBLE_TYPE_SIZE
  438. #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
  439. #endif
  440. #ifndef LONG_DOUBLE_TYPE_SIZE
  441. #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
  442. #endif
  443. #ifndef DECIMAL32_TYPE_SIZE
  444. #define DECIMAL32_TYPE_SIZE 32
  445. #endif
  446. #ifndef DECIMAL64_TYPE_SIZE
  447. #define DECIMAL64_TYPE_SIZE 64
  448. #endif
  449. #ifndef DECIMAL128_TYPE_SIZE
  450. #define DECIMAL128_TYPE_SIZE 128
  451. #endif
  452. #ifndef SHORT_FRACT_TYPE_SIZE
  453. #define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT
  454. #endif
  455. #ifndef FRACT_TYPE_SIZE
  456. #define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2)
  457. #endif
  458. #ifndef LONG_FRACT_TYPE_SIZE
  459. #define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4)
  460. #endif
  461. #ifndef LONG_LONG_FRACT_TYPE_SIZE
  462. #define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8)
  463. #endif
  464. #ifndef SHORT_ACCUM_TYPE_SIZE
  465. #define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2)
  466. #endif
  467. #ifndef ACCUM_TYPE_SIZE
  468. #define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2)
  469. #endif
  470. #ifndef LONG_ACCUM_TYPE_SIZE
  471. #define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2)
  472. #endif
  473. #ifndef LONG_LONG_ACCUM_TYPE_SIZE
  474. #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2)
  475. #endif
  476. /* We let tm.h override the types used here, to handle trivial differences
  477. such as the choice of unsigned int or long unsigned int for size_t.
  478. When machines start needing nontrivial differences in the size type,
  479. it would be best to do something here to figure out automatically
  480. from other information what type to use. */
  481. #ifndef SIZE_TYPE
  482. #define SIZE_TYPE "long unsigned int"
  483. #endif
  484. #ifndef SIZETYPE
  485. #define SIZETYPE SIZE_TYPE
  486. #endif
  487. #ifndef PID_TYPE
  488. #define PID_TYPE "int"
  489. #endif
  490. /* If GCC knows the exact uint_least16_t and uint_least32_t types from
  491. <stdint.h>, use them for char16_t and char32_t. Otherwise, use
  492. these guesses; getting the wrong type of a given width will not
  493. affect C++ name mangling because in C++ these are distinct types
  494. not typedefs. */
  495. #ifdef UINT_LEAST16_TYPE
  496. #define CHAR16_TYPE UINT_LEAST16_TYPE
  497. #else
  498. #define CHAR16_TYPE "short unsigned int"
  499. #endif
  500. #ifdef UINT_LEAST32_TYPE
  501. #define CHAR32_TYPE UINT_LEAST32_TYPE
  502. #else
  503. #define CHAR32_TYPE "unsigned int"
  504. #endif
  505. #ifndef WCHAR_TYPE
  506. #define WCHAR_TYPE "int"
  507. #endif
  508. /* WCHAR_TYPE gets overridden by -fshort-wchar. */
  509. #define MODIFIED_WCHAR_TYPE \
  510. (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
  511. #ifndef PTRDIFF_TYPE
  512. #define PTRDIFF_TYPE "long int"
  513. #endif
  514. #ifndef WINT_TYPE
  515. #define WINT_TYPE "unsigned int"
  516. #endif
  517. #ifndef INTMAX_TYPE
  518. #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  519. ? "int" \
  520. : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  521. ? "long int" \
  522. : "long long int"))
  523. #endif
  524. #ifndef UINTMAX_TYPE
  525. #define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  526. ? "unsigned int" \
  527. : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  528. ? "long unsigned int" \
  529. : "long long unsigned int"))
  530. #endif
  531. /* There are no default definitions of these <stdint.h> types. */
  532. #ifndef SIG_ATOMIC_TYPE
  533. #define SIG_ATOMIC_TYPE ((const char *) NULL)
  534. #endif
  535. #ifndef INT8_TYPE
  536. #define INT8_TYPE ((const char *) NULL)
  537. #endif
  538. #ifndef INT16_TYPE
  539. #define INT16_TYPE ((const char *) NULL)
  540. #endif
  541. #ifndef INT32_TYPE
  542. #define INT32_TYPE ((const char *) NULL)
  543. #endif
  544. #ifndef INT64_TYPE
  545. #define INT64_TYPE ((const char *) NULL)
  546. #endif
  547. #ifndef UINT8_TYPE
  548. #define UINT8_TYPE ((const char *) NULL)
  549. #endif
  550. #ifndef UINT16_TYPE
  551. #define UINT16_TYPE ((const char *) NULL)
  552. #endif
  553. #ifndef UINT32_TYPE
  554. #define UINT32_TYPE ((const char *) NULL)
  555. #endif
  556. #ifndef UINT64_TYPE
  557. #define UINT64_TYPE ((const char *) NULL)
  558. #endif
  559. #ifndef INT_LEAST8_TYPE
  560. #define INT_LEAST8_TYPE ((const char *) NULL)
  561. #endif
  562. #ifndef INT_LEAST16_TYPE
  563. #define INT_LEAST16_TYPE ((const char *) NULL)
  564. #endif
  565. #ifndef INT_LEAST32_TYPE
  566. #define INT_LEAST32_TYPE ((const char *) NULL)
  567. #endif
  568. #ifndef INT_LEAST64_TYPE
  569. #define INT_LEAST64_TYPE ((const char *) NULL)
  570. #endif
  571. #ifndef UINT_LEAST8_TYPE
  572. #define UINT_LEAST8_TYPE ((const char *) NULL)
  573. #endif
  574. #ifndef UINT_LEAST16_TYPE
  575. #define UINT_LEAST16_TYPE ((const char *) NULL)
  576. #endif
  577. #ifndef UINT_LEAST32_TYPE
  578. #define UINT_LEAST32_TYPE ((const char *) NULL)
  579. #endif
  580. #ifndef UINT_LEAST64_TYPE
  581. #define UINT_LEAST64_TYPE ((const char *) NULL)
  582. #endif
  583. #ifndef INT_FAST8_TYPE
  584. #define INT_FAST8_TYPE ((const char *) NULL)
  585. #endif
  586. #ifndef INT_FAST16_TYPE
  587. #define INT_FAST16_TYPE ((const char *) NULL)
  588. #endif
  589. #ifndef INT_FAST32_TYPE
  590. #define INT_FAST32_TYPE ((const char *) NULL)
  591. #endif
  592. #ifndef INT_FAST64_TYPE
  593. #define INT_FAST64_TYPE ((const char *) NULL)
  594. #endif
  595. #ifndef UINT_FAST8_TYPE
  596. #define UINT_FAST8_TYPE ((const char *) NULL)
  597. #endif
  598. #ifndef UINT_FAST16_TYPE
  599. #define UINT_FAST16_TYPE ((const char *) NULL)
  600. #endif
  601. #ifndef UINT_FAST32_TYPE
  602. #define UINT_FAST32_TYPE ((const char *) NULL)
  603. #endif
  604. #ifndef UINT_FAST64_TYPE
  605. #define UINT_FAST64_TYPE ((const char *) NULL)
  606. #endif
  607. #ifndef INTPTR_TYPE
  608. #define INTPTR_TYPE ((const char *) NULL)
  609. #endif
  610. #ifndef UINTPTR_TYPE
  611. #define UINTPTR_TYPE ((const char *) NULL)
  612. #endif
  613. /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
  614. #ifndef POINTER_SIZE
  615. #define POINTER_SIZE BITS_PER_WORD
  616. #endif
  617. #ifndef POINTER_SIZE_UNITS
  618. #define POINTER_SIZE_UNITS ((POINTER_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT)
  619. #endif
  620. #ifndef PIC_OFFSET_TABLE_REGNUM
  621. #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
  622. #endif
  623. #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
  624. #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0
  625. #endif
  626. #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
  627. #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
  628. #endif
  629. #ifndef TARGET_DECLSPEC
  630. #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
  631. /* If the target supports the "dllimport" attribute, users are
  632. probably used to the "__declspec" syntax. */
  633. #define TARGET_DECLSPEC 1
  634. #else
  635. #define TARGET_DECLSPEC 0
  636. #endif
  637. #endif
  638. /* By default, the preprocessor should be invoked the same way in C++
  639. as in C. */
  640. #ifndef CPLUSPLUS_CPP_SPEC
  641. #ifdef CPP_SPEC
  642. #define CPLUSPLUS_CPP_SPEC CPP_SPEC
  643. #endif
  644. #endif
  645. #ifndef ACCUMULATE_OUTGOING_ARGS
  646. #define ACCUMULATE_OUTGOING_ARGS 0
  647. #endif
  648. /* By default, use the GNU runtime for Objective C. */
  649. #ifndef NEXT_OBJC_RUNTIME
  650. #define NEXT_OBJC_RUNTIME 0
  651. #endif
  652. /* Supply a default definition for PUSH_ARGS. */
  653. #ifndef PUSH_ARGS
  654. #ifdef PUSH_ROUNDING
  655. #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
  656. #else
  657. #define PUSH_ARGS 0
  658. #endif
  659. #endif
  660. /* Decide whether a function's arguments should be processed
  661. from first to last or from last to first.
  662. They should if the stack and args grow in opposite directions, but
  663. only if we have push insns. */
  664. #ifdef PUSH_ROUNDING
  665. #ifndef PUSH_ARGS_REVERSED
  666. #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
  667. #define PUSH_ARGS_REVERSED PUSH_ARGS
  668. #endif
  669. #endif
  670. #endif
  671. #ifndef PUSH_ARGS_REVERSED
  672. #define PUSH_ARGS_REVERSED 0
  673. #endif
  674. /* Default value for the alignment (in bits) a C conformant malloc has to
  675. provide. This default is intended to be safe and always correct. */
  676. #ifndef MALLOC_ABI_ALIGNMENT
  677. #define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
  678. #endif
  679. /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
  680. STACK_BOUNDARY is required. */
  681. #ifndef PREFERRED_STACK_BOUNDARY
  682. #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
  683. #endif
  684. /* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not
  685. defined. */
  686. #ifndef INCOMING_STACK_BOUNDARY
  687. #define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY
  688. #endif
  689. #ifndef TARGET_DEFAULT_PACK_STRUCT
  690. #define TARGET_DEFAULT_PACK_STRUCT 0
  691. #endif
  692. /* By default, the vtable entries are void pointers, the so the alignment
  693. is the same as pointer alignment. The value of this macro specifies
  694. the alignment of the vtable entry in bits. It should be defined only
  695. when special alignment is necessary. */
  696. #ifndef TARGET_VTABLE_ENTRY_ALIGN
  697. #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
  698. #endif
  699. /* There are a few non-descriptor entries in the vtable at offsets below
  700. zero. If these entries must be padded (say, to preserve the alignment
  701. specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
  702. words in each data entry. */
  703. #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
  704. #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
  705. #endif
  706. /* Decide whether it is safe to use a local alias for a virtual function
  707. when constructing thunks. */
  708. #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
  709. #ifdef ASM_OUTPUT_DEF
  710. #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
  711. #else
  712. #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
  713. #endif
  714. #endif
  715. /* Decide whether target supports aliases. */
  716. #ifndef TARGET_SUPPORTS_ALIASES
  717. #ifdef ASM_OUTPUT_DEF
  718. #define TARGET_SUPPORTS_ALIASES 1
  719. #else
  720. #define TARGET_SUPPORTS_ALIASES 0
  721. #endif
  722. #endif
  723. /* Select a format to encode pointers in exception handling data. We
  724. prefer those that result in fewer dynamic relocations. Assume no
  725. special support here and encode direct references. */
  726. #ifndef ASM_PREFERRED_EH_DATA_FORMAT
  727. #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
  728. #endif
  729. /* By default, the C++ compiler will use the lowest bit of the pointer
  730. to function to indicate a pointer-to-member-function points to a
  731. virtual member function. However, if FUNCTION_BOUNDARY indicates
  732. function addresses aren't always even, the lowest bit of the delta
  733. field will be used. */
  734. #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
  735. #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
  736. (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
  737. ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
  738. #endif
  739. #ifndef DEFAULT_GDB_EXTENSIONS
  740. #define DEFAULT_GDB_EXTENSIONS 1
  741. #endif
  742. /* If more than one debugging type is supported, you must define
  743. PREFERRED_DEBUGGING_TYPE to choose the default. */
  744. #if 1 < (defined (DBX_DEBUGGING_INFO) \
  745. + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
  746. + defined (VMS_DEBUGGING_INFO))
  747. #ifndef PREFERRED_DEBUGGING_TYPE
  748. #error You must define PREFERRED_DEBUGGING_TYPE
  749. #endif /* no PREFERRED_DEBUGGING_TYPE */
  750. /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
  751. here so other code needn't care. */
  752. #elif defined DBX_DEBUGGING_INFO
  753. #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
  754. #elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
  755. #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
  756. #elif defined VMS_DEBUGGING_INFO
  757. #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
  758. #elif defined XCOFF_DEBUGGING_INFO
  759. #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
  760. #else
  761. /* No debugging format is supported by this target. */
  762. #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
  763. #endif
  764. #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
  765. #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
  766. #endif
  767. /* True if the targets integer-comparison functions return { 0, 1, 2
  768. } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
  769. instead. The libgcc routines are biased. */
  770. #ifndef TARGET_LIB_INT_CMP_BIASED
  771. #define TARGET_LIB_INT_CMP_BIASED (true)
  772. #endif
  773. /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
  774. then the word-endianness is the same as for integers. */
  775. #ifndef FLOAT_WORDS_BIG_ENDIAN
  776. #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
  777. #endif
  778. #ifndef REG_WORDS_BIG_ENDIAN
  779. #define REG_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
  780. #endif
  781. #ifndef TARGET_DEC_EVAL_METHOD
  782. #define TARGET_DEC_EVAL_METHOD 2
  783. #endif
  784. #ifndef HAS_LONG_COND_BRANCH
  785. #define HAS_LONG_COND_BRANCH 0
  786. #endif
  787. #ifndef HAS_LONG_UNCOND_BRANCH
  788. #define HAS_LONG_UNCOND_BRANCH 0
  789. #endif
  790. /* Determine whether __cxa_atexit, rather than atexit, is used to
  791. register C++ destructors for local statics and global objects. */
  792. #ifndef DEFAULT_USE_CXA_ATEXIT
  793. #define DEFAULT_USE_CXA_ATEXIT 0
  794. #endif
  795. #if GCC_VERSION >= 3000 && defined IN_GCC
  796. /* These old constraint macros shouldn't appear anywhere in a
  797. configuration using MD constraint definitions. */
  798. #endif
  799. /* Determin whether the target runtime library is Bionic */
  800. #ifndef TARGET_HAS_BIONIC
  801. #define TARGET_HAS_BIONIC 0
  802. #endif
  803. /* Indicate that CLZ and CTZ are undefined at zero. */
  804. #ifndef CLZ_DEFINED_VALUE_AT_ZERO
  805. #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
  806. #endif
  807. #ifndef CTZ_DEFINED_VALUE_AT_ZERO
  808. #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
  809. #endif
  810. /* Provide a default value for STORE_FLAG_VALUE. */
  811. #ifndef STORE_FLAG_VALUE
  812. #define STORE_FLAG_VALUE 1
  813. #endif
  814. /* This macro is used to determine what the largest unit size that
  815. move_by_pieces can use is. */
  816. /* MOVE_MAX_PIECES is the number of bytes at a time which we can
  817. move efficiently, as opposed to MOVE_MAX which is the maximum
  818. number of bytes we can move with a single instruction. */
  819. #ifndef MOVE_MAX_PIECES
  820. #define MOVE_MAX_PIECES MOVE_MAX
  821. #endif
  822. /* STORE_MAX_PIECES is the number of bytes at a time that we can
  823. store efficiently. Due to internal GCC limitations, this is
  824. MOVE_MAX_PIECES limited by the number of bytes GCC can represent
  825. for an immediate constant. */
  826. #ifndef STORE_MAX_PIECES
  827. #define STORE_MAX_PIECES MIN (MOVE_MAX_PIECES, 2 * sizeof (HOST_WIDE_INT))
  828. #endif
  829. /* Likewise for block comparisons. */
  830. #ifndef COMPARE_MAX_PIECES
  831. #define COMPARE_MAX_PIECES MOVE_MAX_PIECES
  832. #endif
  833. #ifndef MAX_MOVE_MAX
  834. #define MAX_MOVE_MAX MOVE_MAX
  835. #endif
  836. #ifndef MIN_UNITS_PER_WORD
  837. #define MIN_UNITS_PER_WORD UNITS_PER_WORD
  838. #endif
  839. #ifndef MAX_BITS_PER_WORD
  840. #define MAX_BITS_PER_WORD BITS_PER_WORD
  841. #endif
  842. #ifndef STACK_POINTER_OFFSET
  843. #define STACK_POINTER_OFFSET 0
  844. #endif
  845. #ifndef LOCAL_REGNO
  846. #define LOCAL_REGNO(REGNO) 0
  847. #endif
  848. #ifndef HONOR_REG_ALLOC_ORDER
  849. #define HONOR_REG_ALLOC_ORDER 0
  850. #endif
  851. /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
  852. the stack pointer does not matter. The value is tested only in
  853. functions that have frame pointers. */
  854. #ifndef EXIT_IGNORE_STACK
  855. #define EXIT_IGNORE_STACK 0
  856. #endif
  857. /* Assume that case vectors are not pc-relative. */
  858. #ifndef CASE_VECTOR_PC_RELATIVE
  859. #define CASE_VECTOR_PC_RELATIVE 0
  860. #endif
  861. /* Force minimum alignment to be able to use the least significant bits
  862. for distinguishing descriptor addresses from code addresses. */
  863. #define FUNCTION_ALIGNMENT(ALIGN) \
  864. (lang_hooks.custom_function_descriptors \
  865. && targetm.calls.custom_function_descriptors > 0 \
  866. ? MAX ((ALIGN), \
  867. 2 * targetm.calls.custom_function_descriptors * BITS_PER_UNIT)\
  868. : (ALIGN))
  869. /* Assume that trampolines need function alignment. */
  870. #ifndef TRAMPOLINE_ALIGNMENT
  871. #define TRAMPOLINE_ALIGNMENT FUNCTION_ALIGNMENT (FUNCTION_BOUNDARY)
  872. #endif
  873. /* Register mappings for target machines without register windows. */
  874. #ifndef INCOMING_REGNO
  875. #define INCOMING_REGNO(N) (N)
  876. #endif
  877. #ifndef OUTGOING_REGNO
  878. #define OUTGOING_REGNO(N) (N)
  879. #endif
  880. #ifndef SHIFT_COUNT_TRUNCATED
  881. #define SHIFT_COUNT_TRUNCATED 0
  882. #endif
  883. #ifndef LEGITIMATE_PIC_OPERAND_P
  884. #define LEGITIMATE_PIC_OPERAND_P(X) 1
  885. #endif
  886. #ifndef TARGET_MEM_CONSTRAINT
  887. #define TARGET_MEM_CONSTRAINT 'm'
  888. #endif
  889. #ifndef REVERSIBLE_CC_MODE
  890. #define REVERSIBLE_CC_MODE(MODE) 0
  891. #endif
  892. /* Biggest alignment supported by the object file format of this machine. */
  893. #ifndef MAX_OFILE_ALIGNMENT
  894. #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
  895. #endif
  896. #ifndef FRAME_GROWS_DOWNWARD
  897. #define FRAME_GROWS_DOWNWARD 0
  898. #endif
  899. #ifndef RETURN_ADDR_IN_PREVIOUS_FRAME
  900. #define RETURN_ADDR_IN_PREVIOUS_FRAME 0
  901. #endif
  902. /* On most machines, the CFA coincides with the first incoming parm. */
  903. #ifndef ARG_POINTER_CFA_OFFSET
  904. #define ARG_POINTER_CFA_OFFSET(FNDECL) \
  905. (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
  906. #endif
  907. /* On most machines, we use the CFA as DW_AT_frame_base. */
  908. #ifndef CFA_FRAME_BASE_OFFSET
  909. #define CFA_FRAME_BASE_OFFSET(FNDECL) 0
  910. #endif
  911. /* The offset from the incoming value of %sp to the top of the stack frame
  912. for the current function. */
  913. #ifndef INCOMING_FRAME_SP_OFFSET
  914. #define INCOMING_FRAME_SP_OFFSET 0
  915. #endif
  916. #ifndef HARD_REGNO_NREGS_HAS_PADDING
  917. #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
  918. #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
  919. #endif
  920. #ifndef OUTGOING_REG_PARM_STACK_SPACE
  921. #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
  922. #endif
  923. /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
  924. the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
  925. effort stack alignment supported by the backend. If the backend
  926. supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
  927. MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack
  928. boundary will limit the maximum guaranteed stack alignment. */
  929. #ifdef MAX_STACK_ALIGNMENT
  930. #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
  931. #else
  932. #define MAX_STACK_ALIGNMENT STACK_BOUNDARY
  933. #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
  934. #endif
  935. #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
  936. #ifndef LOCAL_ALIGNMENT
  937. #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
  938. #endif
  939. #ifndef STACK_SLOT_ALIGNMENT
  940. #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
  941. ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
  942. #endif
  943. #ifndef LOCAL_DECL_ALIGNMENT
  944. #define LOCAL_DECL_ALIGNMENT(DECL) \
  945. LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
  946. #endif
  947. #ifndef MINIMUM_ALIGNMENT
  948. #define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN)
  949. #endif
  950. /* Alignment value for attribute ((aligned)). */
  951. #ifndef ATTRIBUTE_ALIGNED_VALUE
  952. #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
  953. #endif
  954. /* For most ports anything that evaluates to a constant symbolic
  955. or integer value is acceptable as a constant address. */
  956. #ifndef CONSTANT_ADDRESS_P
  957. #define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
  958. #endif
  959. #ifndef MAX_FIXED_MODE_SIZE
  960. #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
  961. #endif
  962. /* Nonzero if structures and unions should be returned in memory.
  963. This should only be defined if compatibility with another compiler or
  964. with an ABI is needed, because it results in slower code. */
  965. #ifndef DEFAULT_PCC_STRUCT_RETURN
  966. #define DEFAULT_PCC_STRUCT_RETURN 1
  967. #endif
  968. #ifndef PCC_BITFIELD_TYPE_MATTERS
  969. #define PCC_BITFIELD_TYPE_MATTERS false
  970. #endif
  971. #ifndef INSN_SETS_ARE_DELAYED
  972. #define INSN_SETS_ARE_DELAYED(INSN) false
  973. #endif
  974. #ifndef INSN_REFERENCES_ARE_DELAYED
  975. #define INSN_REFERENCES_ARE_DELAYED(INSN) false
  976. #endif
  977. #ifndef NO_FUNCTION_CSE
  978. #define NO_FUNCTION_CSE false
  979. #endif
  980. #ifndef HARD_REGNO_RENAME_OK
  981. #define HARD_REGNO_RENAME_OK(FROM, TO) true
  982. #endif
  983. #ifndef EPILOGUE_USES
  984. #define EPILOGUE_USES(REG) false
  985. #endif
  986. #ifndef ARGS_GROW_DOWNWARD
  987. #define ARGS_GROW_DOWNWARD 0
  988. #endif
  989. #ifndef STACK_GROWS_DOWNWARD
  990. #define STACK_GROWS_DOWNWARD 0
  991. #endif
  992. #ifndef STACK_PUSH_CODE
  993. #if STACK_GROWS_DOWNWARD
  994. #define STACK_PUSH_CODE PRE_DEC
  995. #else
  996. #define STACK_PUSH_CODE PRE_INC
  997. #endif
  998. #endif
  999. /* Default value for flag_pie when flag_pie is initialized to -1:
  1000. --enable-default-pie: Default flag_pie to -fPIE.
  1001. --disable-default-pie: Default flag_pie to 0.
  1002. */
  1003. #ifdef ENABLE_DEFAULT_PIE
  1004. # ifndef DEFAULT_FLAG_PIE
  1005. # define DEFAULT_FLAG_PIE 2
  1006. # endif
  1007. #else
  1008. # define DEFAULT_FLAG_PIE 0
  1009. #endif
  1010. #ifndef SWITCHABLE_TARGET
  1011. #define SWITCHABLE_TARGET 0
  1012. #endif
  1013. /* If the target supports integers that are wider than two
  1014. HOST_WIDE_INTs on the host compiler, then the target should define
  1015. TARGET_SUPPORTS_WIDE_INT and make the appropriate fixups.
  1016. Otherwise the compiler really is not robust. */
  1017. #ifndef TARGET_SUPPORTS_WIDE_INT
  1018. #define TARGET_SUPPORTS_WIDE_INT 0
  1019. #endif
  1020. #ifndef SHORT_IMMEDIATES_SIGN_EXTEND
  1021. #define SHORT_IMMEDIATES_SIGN_EXTEND 0
  1022. #endif
  1023. #ifndef WORD_REGISTER_OPERATIONS
  1024. #define WORD_REGISTER_OPERATIONS 0
  1025. #endif
  1026. #ifndef LOAD_EXTEND_OP
  1027. #define LOAD_EXTEND_OP(M) UNKNOWN
  1028. #endif
  1029. #ifndef INITIAL_FRAME_ADDRESS_RTX
  1030. #define INITIAL_FRAME_ADDRESS_RTX NULL
  1031. #endif
  1032. #ifndef SETUP_FRAME_ADDRESSES
  1033. #define SETUP_FRAME_ADDRESSES() do { } while (0)
  1034. #endif
  1035. #ifndef DYNAMIC_CHAIN_ADDRESS
  1036. #define DYNAMIC_CHAIN_ADDRESS(x) (x)
  1037. #endif
  1038. #ifndef FRAME_ADDR_RTX
  1039. #define FRAME_ADDR_RTX(x) (x)
  1040. #endif
  1041. #ifndef REVERSE_CONDITION
  1042. #define REVERSE_CONDITION(code, mode) reverse_condition (code)
  1043. #endif
  1044. #ifndef TARGET_PECOFF
  1045. #define TARGET_PECOFF 0
  1046. #endif
  1047. #ifndef TARGET_COFF
  1048. #define TARGET_COFF 0
  1049. #endif
  1050. #ifndef EH_RETURN_HANDLER_RTX
  1051. #define EH_RETURN_HANDLER_RTX NULL
  1052. #endif
  1053. #ifdef GCC_INSN_FLAGS_H
  1054. /* Dependent default target macro definitions
  1055. This section of defaults.h defines target macros that depend on generated
  1056. headers. This is a bit awkward: We want to put all default definitions
  1057. for target macros in defaults.h, but some of the defaults depend on the
  1058. HAVE_* flags defines of insn-flags.h. But insn-flags.h is not always
  1059. included by files that do include defaults.h.
  1060. Fortunately, the default macro definitions that depend on the HAVE_*
  1061. macros are also the ones that will only be used inside GCC itself, i.e.
  1062. not in the gen* programs or in target objects like libgcc.
  1063. Obviously, it would be best to keep this section of defaults.h as small
  1064. as possible, by converting the macros defined below to target hooks or
  1065. functions.
  1066. */
  1067. /* The default branch cost is 1. */
  1068. #ifndef BRANCH_COST
  1069. #define BRANCH_COST(speed_p, predictable_p) 1
  1070. #endif
  1071. /* If a memory-to-memory move would take MOVE_RATIO or more simple
  1072. move-instruction sequences, we will do a movmem or libcall instead. */
  1073. #ifndef MOVE_RATIO
  1074. #if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
  1075. #define MOVE_RATIO(speed) 2
  1076. #else
  1077. /* If we are optimizing for space (-Os), cut down the default move ratio. */
  1078. #define MOVE_RATIO(speed) ((speed) ? 15 : 3)
  1079. #endif
  1080. #endif
  1081. /* If a clear memory operation would take CLEAR_RATIO or more simple
  1082. move-instruction sequences, we will do a setmem or libcall instead. */
  1083. #ifndef CLEAR_RATIO
  1084. #if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti)
  1085. #define CLEAR_RATIO(speed) 2
  1086. #else
  1087. /* If we are optimizing for space, cut down the default clear ratio. */
  1088. #define CLEAR_RATIO(speed) ((speed) ? 15 :3)
  1089. #endif
  1090. #endif
  1091. /* If a memory set (to value other than zero) operation would take
  1092. SET_RATIO or more simple move-instruction sequences, we will do a movmem
  1093. or libcall instead. */
  1094. #ifndef SET_RATIO
  1095. #define SET_RATIO(speed) MOVE_RATIO (speed)
  1096. #endif
  1097. /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
  1098. Normally move_insn, so Pmode stack pointer. */
  1099. #ifndef STACK_SAVEAREA_MODE
  1100. #define STACK_SAVEAREA_MODE(LEVEL) Pmode
  1101. #endif
  1102. /* Supply a default definition of STACK_SIZE_MODE for
  1103. allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */
  1104. #ifndef STACK_SIZE_MODE
  1105. #define STACK_SIZE_MODE word_mode
  1106. #endif
  1107. /* Default value for flag_stack_protect when flag_stack_protect is initialized to -1:
  1108. --enable-default-ssp: Default flag_stack_protect to -fstack-protector-strong.
  1109. --disable-default-ssp: Default flag_stack_protect to 0.
  1110. */
  1111. #ifdef ENABLE_DEFAULT_SSP
  1112. # ifndef DEFAULT_FLAG_SSP
  1113. # define DEFAULT_FLAG_SSP 3
  1114. # endif
  1115. #else
  1116. # define DEFAULT_FLAG_SSP 0
  1117. #endif
  1118. /* Provide default values for the macros controlling stack checking. */
  1119. /* The default is neither full builtin stack checking... */
  1120. #ifndef STACK_CHECK_BUILTIN
  1121. #define STACK_CHECK_BUILTIN 0
  1122. #endif
  1123. /* ...nor static builtin stack checking. */
  1124. #ifndef STACK_CHECK_STATIC_BUILTIN
  1125. #define STACK_CHECK_STATIC_BUILTIN 0
  1126. #endif
  1127. /* The default interval is one page (4096 bytes). */
  1128. #ifndef STACK_CHECK_PROBE_INTERVAL_EXP
  1129. #define STACK_CHECK_PROBE_INTERVAL_EXP 12
  1130. #endif
  1131. /* The default is not to move the stack pointer. */
  1132. #ifndef STACK_CHECK_MOVING_SP
  1133. #define STACK_CHECK_MOVING_SP 0
  1134. #endif
  1135. /* This is a kludge to try to capture the discrepancy between the old
  1136. mechanism (generic stack checking) and the new mechanism (static
  1137. builtin stack checking). STACK_CHECK_PROTECT needs to be bumped
  1138. for the latter because part of the protection area is effectively
  1139. included in STACK_CHECK_MAX_FRAME_SIZE for the former. */
  1140. #ifdef STACK_CHECK_PROTECT
  1141. #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
  1142. #else
  1143. #define STACK_OLD_CHECK_PROTECT \
  1144. (!global_options.x_flag_exceptions \
  1145. ? 75 * UNITS_PER_WORD \
  1146. : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
  1147. ? 4 * 1024 \
  1148. : 8 * 1024)
  1149. #endif
  1150. /* Minimum amount of stack required to recover from an anticipated stack
  1151. overflow detection. The default value conveys an estimate of the amount
  1152. of stack required to propagate an exception. */
  1153. #ifndef STACK_CHECK_PROTECT
  1154. #define STACK_CHECK_PROTECT \
  1155. (!global_options.x_flag_exceptions \
  1156. ? 4 * 1024 \
  1157. : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
  1158. ? 8 * 1024 \
  1159. : 12 * 1024)
  1160. #endif
  1161. /* Make the maximum frame size be the largest we can and still only need
  1162. one probe per function. */
  1163. #ifndef STACK_CHECK_MAX_FRAME_SIZE
  1164. #define STACK_CHECK_MAX_FRAME_SIZE \
  1165. ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
  1166. #endif
  1167. /* This is arbitrary, but should be large enough everywhere. */
  1168. #ifndef STACK_CHECK_FIXED_FRAME_SIZE
  1169. #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD)
  1170. #endif
  1171. /* Provide a reasonable default for the maximum size of an object to
  1172. allocate in the fixed frame. We may need to be able to make this
  1173. controllable by the user at some point. */
  1174. #ifndef STACK_CHECK_MAX_VAR_SIZE
  1175. #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
  1176. #endif
  1177. /* By default, the C++ compiler will use function addresses in the
  1178. vtable entries. Setting this nonzero tells the compiler to use
  1179. function descriptors instead. The value of this macro says how
  1180. many words wide the descriptor is (normally 2). It is assumed
  1181. that the address of a function descriptor may be treated as a
  1182. pointer to a function. */
  1183. #ifndef TARGET_VTABLE_USES_DESCRIPTORS
  1184. #define TARGET_VTABLE_USES_DESCRIPTORS 0
  1185. #endif
  1186. #endif /* GCC_INSN_FLAGS_H */
  1187. #ifndef DWARF_GNAT_ENCODINGS_DEFAULT
  1188. #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
  1189. #endif
  1190. #endif /* ! GCC_DEFAULTS_H */