defaults.h 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364
  1. /* Definitions of various defaults for tm.h macros.
  2. Copyright (C) 1992-2015 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_IN_DATA_SECTION)
  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. /* If we have named section and we support weak symbols, then use the
  333. .jcr section for recording java classes which need to be registered
  334. at program start-up time. */
  335. #if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK
  336. #ifndef JCR_SECTION_NAME
  337. #define JCR_SECTION_NAME ".jcr"
  338. #endif
  339. #endif
  340. /* This decision to use a .jcr section can be overridden by defining
  341. USE_JCR_SECTION to 0 in target file. This is necessary if target
  342. can define JCR_SECTION_NAME but does not have crtstuff or
  343. linker support for .jcr section. */
  344. #ifndef TARGET_USE_JCR_SECTION
  345. #ifdef JCR_SECTION_NAME
  346. #define TARGET_USE_JCR_SECTION 1
  347. #else
  348. #define TARGET_USE_JCR_SECTION 0
  349. #endif
  350. #endif
  351. /* Number of hardware registers that go into the DWARF-2 unwind info.
  352. If not defined, equals FIRST_PSEUDO_REGISTER */
  353. #ifndef DWARF_FRAME_REGISTERS
  354. #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
  355. #endif
  356. /* Offsets recorded in opcodes are a multiple of this alignment factor. */
  357. #ifndef DWARF_CIE_DATA_ALIGNMENT
  358. #ifdef STACK_GROWS_DOWNWARD
  359. #define DWARF_CIE_DATA_ALIGNMENT (-((int) UNITS_PER_WORD))
  360. #else
  361. #define DWARF_CIE_DATA_ALIGNMENT ((int) UNITS_PER_WORD)
  362. #endif
  363. #endif
  364. /* The DWARF 2 CFA column which tracks the return address. Normally this
  365. is the column for PC, or the first column after all of the hard
  366. registers. */
  367. #ifndef DWARF_FRAME_RETURN_COLUMN
  368. #ifdef PC_REGNUM
  369. #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PC_REGNUM)
  370. #else
  371. #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGISTERS
  372. #endif
  373. #endif
  374. /* How to renumber registers for dbx and gdb. If not defined, assume
  375. no renumbering is necessary. */
  376. #ifndef DBX_REGISTER_NUMBER
  377. #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
  378. #endif
  379. /* The mapping from gcc register number to DWARF 2 CFA column number.
  380. By default, we just provide columns for all registers. */
  381. #ifndef DWARF_FRAME_REGNUM
  382. #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
  383. #endif
  384. /* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
  385. #ifndef DWARF_REG_TO_UNWIND_COLUMN
  386. #define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
  387. #endif
  388. /* Map register numbers held in the call frame info that gcc has
  389. collected using DWARF_FRAME_REGNUM to those that should be output in
  390. .debug_frame and .eh_frame. */
  391. #ifndef DWARF2_FRAME_REG_OUT
  392. #define DWARF2_FRAME_REG_OUT(REGNO, FOR_EH) (REGNO)
  393. #endif
  394. /* The size of addresses as they appear in the Dwarf 2 data.
  395. Some architectures use word addresses to refer to code locations,
  396. but Dwarf 2 info always uses byte addresses. On such machines,
  397. Dwarf 2 addresses need to be larger than the architecture's
  398. pointers. */
  399. #ifndef DWARF2_ADDR_SIZE
  400. #define DWARF2_ADDR_SIZE ((POINTER_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT)
  401. #endif
  402. /* The size in bytes of a DWARF field indicating an offset or length
  403. relative to a debug info section, specified to be 4 bytes in the
  404. DWARF-2 specification. The SGI/MIPS ABI defines it to be the same
  405. as PTR_SIZE. */
  406. #ifndef DWARF_OFFSET_SIZE
  407. #define DWARF_OFFSET_SIZE 4
  408. #endif
  409. /* The size in bytes of a DWARF 4 type signature. */
  410. #ifndef DWARF_TYPE_SIGNATURE_SIZE
  411. #define DWARF_TYPE_SIGNATURE_SIZE 8
  412. #endif
  413. /* Default sizes for base C types. If the sizes are different for
  414. your target, you should override these values by defining the
  415. appropriate symbols in your tm.h file. */
  416. #if BITS_PER_UNIT == 8
  417. #define LOG2_BITS_PER_UNIT 3
  418. #elif BITS_PER_UNIT == 16
  419. #define LOG2_BITS_PER_UNIT 4
  420. #else
  421. #error Unknown BITS_PER_UNIT
  422. #endif
  423. #ifndef BITS_PER_WORD
  424. #define BITS_PER_WORD (BITS_PER_UNIT * UNITS_PER_WORD)
  425. #endif
  426. #ifndef CHAR_TYPE_SIZE
  427. #define CHAR_TYPE_SIZE BITS_PER_UNIT
  428. #endif
  429. #ifndef BOOL_TYPE_SIZE
  430. /* `bool' has size and alignment `1', on almost all platforms. */
  431. #define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
  432. #endif
  433. #ifndef SHORT_TYPE_SIZE
  434. #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
  435. #endif
  436. #ifndef INT_TYPE_SIZE
  437. #define INT_TYPE_SIZE BITS_PER_WORD
  438. #endif
  439. #ifndef LONG_TYPE_SIZE
  440. #define LONG_TYPE_SIZE BITS_PER_WORD
  441. #endif
  442. #ifndef LONG_LONG_TYPE_SIZE
  443. #define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
  444. #endif
  445. #ifndef WCHAR_TYPE_SIZE
  446. #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
  447. #endif
  448. #ifndef FLOAT_TYPE_SIZE
  449. #define FLOAT_TYPE_SIZE BITS_PER_WORD
  450. #endif
  451. #ifndef DOUBLE_TYPE_SIZE
  452. #define DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
  453. #endif
  454. #ifndef LONG_DOUBLE_TYPE_SIZE
  455. #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
  456. #endif
  457. #ifndef DECIMAL32_TYPE_SIZE
  458. #define DECIMAL32_TYPE_SIZE 32
  459. #endif
  460. #ifndef DECIMAL64_TYPE_SIZE
  461. #define DECIMAL64_TYPE_SIZE 64
  462. #endif
  463. #ifndef DECIMAL128_TYPE_SIZE
  464. #define DECIMAL128_TYPE_SIZE 128
  465. #endif
  466. #ifndef SHORT_FRACT_TYPE_SIZE
  467. #define SHORT_FRACT_TYPE_SIZE BITS_PER_UNIT
  468. #endif
  469. #ifndef FRACT_TYPE_SIZE
  470. #define FRACT_TYPE_SIZE (BITS_PER_UNIT * 2)
  471. #endif
  472. #ifndef LONG_FRACT_TYPE_SIZE
  473. #define LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 4)
  474. #endif
  475. #ifndef LONG_LONG_FRACT_TYPE_SIZE
  476. #define LONG_LONG_FRACT_TYPE_SIZE (BITS_PER_UNIT * 8)
  477. #endif
  478. #ifndef SHORT_ACCUM_TYPE_SIZE
  479. #define SHORT_ACCUM_TYPE_SIZE (SHORT_FRACT_TYPE_SIZE * 2)
  480. #endif
  481. #ifndef ACCUM_TYPE_SIZE
  482. #define ACCUM_TYPE_SIZE (FRACT_TYPE_SIZE * 2)
  483. #endif
  484. #ifndef LONG_ACCUM_TYPE_SIZE
  485. #define LONG_ACCUM_TYPE_SIZE (LONG_FRACT_TYPE_SIZE * 2)
  486. #endif
  487. #ifndef LONG_LONG_ACCUM_TYPE_SIZE
  488. #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2)
  489. #endif
  490. /* We let tm.h override the types used here, to handle trivial differences
  491. such as the choice of unsigned int or long unsigned int for size_t.
  492. When machines start needing nontrivial differences in the size type,
  493. it would be best to do something here to figure out automatically
  494. from other information what type to use. */
  495. #ifndef SIZE_TYPE
  496. #define SIZE_TYPE "long unsigned int"
  497. #endif
  498. #ifndef SIZETYPE
  499. #define SIZETYPE SIZE_TYPE
  500. #endif
  501. #ifndef PID_TYPE
  502. #define PID_TYPE "int"
  503. #endif
  504. /* If GCC knows the exact uint_least16_t and uint_least32_t types from
  505. <stdint.h>, use them for char16_t and char32_t. Otherwise, use
  506. these guesses; getting the wrong type of a given width will not
  507. affect C++ name mangling because in C++ these are distinct types
  508. not typedefs. */
  509. #ifdef UINT_LEAST16_TYPE
  510. #define CHAR16_TYPE UINT_LEAST16_TYPE
  511. #else
  512. #define CHAR16_TYPE "short unsigned int"
  513. #endif
  514. #ifdef UINT_LEAST32_TYPE
  515. #define CHAR32_TYPE UINT_LEAST32_TYPE
  516. #else
  517. #define CHAR32_TYPE "unsigned int"
  518. #endif
  519. #ifndef WCHAR_TYPE
  520. #define WCHAR_TYPE "int"
  521. #endif
  522. /* WCHAR_TYPE gets overridden by -fshort-wchar. */
  523. #define MODIFIED_WCHAR_TYPE \
  524. (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE)
  525. #ifndef PTRDIFF_TYPE
  526. #define PTRDIFF_TYPE "long int"
  527. #endif
  528. #ifndef WINT_TYPE
  529. #define WINT_TYPE "unsigned int"
  530. #endif
  531. #ifndef INTMAX_TYPE
  532. #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  533. ? "int" \
  534. : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  535. ? "long int" \
  536. : "long long int"))
  537. #endif
  538. #ifndef UINTMAX_TYPE
  539. #define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  540. ? "unsigned int" \
  541. : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
  542. ? "long unsigned int" \
  543. : "long long unsigned int"))
  544. #endif
  545. /* There are no default definitions of these <stdint.h> types. */
  546. #ifndef SIG_ATOMIC_TYPE
  547. #define SIG_ATOMIC_TYPE ((const char *) NULL)
  548. #endif
  549. #ifndef INT8_TYPE
  550. #define INT8_TYPE ((const char *) NULL)
  551. #endif
  552. #ifndef INT16_TYPE
  553. #define INT16_TYPE ((const char *) NULL)
  554. #endif
  555. #ifndef INT32_TYPE
  556. #define INT32_TYPE ((const char *) NULL)
  557. #endif
  558. #ifndef INT64_TYPE
  559. #define INT64_TYPE ((const char *) NULL)
  560. #endif
  561. #ifndef UINT8_TYPE
  562. #define UINT8_TYPE ((const char *) NULL)
  563. #endif
  564. #ifndef UINT16_TYPE
  565. #define UINT16_TYPE ((const char *) NULL)
  566. #endif
  567. #ifndef UINT32_TYPE
  568. #define UINT32_TYPE ((const char *) NULL)
  569. #endif
  570. #ifndef UINT64_TYPE
  571. #define UINT64_TYPE ((const char *) NULL)
  572. #endif
  573. #ifndef INT_LEAST8_TYPE
  574. #define INT_LEAST8_TYPE ((const char *) NULL)
  575. #endif
  576. #ifndef INT_LEAST16_TYPE
  577. #define INT_LEAST16_TYPE ((const char *) NULL)
  578. #endif
  579. #ifndef INT_LEAST32_TYPE
  580. #define INT_LEAST32_TYPE ((const char *) NULL)
  581. #endif
  582. #ifndef INT_LEAST64_TYPE
  583. #define INT_LEAST64_TYPE ((const char *) NULL)
  584. #endif
  585. #ifndef UINT_LEAST8_TYPE
  586. #define UINT_LEAST8_TYPE ((const char *) NULL)
  587. #endif
  588. #ifndef UINT_LEAST16_TYPE
  589. #define UINT_LEAST16_TYPE ((const char *) NULL)
  590. #endif
  591. #ifndef UINT_LEAST32_TYPE
  592. #define UINT_LEAST32_TYPE ((const char *) NULL)
  593. #endif
  594. #ifndef UINT_LEAST64_TYPE
  595. #define UINT_LEAST64_TYPE ((const char *) NULL)
  596. #endif
  597. #ifndef INT_FAST8_TYPE
  598. #define INT_FAST8_TYPE ((const char *) NULL)
  599. #endif
  600. #ifndef INT_FAST16_TYPE
  601. #define INT_FAST16_TYPE ((const char *) NULL)
  602. #endif
  603. #ifndef INT_FAST32_TYPE
  604. #define INT_FAST32_TYPE ((const char *) NULL)
  605. #endif
  606. #ifndef INT_FAST64_TYPE
  607. #define INT_FAST64_TYPE ((const char *) NULL)
  608. #endif
  609. #ifndef UINT_FAST8_TYPE
  610. #define UINT_FAST8_TYPE ((const char *) NULL)
  611. #endif
  612. #ifndef UINT_FAST16_TYPE
  613. #define UINT_FAST16_TYPE ((const char *) NULL)
  614. #endif
  615. #ifndef UINT_FAST32_TYPE
  616. #define UINT_FAST32_TYPE ((const char *) NULL)
  617. #endif
  618. #ifndef UINT_FAST64_TYPE
  619. #define UINT_FAST64_TYPE ((const char *) NULL)
  620. #endif
  621. #ifndef INTPTR_TYPE
  622. #define INTPTR_TYPE ((const char *) NULL)
  623. #endif
  624. #ifndef UINTPTR_TYPE
  625. #define UINTPTR_TYPE ((const char *) NULL)
  626. #endif
  627. /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */
  628. #ifndef POINTER_SIZE
  629. #define POINTER_SIZE BITS_PER_WORD
  630. #endif
  631. #ifndef POINTER_SIZE_UNITS
  632. #define POINTER_SIZE_UNITS ((POINTER_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT)
  633. #endif
  634. #ifndef PIC_OFFSET_TABLE_REGNUM
  635. #define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
  636. #endif
  637. #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
  638. #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED 0
  639. #endif
  640. #ifndef TARGET_DLLIMPORT_DECL_ATTRIBUTES
  641. #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 0
  642. #endif
  643. #ifndef TARGET_DECLSPEC
  644. #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
  645. /* If the target supports the "dllimport" attribute, users are
  646. probably used to the "__declspec" syntax. */
  647. #define TARGET_DECLSPEC 1
  648. #else
  649. #define TARGET_DECLSPEC 0
  650. #endif
  651. #endif
  652. /* By default, the preprocessor should be invoked the same way in C++
  653. as in C. */
  654. #ifndef CPLUSPLUS_CPP_SPEC
  655. #ifdef CPP_SPEC
  656. #define CPLUSPLUS_CPP_SPEC CPP_SPEC
  657. #endif
  658. #endif
  659. #ifndef ACCUMULATE_OUTGOING_ARGS
  660. #define ACCUMULATE_OUTGOING_ARGS 0
  661. #endif
  662. /* By default, use the GNU runtime for Objective C. */
  663. #ifndef NEXT_OBJC_RUNTIME
  664. #define NEXT_OBJC_RUNTIME 0
  665. #endif
  666. /* Supply a default definition for PUSH_ARGS. */
  667. #ifndef PUSH_ARGS
  668. #ifdef PUSH_ROUNDING
  669. #define PUSH_ARGS !ACCUMULATE_OUTGOING_ARGS
  670. #else
  671. #define PUSH_ARGS 0
  672. #endif
  673. #endif
  674. /* Decide whether a function's arguments should be processed
  675. from first to last or from last to first.
  676. They should if the stack and args grow in opposite directions, but
  677. only if we have push insns. */
  678. #ifdef PUSH_ROUNDING
  679. #ifndef PUSH_ARGS_REVERSED
  680. #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
  681. #define PUSH_ARGS_REVERSED PUSH_ARGS
  682. #endif
  683. #endif
  684. #endif
  685. #ifndef PUSH_ARGS_REVERSED
  686. #define PUSH_ARGS_REVERSED 0
  687. #endif
  688. /* Default value for the alignment (in bits) a C conformant malloc has to
  689. provide. This default is intended to be safe and always correct. */
  690. #ifndef MALLOC_ABI_ALIGNMENT
  691. #define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
  692. #endif
  693. /* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
  694. STACK_BOUNDARY is required. */
  695. #ifndef PREFERRED_STACK_BOUNDARY
  696. #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
  697. #endif
  698. /* Set INCOMING_STACK_BOUNDARY to PREFERRED_STACK_BOUNDARY if it is not
  699. defined. */
  700. #ifndef INCOMING_STACK_BOUNDARY
  701. #define INCOMING_STACK_BOUNDARY PREFERRED_STACK_BOUNDARY
  702. #endif
  703. #ifndef TARGET_DEFAULT_PACK_STRUCT
  704. #define TARGET_DEFAULT_PACK_STRUCT 0
  705. #endif
  706. /* By default, the vtable entries are void pointers, the so the alignment
  707. is the same as pointer alignment. The value of this macro specifies
  708. the alignment of the vtable entry in bits. It should be defined only
  709. when special alignment is necessary. */
  710. #ifndef TARGET_VTABLE_ENTRY_ALIGN
  711. #define TARGET_VTABLE_ENTRY_ALIGN POINTER_SIZE
  712. #endif
  713. /* There are a few non-descriptor entries in the vtable at offsets below
  714. zero. If these entries must be padded (say, to preserve the alignment
  715. specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of
  716. words in each data entry. */
  717. #ifndef TARGET_VTABLE_DATA_ENTRY_DISTANCE
  718. #define TARGET_VTABLE_DATA_ENTRY_DISTANCE 1
  719. #endif
  720. /* Decide whether it is safe to use a local alias for a virtual function
  721. when constructing thunks. */
  722. #ifndef TARGET_USE_LOCAL_THUNK_ALIAS_P
  723. #ifdef ASM_OUTPUT_DEF
  724. #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 1
  725. #else
  726. #define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) 0
  727. #endif
  728. #endif
  729. /* Select a format to encode pointers in exception handling data. We
  730. prefer those that result in fewer dynamic relocations. Assume no
  731. special support here and encode direct references. */
  732. #ifndef ASM_PREFERRED_EH_DATA_FORMAT
  733. #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) DW_EH_PE_absptr
  734. #endif
  735. /* By default, the C++ compiler will use the lowest bit of the pointer
  736. to function to indicate a pointer-to-member-function points to a
  737. virtual member function. However, if FUNCTION_BOUNDARY indicates
  738. function addresses aren't always even, the lowest bit of the delta
  739. field will be used. */
  740. #ifndef TARGET_PTRMEMFUNC_VBIT_LOCATION
  741. #define TARGET_PTRMEMFUNC_VBIT_LOCATION \
  742. (FUNCTION_BOUNDARY >= 2 * BITS_PER_UNIT \
  743. ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
  744. #endif
  745. #ifndef DEFAULT_GDB_EXTENSIONS
  746. #define DEFAULT_GDB_EXTENSIONS 1
  747. #endif
  748. /* If more than one debugging type is supported, you must define
  749. PREFERRED_DEBUGGING_TYPE to choose the default. */
  750. #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \
  751. + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
  752. + defined (VMS_DEBUGGING_INFO))
  753. #ifndef PREFERRED_DEBUGGING_TYPE
  754. #error You must define PREFERRED_DEBUGGING_TYPE
  755. #endif /* no PREFERRED_DEBUGGING_TYPE */
  756. /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
  757. here so other code needn't care. */
  758. #elif defined DBX_DEBUGGING_INFO
  759. #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
  760. #elif defined SDB_DEBUGGING_INFO
  761. #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
  762. #elif defined DWARF2_DEBUGGING_INFO
  763. #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
  764. #elif defined VMS_DEBUGGING_INFO
  765. #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
  766. #elif defined XCOFF_DEBUGGING_INFO
  767. #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
  768. #else
  769. /* No debugging format is supported by this target. */
  770. #define PREFERRED_DEBUGGING_TYPE NO_DEBUG
  771. #endif
  772. #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
  773. #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
  774. #endif
  775. /* True if the targets integer-comparison functions return { 0, 1, 2
  776. } to indicate { <, ==, > }. False if { -1, 0, 1 } is used
  777. instead. The libgcc routines are biased. */
  778. #ifndef TARGET_LIB_INT_CMP_BIASED
  779. #define TARGET_LIB_INT_CMP_BIASED (true)
  780. #endif
  781. /* If FLOAT_WORDS_BIG_ENDIAN is not defined in the header files,
  782. then the word-endianness is the same as for integers. */
  783. #ifndef FLOAT_WORDS_BIG_ENDIAN
  784. #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
  785. #endif
  786. #ifndef REG_WORDS_BIG_ENDIAN
  787. #define REG_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
  788. #endif
  789. #ifdef TARGET_FLT_EVAL_METHOD
  790. #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 1
  791. #else
  792. #define TARGET_FLT_EVAL_METHOD 0
  793. #define TARGET_FLT_EVAL_METHOD_NON_DEFAULT 0
  794. #endif
  795. #ifndef TARGET_DEC_EVAL_METHOD
  796. #define TARGET_DEC_EVAL_METHOD 2
  797. #endif
  798. #ifndef HAS_LONG_COND_BRANCH
  799. #define HAS_LONG_COND_BRANCH 0
  800. #endif
  801. #ifndef HAS_LONG_UNCOND_BRANCH
  802. #define HAS_LONG_UNCOND_BRANCH 0
  803. #endif
  804. /* Determine whether __cxa_atexit, rather than atexit, is used to
  805. register C++ destructors for local statics and global objects. */
  806. #ifndef DEFAULT_USE_CXA_ATEXIT
  807. #define DEFAULT_USE_CXA_ATEXIT 0
  808. #endif
  809. #if GCC_VERSION >= 3000 && defined IN_GCC
  810. /* These old constraint macros shouldn't appear anywhere in a
  811. configuration using MD constraint definitions. */
  812. #endif
  813. /* Determin whether the target runtime library is Bionic */
  814. #ifndef TARGET_HAS_BIONIC
  815. #define TARGET_HAS_BIONIC 0
  816. #endif
  817. /* Indicate that CLZ and CTZ are undefined at zero. */
  818. #ifndef CLZ_DEFINED_VALUE_AT_ZERO
  819. #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
  820. #endif
  821. #ifndef CTZ_DEFINED_VALUE_AT_ZERO
  822. #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0
  823. #endif
  824. /* Provide a default value for STORE_FLAG_VALUE. */
  825. #ifndef STORE_FLAG_VALUE
  826. #define STORE_FLAG_VALUE 1
  827. #endif
  828. /* This macro is used to determine what the largest unit size that
  829. move_by_pieces can use is. */
  830. /* MOVE_MAX_PIECES is the number of bytes at a time which we can
  831. move efficiently, as opposed to MOVE_MAX which is the maximum
  832. number of bytes we can move with a single instruction. */
  833. #ifndef MOVE_MAX_PIECES
  834. #define MOVE_MAX_PIECES MOVE_MAX
  835. #endif
  836. /* STORE_MAX_PIECES is the number of bytes at a time that we can
  837. store efficiently. Due to internal GCC limitations, this is
  838. MOVE_MAX_PIECES limited by the number of bytes GCC can represent
  839. for an immediate constant. */
  840. #ifndef STORE_MAX_PIECES
  841. #define STORE_MAX_PIECES MIN (MOVE_MAX_PIECES, 2 * sizeof (HOST_WIDE_INT))
  842. #endif
  843. #ifndef MAX_MOVE_MAX
  844. #define MAX_MOVE_MAX MOVE_MAX
  845. #endif
  846. #ifndef MIN_UNITS_PER_WORD
  847. #define MIN_UNITS_PER_WORD UNITS_PER_WORD
  848. #endif
  849. #ifndef MAX_BITS_PER_WORD
  850. #define MAX_BITS_PER_WORD BITS_PER_WORD
  851. #endif
  852. #ifndef STACK_POINTER_OFFSET
  853. #define STACK_POINTER_OFFSET 0
  854. #endif
  855. #ifndef LOCAL_REGNO
  856. #define LOCAL_REGNO(REGNO) 0
  857. #endif
  858. #ifndef HONOR_REG_ALLOC_ORDER
  859. #define HONOR_REG_ALLOC_ORDER 0
  860. #endif
  861. /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
  862. the stack pointer does not matter. The value is tested only in
  863. functions that have frame pointers. */
  864. #ifndef EXIT_IGNORE_STACK
  865. #define EXIT_IGNORE_STACK 0
  866. #endif
  867. /* Assume that case vectors are not pc-relative. */
  868. #ifndef CASE_VECTOR_PC_RELATIVE
  869. #define CASE_VECTOR_PC_RELATIVE 0
  870. #endif
  871. /* Assume that trampolines need function alignment. */
  872. #ifndef TRAMPOLINE_ALIGNMENT
  873. #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
  874. #endif
  875. /* Register mappings for target machines without register windows. */
  876. #ifndef INCOMING_REGNO
  877. #define INCOMING_REGNO(N) (N)
  878. #endif
  879. #ifndef OUTGOING_REGNO
  880. #define OUTGOING_REGNO(N) (N)
  881. #endif
  882. #ifndef SHIFT_COUNT_TRUNCATED
  883. #define SHIFT_COUNT_TRUNCATED 0
  884. #endif
  885. #ifndef LEGITIMATE_PIC_OPERAND_P
  886. #define LEGITIMATE_PIC_OPERAND_P(X) 1
  887. #endif
  888. #ifndef TARGET_MEM_CONSTRAINT
  889. #define TARGET_MEM_CONSTRAINT 'm'
  890. #endif
  891. #ifndef REVERSIBLE_CC_MODE
  892. #define REVERSIBLE_CC_MODE(MODE) 0
  893. #endif
  894. /* Biggest alignment supported by the object file format of this machine. */
  895. #ifndef MAX_OFILE_ALIGNMENT
  896. #define MAX_OFILE_ALIGNMENT BIGGEST_ALIGNMENT
  897. #endif
  898. #ifndef FRAME_GROWS_DOWNWARD
  899. #define FRAME_GROWS_DOWNWARD 0
  900. #endif
  901. #ifndef RETURN_ADDR_IN_PREVIOUS_FRAME
  902. #define RETURN_ADDR_IN_PREVIOUS_FRAME 0
  903. #endif
  904. /* On most machines, the CFA coincides with the first incoming parm. */
  905. #ifndef ARG_POINTER_CFA_OFFSET
  906. #define ARG_POINTER_CFA_OFFSET(FNDECL) \
  907. (FIRST_PARM_OFFSET (FNDECL) + crtl->args.pretend_args_size)
  908. #endif
  909. /* On most machines, we use the CFA as DW_AT_frame_base. */
  910. #ifndef CFA_FRAME_BASE_OFFSET
  911. #define CFA_FRAME_BASE_OFFSET(FNDECL) 0
  912. #endif
  913. /* The offset from the incoming value of %sp to the top of the stack frame
  914. for the current function. */
  915. #ifndef INCOMING_FRAME_SP_OFFSET
  916. #define INCOMING_FRAME_SP_OFFSET 0
  917. #endif
  918. #ifndef HARD_REGNO_NREGS_HAS_PADDING
  919. #define HARD_REGNO_NREGS_HAS_PADDING(REGNO, MODE) 0
  920. #define HARD_REGNO_NREGS_WITH_PADDING(REGNO, MODE) -1
  921. #endif
  922. #ifndef OUTGOING_REG_PARM_STACK_SPACE
  923. #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 0
  924. #endif
  925. /* MAX_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
  926. the backend. MAX_SUPPORTED_STACK_ALIGNMENT is the maximum best
  927. effort stack alignment supported by the backend. If the backend
  928. supports stack alignment, MAX_SUPPORTED_STACK_ALIGNMENT and
  929. MAX_STACK_ALIGNMENT are the same. Otherwise, the incoming stack
  930. boundary will limit the maximum guaranteed stack alignment. */
  931. #ifdef MAX_STACK_ALIGNMENT
  932. #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
  933. #else
  934. #define MAX_STACK_ALIGNMENT STACK_BOUNDARY
  935. #define MAX_SUPPORTED_STACK_ALIGNMENT PREFERRED_STACK_BOUNDARY
  936. #endif
  937. #define SUPPORTS_STACK_ALIGNMENT (MAX_STACK_ALIGNMENT > STACK_BOUNDARY)
  938. #ifndef LOCAL_ALIGNMENT
  939. #define LOCAL_ALIGNMENT(TYPE, ALIGNMENT) ALIGNMENT
  940. #endif
  941. #ifndef STACK_SLOT_ALIGNMENT
  942. #define STACK_SLOT_ALIGNMENT(TYPE,MODE,ALIGN) \
  943. ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
  944. #endif
  945. #ifndef LOCAL_DECL_ALIGNMENT
  946. #define LOCAL_DECL_ALIGNMENT(DECL) \
  947. LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
  948. #endif
  949. #ifndef MINIMUM_ALIGNMENT
  950. #define MINIMUM_ALIGNMENT(EXP,MODE,ALIGN) (ALIGN)
  951. #endif
  952. /* Alignment value for attribute ((aligned)). */
  953. #ifndef ATTRIBUTE_ALIGNED_VALUE
  954. #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
  955. #endif
  956. #ifndef SLOW_UNALIGNED_ACCESS
  957. #define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) STRICT_ALIGNMENT
  958. #endif
  959. /* For most ports anything that evaluates to a constant symbolic
  960. or integer value is acceptable as a constant address. */
  961. #ifndef CONSTANT_ADDRESS_P
  962. #define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE)
  963. #endif
  964. #ifndef MAX_FIXED_MODE_SIZE
  965. #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
  966. #endif
  967. /* Nonzero if structures and unions should be returned in memory.
  968. This should only be defined if compatibility with another compiler or
  969. with an ABI is needed, because it results in slower code. */
  970. #ifndef DEFAULT_PCC_STRUCT_RETURN
  971. #define DEFAULT_PCC_STRUCT_RETURN 1
  972. #endif
  973. #ifdef GCC_INSN_FLAGS_H
  974. /* Dependent default target macro definitions
  975. This section of defaults.h defines target macros that depend on generated
  976. headers. This is a bit awkward: We want to put all default definitions
  977. for target macros in defaults.h, but some of the defaults depend on the
  978. HAVE_* flags defines of insn-flags.h. But insn-flags.h is not always
  979. included by files that do include defaults.h.
  980. Fortunately, the default macro definitions that depend on the HAVE_*
  981. macros are also the ones that will only be used inside GCC itself, i.e.
  982. not in the gen* programs or in target objects like libgcc.
  983. Obviously, it would be best to keep this section of defaults.h as small
  984. as possible, by converting the macros defined below to target hooks or
  985. functions.
  986. */
  987. /* The default branch cost is 1. */
  988. #ifndef BRANCH_COST
  989. #define BRANCH_COST(speed_p, predictable_p) 1
  990. #endif
  991. /* If a memory-to-memory move would take MOVE_RATIO or more simple
  992. move-instruction sequences, we will do a movmem or libcall instead. */
  993. #ifndef MOVE_RATIO
  994. #if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
  995. #define MOVE_RATIO(speed) 2
  996. #else
  997. /* If we are optimizing for space (-Os), cut down the default move ratio. */
  998. #define MOVE_RATIO(speed) ((speed) ? 15 : 3)
  999. #endif
  1000. #endif
  1001. /* If a clear memory operation would take CLEAR_RATIO or more simple
  1002. move-instruction sequences, we will do a setmem or libcall instead. */
  1003. #ifndef CLEAR_RATIO
  1004. #if defined (HAVE_setmemqi) || defined (HAVE_setmemhi) || defined (HAVE_setmemsi) || defined (HAVE_setmemdi) || defined (HAVE_setmemti)
  1005. #define CLEAR_RATIO(speed) 2
  1006. #else
  1007. /* If we are optimizing for space, cut down the default clear ratio. */
  1008. #define CLEAR_RATIO(speed) ((speed) ? 15 :3)
  1009. #endif
  1010. #endif
  1011. /* If a memory set (to value other than zero) operation would take
  1012. SET_RATIO or more simple move-instruction sequences, we will do a movmem
  1013. or libcall instead. */
  1014. #ifndef SET_RATIO
  1015. #define SET_RATIO(speed) MOVE_RATIO (speed)
  1016. #endif
  1017. /* Supply a default definition for FUNCTION_ARG_PADDING:
  1018. usually pad upward, but pad short args downward on
  1019. big-endian machines. */
  1020. #define DEFAULT_FUNCTION_ARG_PADDING(MODE, TYPE) \
  1021. (! BYTES_BIG_ENDIAN \
  1022. ? upward \
  1023. : (((MODE) == BLKmode \
  1024. ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \
  1025. && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \
  1026. : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \
  1027. ? downward : upward))
  1028. #ifndef FUNCTION_ARG_PADDING
  1029. #define FUNCTION_ARG_PADDING(MODE, TYPE) \
  1030. DEFAULT_FUNCTION_ARG_PADDING ((MODE), (TYPE))
  1031. #endif
  1032. /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
  1033. Normally move_insn, so Pmode stack pointer. */
  1034. #ifndef STACK_SAVEAREA_MODE
  1035. #define STACK_SAVEAREA_MODE(LEVEL) Pmode
  1036. #endif
  1037. /* Supply a default definition of STACK_SIZE_MODE for
  1038. allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */
  1039. #ifndef STACK_SIZE_MODE
  1040. #define STACK_SIZE_MODE word_mode
  1041. #endif
  1042. /* Provide default values for the macros controlling stack checking. */
  1043. /* The default is neither full builtin stack checking... */
  1044. #ifndef STACK_CHECK_BUILTIN
  1045. #define STACK_CHECK_BUILTIN 0
  1046. #endif
  1047. /* ...nor static builtin stack checking. */
  1048. #ifndef STACK_CHECK_STATIC_BUILTIN
  1049. #define STACK_CHECK_STATIC_BUILTIN 0
  1050. #endif
  1051. /* The default interval is one page (4096 bytes). */
  1052. #ifndef STACK_CHECK_PROBE_INTERVAL_EXP
  1053. #define STACK_CHECK_PROBE_INTERVAL_EXP 12
  1054. #endif
  1055. /* The default is not to move the stack pointer. */
  1056. #ifndef STACK_CHECK_MOVING_SP
  1057. #define STACK_CHECK_MOVING_SP 0
  1058. #endif
  1059. /* This is a kludge to try to capture the discrepancy between the old
  1060. mechanism (generic stack checking) and the new mechanism (static
  1061. builtin stack checking). STACK_CHECK_PROTECT needs to be bumped
  1062. for the latter because part of the protection area is effectively
  1063. included in STACK_CHECK_MAX_FRAME_SIZE for the former. */
  1064. #ifdef STACK_CHECK_PROTECT
  1065. #define STACK_OLD_CHECK_PROTECT STACK_CHECK_PROTECT
  1066. #else
  1067. #define STACK_OLD_CHECK_PROTECT \
  1068. (targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
  1069. ? 75 * UNITS_PER_WORD \
  1070. : 8 * 1024)
  1071. #endif
  1072. /* Minimum amount of stack required to recover from an anticipated stack
  1073. overflow detection. The default value conveys an estimate of the amount
  1074. of stack required to propagate an exception. */
  1075. #ifndef STACK_CHECK_PROTECT
  1076. #define STACK_CHECK_PROTECT \
  1077. (targetm_common.except_unwind_info (&global_options) == UI_SJLJ \
  1078. ? 75 * UNITS_PER_WORD \
  1079. : 12 * 1024)
  1080. #endif
  1081. /* Make the maximum frame size be the largest we can and still only need
  1082. one probe per function. */
  1083. #ifndef STACK_CHECK_MAX_FRAME_SIZE
  1084. #define STACK_CHECK_MAX_FRAME_SIZE \
  1085. ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
  1086. #endif
  1087. /* This is arbitrary, but should be large enough everywhere. */
  1088. #ifndef STACK_CHECK_FIXED_FRAME_SIZE
  1089. #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD)
  1090. #endif
  1091. /* Provide a reasonable default for the maximum size of an object to
  1092. allocate in the fixed frame. We may need to be able to make this
  1093. controllable by the user at some point. */
  1094. #ifndef STACK_CHECK_MAX_VAR_SIZE
  1095. #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
  1096. #endif
  1097. /* By default, the C++ compiler will use function addresses in the
  1098. vtable entries. Setting this nonzero tells the compiler to use
  1099. function descriptors instead. The value of this macro says how
  1100. many words wide the descriptor is (normally 2). It is assumed
  1101. that the address of a function descriptor may be treated as a
  1102. pointer to a function. */
  1103. #ifndef TARGET_VTABLE_USES_DESCRIPTORS
  1104. #define TARGET_VTABLE_USES_DESCRIPTORS 0
  1105. #endif
  1106. #ifndef SWITCHABLE_TARGET
  1107. #define SWITCHABLE_TARGET 0
  1108. #endif
  1109. /* If the target supports integers that are wider than two
  1110. HOST_WIDE_INTs on the host compiler, then the target should define
  1111. TARGET_SUPPORTS_WIDE_INT and make the appropriate fixups.
  1112. Otherwise the compiler really is not robust. */
  1113. #ifndef TARGET_SUPPORTS_WIDE_INT
  1114. #define TARGET_SUPPORTS_WIDE_INT 0
  1115. #endif
  1116. #endif /* GCC_INSN_FLAGS_H */
  1117. #endif /* ! GCC_DEFAULTS_H */