defaults.h 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462
  1. /* Definitions of various defaults for tm.h macros.
  2. Copyright (C) 1992-2019 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. #ifndef CHAR8_TYPE
  496. #define CHAR8_TYPE "unsigned char"
  497. #endif
  498. #ifdef UINT_LEAST16_TYPE
  499. #define CHAR16_TYPE UINT_LEAST16_TYPE
  500. #else
  501. #define CHAR16_TYPE "short unsigned int"
  502. #endif
  503. #ifdef UINT_LEAST32_TYPE
  504. #define CHAR32_TYPE UINT_LEAST32_TYPE
  505. #else
  506. #define CHAR32_TYPE "unsigned int"
  507. #endif
  508. #ifndef WCHAR_TYPE
  509. #define WCHAR_TYPE "int"
  510. #endif
  511. /* WCHAR_TYPE gets overridden by -fshort-wchar. */
  512. #define MODIFIED_WCHAR_TYPE \
  513. (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
  514. #ifndef PTRDIFF_TYPE
  515. #define PTRDIFF_TYPE "long int"
  516. #endif
  517. #ifndef WINT_TYPE
  518. #define WINT_TYPE "unsigned int"
  519. #endif
  520. #ifndef INTMAX_TYPE
  521. #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  522. ? "int" \
  523. : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  524. ? "long int" \
  525. : "long long int"))
  526. #endif
  527. #ifndef UINTMAX_TYPE
  528. #define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  529. ? "unsigned int" \
  530. : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  531. ? "long unsigned int" \
  532. : "long long unsigned int"))
  533. #endif
  534. /* There are no default definitions of these <stdint.h> types. */
  535. #ifndef SIG_ATOMIC_TYPE
  536. #define SIG_ATOMIC_TYPE ((const char *) NULL)
  537. #endif
  538. #ifndef INT8_TYPE
  539. #define INT8_TYPE ((const char *) NULL)
  540. #endif
  541. #ifndef INT16_TYPE
  542. #define INT16_TYPE ((const char *) NULL)
  543. #endif
  544. #ifndef INT32_TYPE
  545. #define INT32_TYPE ((const char *) NULL)
  546. #endif
  547. #ifndef INT64_TYPE
  548. #define INT64_TYPE ((const char *) NULL)
  549. #endif
  550. #ifndef UINT8_TYPE
  551. #define UINT8_TYPE ((const char *) NULL)
  552. #endif
  553. #ifndef UINT16_TYPE
  554. #define UINT16_TYPE ((const char *) NULL)
  555. #endif
  556. #ifndef UINT32_TYPE
  557. #define UINT32_TYPE ((const char *) NULL)
  558. #endif
  559. #ifndef UINT64_TYPE
  560. #define UINT64_TYPE ((const char *) NULL)
  561. #endif
  562. #ifndef INT_LEAST8_TYPE
  563. #define INT_LEAST8_TYPE ((const char *) NULL)
  564. #endif
  565. #ifndef INT_LEAST16_TYPE
  566. #define INT_LEAST16_TYPE ((const char *) NULL)
  567. #endif
  568. #ifndef INT_LEAST32_TYPE
  569. #define INT_LEAST32_TYPE ((const char *) NULL)
  570. #endif
  571. #ifndef INT_LEAST64_TYPE
  572. #define INT_LEAST64_TYPE ((const char *) NULL)
  573. #endif
  574. #ifndef UINT_LEAST8_TYPE
  575. #define UINT_LEAST8_TYPE ((const char *) NULL)
  576. #endif
  577. #ifndef UINT_LEAST16_TYPE
  578. #define UINT_LEAST16_TYPE ((const char *) NULL)
  579. #endif
  580. #ifndef UINT_LEAST32_TYPE
  581. #define UINT_LEAST32_TYPE ((const char *) NULL)
  582. #endif
  583. #ifndef UINT_LEAST64_TYPE
  584. #define UINT_LEAST64_TYPE ((const char *) NULL)
  585. #endif
  586. #ifndef INT_FAST8_TYPE
  587. #define INT_FAST8_TYPE ((const char *) NULL)
  588. #endif
  589. #ifndef INT_FAST16_TYPE
  590. #define INT_FAST16_TYPE ((const char *) NULL)
  591. #endif
  592. #ifndef INT_FAST32_TYPE
  593. #define INT_FAST32_TYPE ((const char *) NULL)
  594. #endif
  595. #ifndef INT_FAST64_TYPE
  596. #define INT_FAST64_TYPE ((const char *) NULL)
  597. #endif
  598. #ifndef UINT_FAST8_TYPE
  599. #define UINT_FAST8_TYPE ((const char *) NULL)
  600. #endif
  601. #ifndef UINT_FAST16_TYPE
  602. #define UINT_FAST16_TYPE ((const char *) NULL)
  603. #endif
  604. #ifndef UINT_FAST32_TYPE
  605. #define UINT_FAST32_TYPE ((const char *) NULL)
  606. #endif
  607. #ifndef UINT_FAST64_TYPE
  608. #define UINT_FAST64_TYPE ((const char *) NULL)
  609. #endif
  610. #ifndef INTPTR_TYPE
  611. #define INTPTR_TYPE ((const char *) NULL)
  612. #endif
  613. #ifndef UINTPTR_TYPE
  614. #define UINTPTR_TYPE ((const char *) NULL)
  615. #endif
  616. /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
  617. #ifndef POINTER_SIZE
  618. #define POINTER_SIZE BITS_PER_WORD
  619. #endif
  620. #ifndef POINTER_SIZE_UNITS
  621. #define POINTER_SIZE_UNITS ((POINTER_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT)
  622. #endif
  623. #ifndef PIC_OFFSET_TABLE_REGNUM
  624. #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
  625. #endif
  626. #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
  627. #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0
  628. #endif
  629. #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
  630. #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
  631. #endif
  632. #ifndef TARGET_DECLSPEC
  633. #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
  634. /* If the target supports the "dllimport" attribute, users are
  635. probably used to the "__declspec" syntax. */
  636. #define TARGET_DECLSPEC 1
  637. #else
  638. #define TARGET_DECLSPEC 0
  639. #endif
  640. #endif
  641. /* By default, the preprocessor should be invoked the same way in C++
  642. as in C. */
  643. #ifndef CPLUSPLUS_CPP_SPEC
  644. #ifdef CPP_SPEC
  645. #define CPLUSPLUS_CPP_SPEC CPP_SPEC
  646. #endif
  647. #endif
  648. #ifndef ACCUMULATE_OUTGOING_ARGS
  649. #define ACCUMULATE_OUTGOING_ARGS 0
  650. #endif
  651. /* By default, use the GNU runtime for Objective C. */
  652. #ifndef NEXT_OBJC_RUNTIME
  653. #define NEXT_OBJC_RUNTIME 0
  654. #endif
  655. /* Supply a default definition for PUSH_ARGS. */
  656. #ifndef PUSH_ARGS
  657. #ifdef PUSH_ROUNDING
  658. #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
  659. #else
  660. #define PUSH_ARGS 0
  661. #endif
  662. #endif
  663. /* Decide whether a function's arguments should be processed
  664. from first to last or from last to first.
  665. They should if the stack and args grow in opposite directions, but
  666. only if we have push insns. */
  667. #ifdef PUSH_ROUNDING
  668. #ifndef PUSH_ARGS_REVERSED
  669. #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
  670. #define PUSH_ARGS_REVERSED PUSH_ARGS
  671. #endif
  672. #endif
  673. #endif
  674. #ifndef PUSH_ARGS_REVERSED
  675. #define PUSH_ARGS_REVERSED 0
  676. #endif
  677. /* Default value for the alignment (in bits) a C conformant malloc has to
  678. provide. This default is intended to be safe and always correct. */
  679. #ifndef MALLOC_ABI_ALIGNMENT
  680. #define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
  681. #endif
  682. /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
  683. STACK_BOUNDARY is required. */
  684. #ifndef PREFERRED_STACK_BOUNDARY
  685. #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
  686. #endif
  687. /* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not
  688. defined. */
  689. #ifndef INCOMING_STACK_BOUNDARY
  690. #define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY
  691. #endif
  692. #ifndef TARGET_DEFAULT_PACK_STRUCT
  693. #define TARGET_DEFAULT_PACK_STRUCT 0
  694. #endif
  695. /* By default, the vtable entries are void pointers, the so the alignment
  696. is the same as pointer alignment. The value of this macro specifies
  697. the alignment of the vtable entry in bits. It should be defined only
  698. when special alignment is necessary. */
  699. #ifndef TARGET_VTABLE_ENTRY_ALIGN
  700. #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
  701. #endif
  702. /* There are a few non-descriptor entries in the vtable at offsets below
  703. zero. If these entries must be padded (say, to preserve the alignment
  704. specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
  705. words in each data entry. */
  706. #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
  707. #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
  708. #endif
  709. /* Decide whether it is safe to use a local alias for a virtual function
  710. when constructing thunks. */
  711. #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
  712. #ifdef ASM_OUTPUT_DEF
  713. #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
  714. #else
  715. #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
  716. #endif
  717. #endif
  718. /* Decide whether target supports aliases. */
  719. #ifndef TARGET_SUPPORTS_ALIASES
  720. #ifdef ASM_OUTPUT_DEF
  721. #define TARGET_SUPPORTS_ALIASES 1
  722. #else
  723. #define TARGET_SUPPORTS_ALIASES 0
  724. #endif
  725. #endif
  726. /* Select a format to encode pointers in exception handling data. We
  727. prefer those that result in fewer dynamic relocations. Assume no
  728. special support here and encode direct references. */
  729. #ifndef ASM_PREFERRED_EH_DATA_FORMAT
  730. #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
  731. #endif
  732. /* By default, the C++ compiler will use the lowest bit of the pointer
  733. to function to indicate a pointer-to-member-function points to a
  734. virtual member function. However, if FUNCTION_BOUNDARY indicates
  735. function addresses aren't always even, the lowest bit of the delta
  736. field will be used. */
  737. #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
  738. #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
  739. (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
  740. ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
  741. #endif
  742. #ifndef DEFAULT_GDB_EXTENSIONS
  743. #define DEFAULT_GDB_EXTENSIONS 1
  744. #endif
  745. /* If more than one debugging type is supported, you must define
  746. PREFERRED_DEBUGGING_TYPE to choose the default. */
  747. #if 1 < (defined (DBX_DEBUGGING_INFO) \
  748. + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
  749. + defined (VMS_DEBUGGING_INFO))
  750. #ifndef PREFERRED_DEBUGGING_TYPE
  751. #error You must define PREFERRED_DEBUGGING_TYPE
  752. #endif /* no PREFERRED_DEBUGGING_TYPE */
  753. /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
  754. here so other code needn't care. */
  755. #elif defined DBX_DEBUGGING_INFO
  756. #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
  757. #elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
  758. #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
  759. #elif defined VMS_DEBUGGING_INFO
  760. #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
  761. #elif defined XCOFF_DEBUGGING_INFO
  762. #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
  763. #else
  764. /* No debugging format is supported by this target. */
  765. #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
  766. #endif
  767. #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
  768. #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
  769. #endif
  770. /* True if the targets integer-comparison functions return { 0, 1, 2
  771. } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
  772. instead. The libgcc routines are biased. */
  773. #ifndef TARGET_LIB_INT_CMP_BIASED
  774. #define TARGET_LIB_INT_CMP_BIASED (true)
  775. #endif
  776. /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
  777. then the word-endianness is the same as for integers. */
  778. #ifndef FLOAT_WORDS_BIG_ENDIAN
  779. #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
  780. #endif
  781. #ifndef REG_WORDS_BIG_ENDIAN
  782. #define REG_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
  783. #endif
  784. #ifndef TARGET_DEC_EVAL_METHOD
  785. #define TARGET_DEC_EVAL_METHOD 2
  786. #endif
  787. #ifndef HAS_LONG_COND_BRANCH
  788. #define HAS_LONG_COND_BRANCH 0
  789. #endif
  790. #ifndef HAS_LONG_UNCOND_BRANCH
  791. #define HAS_LONG_UNCOND_BRANCH 0
  792. #endif
  793. /* Determine whether __cxa_atexit, rather than atexit, is used to
  794. register C++ destructors for local statics and global objects. */
  795. #ifndef DEFAULT_USE_CXA_ATEXIT
  796. #define DEFAULT_USE_CXA_ATEXIT 0
  797. #endif
  798. #if GCC_VERSION >= 3000 && defined IN_GCC
  799. /* These old constraint macros shouldn't appear anywhere in a
  800. configuration using MD constraint definitions. */
  801. #endif
  802. /* Determin whether the target runtime library is Bionic */
  803. #ifndef TARGET_HAS_BIONIC
  804. #define TARGET_HAS_BIONIC 0
  805. #endif
  806. /* Indicate that CLZ and CTZ are undefined at zero. */
  807. #ifndef CLZ_DEFINED_VALUE_AT_ZERO
  808. #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
  809. #endif
  810. #ifndef CTZ_DEFINED_VALUE_AT_ZERO
  811. #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
  812. #endif
  813. /* Provide a default value for STORE_FLAG_VALUE. */
  814. #ifndef STORE_FLAG_VALUE
  815. #define STORE_FLAG_VALUE 1
  816. #endif
  817. /* This macro is used to determine what the largest unit size that
  818. move_by_pieces can use is. */
  819. /* MOVE_MAX_PIECES is the number of bytes at a time which we can
  820. move efficiently, as opposed to MOVE_MAX which is the maximum
  821. number of bytes we can move with a single instruction. */
  822. #ifndef MOVE_MAX_PIECES
  823. #define MOVE_MAX_PIECES MOVE_MAX
  824. #endif
  825. /* STORE_MAX_PIECES is the number of bytes at a time that we can
  826. store efficiently. Due to internal GCC limitations, this is
  827. MOVE_MAX_PIECES limited by the number of bytes GCC can represent
  828. for an immediate constant. */
  829. #ifndef STORE_MAX_PIECES
  830. #define STORE_MAX_PIECES MIN (MOVE_MAX_PIECES, 2 * sizeof (HOST_WIDE_INT))
  831. #endif
  832. /* Likewise for block comparisons. */
  833. #ifndef COMPARE_MAX_PIECES
  834. #define COMPARE_MAX_PIECES MOVE_MAX_PIECES
  835. #endif
  836. #ifndef MAX_MOVE_MAX
  837. #define MAX_MOVE_MAX MOVE_MAX
  838. #endif
  839. #ifndef MIN_UNITS_PER_WORD
  840. #define MIN_UNITS_PER_WORD UNITS_PER_WORD
  841. #endif
  842. #ifndef MAX_BITS_PER_WORD
  843. #define MAX_BITS_PER_WORD BITS_PER_WORD
  844. #endif
  845. #ifndef STACK_POINTER_OFFSET
  846. #define STACK_POINTER_OFFSET 0
  847. #endif
  848. #ifndef LOCAL_REGNO
  849. #define LOCAL_REGNO(REGNO) 0
  850. #endif
  851. #ifndef HONOR_REG_ALLOC_ORDER
  852. #define HONOR_REG_ALLOC_ORDER 0
  853. #endif
  854. /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
  855. the stack pointer does not matter. The value is tested only in
  856. functions that have frame pointers. */
  857. #ifndef EXIT_IGNORE_STACK
  858. #define EXIT_IGNORE_STACK 0
  859. #endif
  860. /* Assume that case vectors are not pc-relative. */
  861. #ifndef CASE_VECTOR_PC_RELATIVE
  862. #define CASE_VECTOR_PC_RELATIVE 0
  863. #endif
  864. /* Force minimum alignment to be able to use the least significant bits
  865. for distinguishing descriptor addresses from code addresses. */
  866. #define FUNCTION_ALIGNMENT(ALIGN) \
  867. (lang_hooks.custom_function_descriptors \
  868. && targetm.calls.custom_function_descriptors > 0 \
  869. ? MAX ((ALIGN), \
  870. 2 * targetm.calls.custom_function_descriptors * BITS_PER_UNIT)\
  871. : (ALIGN))
  872. /* Assume that trampolines need function alignment. */
  873. #ifndef TRAMPOLINE_ALIGNMENT
  874. #define TRAMPOLINE_ALIGNMENT FUNCTION_ALIGNMENT (FUNCTION_BOUNDARY)
  875. #endif
  876. /* Register mappings for target machines without register windows. */
  877. #ifndef INCOMING_REGNO
  878. #define INCOMING_REGNO(N) (N)
  879. #endif
  880. #ifndef OUTGOING_REGNO
  881. #define OUTGOING_REGNO(N) (N)
  882. #endif
  883. #ifndef SHIFT_COUNT_TRUNCATED
  884. #define SHIFT_COUNT_TRUNCATED 0
  885. #endif
  886. #ifndef LEGITIMATE_PIC_OPERAND_P
  887. #define LEGITIMATE_PIC_OPERAND_P(X) 1
  888. #endif
  889. #ifndef TARGET_MEM_CONSTRAINT
  890. #define TARGET_MEM_CONSTRAINT 'm'
  891. #endif
  892. #ifndef REVERSIBLE_CC_MODE
  893. #define REVERSIBLE_CC_MODE(MODE) 0
  894. #endif
  895. /* Biggest alignment supported by the object file format of this machine. */
  896. #ifndef MAX_OFILE_ALIGNMENT
  897. #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
  898. #endif
  899. #ifndef FRAME_GROWS_DOWNWARD
  900. #define FRAME_GROWS_DOWNWARD 0
  901. #endif
  902. #ifndef RETURN_ADDR_IN_PREVIOUS_FRAME
  903. #define RETURN_ADDR_IN_PREVIOUS_FRAME 0
  904. #endif
  905. /* On most machines, the CFA coincides with the first incoming parm. */
  906. #ifndef ARG_POINTER_CFA_OFFSET
  907. #define ARG_POINTER_CFA_OFFSET(FNDECL) \
  908. (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
  909. #endif
  910. /* On most machines, we use the CFA as DW_AT_frame_base. */
  911. #ifndef CFA_FRAME_BASE_OFFSET
  912. #define CFA_FRAME_BASE_OFFSET(FNDECL) 0
  913. #endif
  914. /* The offset from the incoming value of %sp to the top of the stack frame
  915. for the current function. */
  916. #ifndef INCOMING_FRAME_SP_OFFSET
  917. #define INCOMING_FRAME_SP_OFFSET 0
  918. #endif
  919. #ifndef HARD_REGNO_NREGS_HAS_PADDING
  920. #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
  921. #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
  922. #endif
  923. #ifndef OUTGOING_REG_PARM_STACK_SPACE
  924. #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
  925. #endif
  926. /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
  927. the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
  928. effort stack alignment supported by the backend. If the backend
  929. supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
  930. MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack
  931. boundary will limit the maximum guaranteed stack alignment. */
  932. #ifdef MAX_STACK_ALIGNMENT
  933. #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
  934. #else
  935. #define MAX_STACK_ALIGNMENT STACK_BOUNDARY
  936. #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
  937. #endif
  938. #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
  939. #ifndef LOCAL_ALIGNMENT
  940. #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
  941. #endif
  942. #ifndef STACK_SLOT_ALIGNMENT
  943. #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
  944. ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
  945. #endif
  946. #ifndef LOCAL_DECL_ALIGNMENT
  947. #define LOCAL_DECL_ALIGNMENT(DECL) \
  948. LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
  949. #endif
  950. #ifndef MINIMUM_ALIGNMENT
  951. #define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN)
  952. #endif
  953. /* Alignment value for attribute ((aligned)). */
  954. #ifndef ATTRIBUTE_ALIGNED_VALUE
  955. #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
  956. #endif
  957. /* For most ports anything that evaluates to a constant symbolic
  958. or integer value is acceptable as a constant address. */
  959. #ifndef CONSTANT_ADDRESS_P
  960. #define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
  961. #endif
  962. #ifndef MAX_FIXED_MODE_SIZE
  963. #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
  964. #endif
  965. /* Nonzero if structures and unions should be returned in memory.
  966. This should only be defined if compatibility with another compiler or
  967. with an ABI is needed, because it results in slower code. */
  968. #ifndef DEFAULT_PCC_STRUCT_RETURN
  969. #define DEFAULT_PCC_STRUCT_RETURN 1
  970. #endif
  971. #ifndef PCC_BITFIELD_TYPE_MATTERS
  972. #define PCC_BITFIELD_TYPE_MATTERS false
  973. #endif
  974. #ifndef INSN_SETS_ARE_DELAYED
  975. #define INSN_SETS_ARE_DELAYED(INSN) false
  976. #endif
  977. #ifndef INSN_REFERENCES_ARE_DELAYED
  978. #define INSN_REFERENCES_ARE_DELAYED(INSN) false
  979. #endif
  980. #ifndef NO_FUNCTION_CSE
  981. #define NO_FUNCTION_CSE false
  982. #endif
  983. #ifndef HARD_REGNO_RENAME_OK
  984. #define HARD_REGNO_RENAME_OK(FROM, TO) true
  985. #endif
  986. #ifndef EPILOGUE_USES
  987. #define EPILOGUE_USES(REG) false
  988. #endif
  989. #ifndef ARGS_GROW_DOWNWARD
  990. #define ARGS_GROW_DOWNWARD 0
  991. #endif
  992. #ifndef STACK_GROWS_DOWNWARD
  993. #define STACK_GROWS_DOWNWARD 0
  994. #endif
  995. #ifndef STACK_PUSH_CODE
  996. #if STACK_GROWS_DOWNWARD
  997. #define STACK_PUSH_CODE PRE_DEC
  998. #else
  999. #define STACK_PUSH_CODE PRE_INC
  1000. #endif
  1001. #endif
  1002. /* Default value for flag_pie when flag_pie is initialized to -1:
  1003. --enable-default-pie: Default flag_pie to -fPIE.
  1004. --disable-default-pie: Default flag_pie to 0.
  1005. */
  1006. #ifdef ENABLE_DEFAULT_PIE
  1007. # ifndef DEFAULT_FLAG_PIE
  1008. # define DEFAULT_FLAG_PIE 2
  1009. # endif
  1010. #else
  1011. # define DEFAULT_FLAG_PIE 0
  1012. #endif
  1013. #ifndef SWITCHABLE_TARGET
  1014. #define SWITCHABLE_TARGET 0
  1015. #endif
  1016. /* If the target supports integers that are wider than two
  1017. HOST_WIDE_INTs on the host compiler, then the target should define
  1018. TARGET_SUPPORTS_WIDE_INT and make the appropriate fixups.
  1019. Otherwise the compiler really is not robust. */
  1020. #ifndef TARGET_SUPPORTS_WIDE_INT
  1021. #define TARGET_SUPPORTS_WIDE_INT 0
  1022. #endif
  1023. #ifndef SHORT_IMMEDIATES_SIGN_EXTEND
  1024. #define SHORT_IMMEDIATES_SIGN_EXTEND 0
  1025. #endif
  1026. #ifndef WORD_REGISTER_OPERATIONS
  1027. #define WORD_REGISTER_OPERATIONS 0
  1028. #endif
  1029. #ifndef LOAD_EXTEND_OP
  1030. #define LOAD_EXTEND_OP(M) UNKNOWN
  1031. #endif
  1032. #ifndef INITIAL_FRAME_ADDRESS_RTX
  1033. #define INITIAL_FRAME_ADDRESS_RTX NULL
  1034. #endif
  1035. #ifndef SETUP_FRAME_ADDRESSES
  1036. #define SETUP_FRAME_ADDRESSES() do { } while (0)
  1037. #endif
  1038. #ifndef DYNAMIC_CHAIN_ADDRESS
  1039. #define DYNAMIC_CHAIN_ADDRESS(x) (x)
  1040. #endif
  1041. #ifndef FRAME_ADDR_RTX
  1042. #define FRAME_ADDR_RTX(x) (x)
  1043. #endif
  1044. #ifndef REVERSE_CONDITION
  1045. #define REVERSE_CONDITION(code, mode) reverse_condition (code)
  1046. #endif
  1047. #ifndef TARGET_PECOFF
  1048. #define TARGET_PECOFF 0
  1049. #endif
  1050. #ifndef TARGET_COFF
  1051. #define TARGET_COFF 0
  1052. #endif
  1053. #ifndef EH_RETURN_HANDLER_RTX
  1054. #define EH_RETURN_HANDLER_RTX NULL
  1055. #endif
  1056. #ifdef GCC_INSN_FLAGS_H
  1057. /* Dependent default target macro definitions
  1058. This section of defaults.h defines target macros that depend on generated
  1059. headers. This is a bit awkward: We want to put all default definitions
  1060. for target macros in defaults.h, but some of the defaults depend on the
  1061. HAVE_* flags defines of insn-flags.h. But insn-flags.h is not always
  1062. included by files that do include defaults.h.
  1063. Fortunately, the default macro definitions that depend on the HAVE_*
  1064. macros are also the ones that will only be used inside GCC itself, i.e.
  1065. not in the gen* programs or in target objects like libgcc.
  1066. Obviously, it would be best to keep this section of defaults.h as small
  1067. as possible, by converting the macros defined below to target hooks or
  1068. functions.
  1069. */
  1070. /* The default branch cost is 1. */
  1071. #ifndef BRANCH_COST
  1072. #define BRANCH_COST(speed_p, predictable_p) 1
  1073. #endif
  1074. /* If a memory-to-memory move would take MOVE_RATIO or more simple
  1075. move-instruction sequences, we will do a movmem or libcall instead. */
  1076. #ifndef MOVE_RATIO
  1077. #if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
  1078. #define MOVE_RATIO(speed) 2
  1079. #else
  1080. /* If we are optimizing for space (-Os), cut down the default move ratio. */
  1081. #define MOVE_RATIO(speed) ((speed) ? 15 : 3)
  1082. #endif
  1083. #endif
  1084. /* If a clear memory operation would take CLEAR_RATIO or more simple
  1085. move-instruction sequences, we will do a setmem or libcall instead. */
  1086. #ifndef CLEAR_RATIO
  1087. #if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti)
  1088. #define CLEAR_RATIO(speed) 2
  1089. #else
  1090. /* If we are optimizing for space, cut down the default clear ratio. */
  1091. #define CLEAR_RATIO(speed) ((speed) ? 15 :3)
  1092. #endif
  1093. #endif
  1094. /* If a memory set (to value other than zero) operation would take
  1095. SET_RATIO or more simple move-instruction sequences, we will do a movmem
  1096. or libcall instead. */
  1097. #ifndef SET_RATIO
  1098. #define SET_RATIO(speed) MOVE_RATIO (speed)
  1099. #endif
  1100. /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
  1101. Normally move_insn, so Pmode stack pointer. */
  1102. #ifndef STACK_SAVEAREA_MODE
  1103. #define STACK_SAVEAREA_MODE(LEVEL) Pmode
  1104. #endif
  1105. /* Supply a default definition of STACK_SIZE_MODE for
  1106. allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */
  1107. #ifndef STACK_SIZE_MODE
  1108. #define STACK_SIZE_MODE word_mode
  1109. #endif
  1110. /* Default value for flag_stack_protect when flag_stack_protect is initialized to -1:
  1111. --enable-default-ssp: Default flag_stack_protect to -fstack-protector-strong.
  1112. --disable-default-ssp: Default flag_stack_protect to 0.
  1113. */
  1114. #ifdef ENABLE_DEFAULT_SSP
  1115. # ifndef DEFAULT_FLAG_SSP
  1116. # define DEFAULT_FLAG_SSP 3
  1117. # endif
  1118. #else
  1119. # define DEFAULT_FLAG_SSP 0
  1120. #endif
  1121. /* Provide default values for the macros controlling stack checking. */
  1122. /* The default is neither full builtin stack checking... */
  1123. #ifndef STACK_CHECK_BUILTIN
  1124. #define STACK_CHECK_BUILTIN 0
  1125. #endif
  1126. /* ...nor static builtin stack checking. */
  1127. #ifndef STACK_CHECK_STATIC_BUILTIN
  1128. #define STACK_CHECK_STATIC_BUILTIN 0
  1129. #endif
  1130. /* The default interval is one page (4096 bytes). */
  1131. #ifndef STACK_CHECK_PROBE_INTERVAL_EXP
  1132. #define STACK_CHECK_PROBE_INTERVAL_EXP 12
  1133. #endif
  1134. /* The default is not to move the stack pointer. */
  1135. #ifndef STACK_CHECK_MOVING_SP
  1136. #define STACK_CHECK_MOVING_SP 0
  1137. #endif
  1138. /* This is a kludge to try to capture the discrepancy between the old
  1139. mechanism (generic stack checking) and the new mechanism (static
  1140. builtin stack checking). STACK_CHECK_PROTECT needs to be bumped
  1141. for the latter because part of the protection area is effectively
  1142. included in STACK_CHECK_MAX_FRAME_SIZE for the former. */
  1143. #ifdef STACK_CHECK_PROTECT
  1144. #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
  1145. #else
  1146. #define STACK_OLD_CHECK_PROTECT \
  1147. (!global_options.x_flag_exceptions \
  1148. ? 75 * UNITS_PER_WORD \
  1149. : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
  1150. ? 4 * 1024 \
  1151. : 8 * 1024)
  1152. #endif
  1153. /* Minimum amount of stack required to recover from an anticipated stack
  1154. overflow detection. The default value conveys an estimate of the amount
  1155. of stack required to propagate an exception. */
  1156. #ifndef STACK_CHECK_PROTECT
  1157. #define STACK_CHECK_PROTECT \
  1158. (!global_options.x_flag_exceptions \
  1159. ? 4 * 1024 \
  1160. : targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
  1161. ? 8 * 1024 \
  1162. : 12 * 1024)
  1163. #endif
  1164. /* Make the maximum frame size be the largest we can and still only need
  1165. one probe per function. */
  1166. #ifndef STACK_CHECK_MAX_FRAME_SIZE
  1167. #define STACK_CHECK_MAX_FRAME_SIZE \
  1168. ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
  1169. #endif
  1170. /* This is arbitrary, but should be large enough everywhere. */
  1171. #ifndef STACK_CHECK_FIXED_FRAME_SIZE
  1172. #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD)
  1173. #endif
  1174. /* Provide a reasonable default for the maximum size of an object to
  1175. allocate in the fixed frame. We may need to be able to make this
  1176. controllable by the user at some point. */
  1177. #ifndef STACK_CHECK_MAX_VAR_SIZE
  1178. #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
  1179. #endif
  1180. /* By default, the C++ compiler will use function addresses in the
  1181. vtable entries. Setting this nonzero tells the compiler to use
  1182. function descriptors instead. The value of this macro says how
  1183. many words wide the descriptor is (normally 2). It is assumed
  1184. that the address of a function descriptor may be treated as a
  1185. pointer to a function. */
  1186. #ifndef TARGET_VTABLE_USES_DESCRIPTORS
  1187. #define TARGET_VTABLE_USES_DESCRIPTORS 0
  1188. #endif
  1189. #endif /* GCC_INSN_FLAGS_H */
  1190. #ifndef DWARF_GNAT_ENCODINGS_DEFAULT
  1191. #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
  1192. #endif
  1193. #endif /* ! GCC_DEFAULTS_H */