target-def.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /* Default initializers for a generic GCC target.
  2. Copyright (C) 2001-2019 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU General Public License as published by the
  5. Free Software Foundation; either version 3, or (at your option) any
  6. later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; see the file COPYING3. If not see
  13. <http://www.gnu.org/licenses/>.
  14. In other words, you are welcome to use, share and improve this program.
  15. You are forbidden to forbid anyone else to use, share and improve
  16. what you give them. Help stamp out software-hoarding! */
  17. /* See target.def for a description of what this file contains and how to
  18. use it.
  19. We want to have non-NULL default definitions of all hook functions,
  20. even if they do nothing. */
  21. /* Note that if one of these macros must be defined in an OS .h file
  22. rather than the .c file, then we need to wrap the default
  23. definition in a #ifndef, since files include tm.h before this one. */
  24. #define TARGET_ASM_ALIGNED_HI_OP "\t.short\t"
  25. #define TARGET_ASM_ALIGNED_SI_OP "\t.long\t"
  26. #define TARGET_ASM_ALIGNED_DI_OP NULL
  27. #define TARGET_ASM_ALIGNED_TI_OP NULL
  28. /* GAS and SYSV4 assemblers accept these. */
  29. #if defined (OBJECT_FORMAT_ELF)
  30. #define TARGET_ASM_UNALIGNED_HI_OP "\t.2byte\t"
  31. #define TARGET_ASM_UNALIGNED_SI_OP "\t.4byte\t"
  32. #define TARGET_ASM_UNALIGNED_DI_OP "\t.8byte\t"
  33. #define TARGET_ASM_UNALIGNED_TI_OP NULL
  34. #else
  35. #define TARGET_ASM_UNALIGNED_HI_OP NULL
  36. #define TARGET_ASM_UNALIGNED_SI_OP NULL
  37. #define TARGET_ASM_UNALIGNED_DI_OP NULL
  38. #define TARGET_ASM_UNALIGNED_TI_OP NULL
  39. #endif /* OBJECT_FORMAT_ELF */
  40. /* There is no standard way to handle P{S,D,T}Imode, targets must implement them
  41. if required. */
  42. #define TARGET_ASM_ALIGNED_PSI_OP NULL
  43. #define TARGET_ASM_UNALIGNED_PSI_OP NULL
  44. #define TARGET_ASM_ALIGNED_PDI_OP NULL
  45. #define TARGET_ASM_UNALIGNED_PDI_OP NULL
  46. #define TARGET_ASM_ALIGNED_PTI_OP NULL
  47. #define TARGET_ASM_UNALIGNED_PTI_OP NULL
  48. #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
  49. # ifdef CTORS_SECTION_ASM_OP
  50. # define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
  51. # else
  52. # ifdef TARGET_ASM_NAMED_SECTION
  53. # define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
  54. # else
  55. # define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
  56. # endif
  57. # endif
  58. #endif
  59. #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
  60. # ifdef DTORS_SECTION_ASM_OP
  61. # define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
  62. # else
  63. # ifdef TARGET_ASM_NAMED_SECTION
  64. # define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
  65. # else
  66. # define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
  67. # endif
  68. # endif
  69. #endif
  70. #if !defined(TARGET_HAVE_CTORS_DTORS)
  71. # if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
  72. # define TARGET_HAVE_CTORS_DTORS true
  73. # endif
  74. #endif
  75. #ifndef TARGET_TERMINATE_DW2_EH_FRAME_INFO
  76. #ifdef EH_FRAME_SECTION_NAME
  77. #define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
  78. #endif
  79. #endif
  80. #if !defined(TARGET_ASM_OUTPUT_ANCHOR) && !defined(ASM_OUTPUT_DEF)
  81. #define TARGET_ASM_OUTPUT_ANCHOR NULL
  82. #endif
  83. #define TARGET_ASM_ALIGNED_INT_OP \
  84. {TARGET_ASM_ALIGNED_HI_OP, \
  85. TARGET_ASM_ALIGNED_PSI_OP, \
  86. TARGET_ASM_ALIGNED_SI_OP, \
  87. TARGET_ASM_ALIGNED_PDI_OP, \
  88. TARGET_ASM_ALIGNED_DI_OP, \
  89. TARGET_ASM_ALIGNED_PTI_OP, \
  90. TARGET_ASM_ALIGNED_TI_OP}
  91. #define TARGET_ASM_UNALIGNED_INT_OP \
  92. {TARGET_ASM_UNALIGNED_HI_OP, \
  93. TARGET_ASM_UNALIGNED_PSI_OP, \
  94. TARGET_ASM_UNALIGNED_SI_OP, \
  95. TARGET_ASM_UNALIGNED_PDI_OP, \
  96. TARGET_ASM_UNALIGNED_DI_OP, \
  97. TARGET_ASM_UNALIGNED_PTI_OP, \
  98. TARGET_ASM_UNALIGNED_TI_OP}
  99. #if !defined (TARGET_FUNCTION_INCOMING_ARG)
  100. #define TARGET_FUNCTION_INCOMING_ARG TARGET_FUNCTION_ARG
  101. #endif
  102. #include "target-hooks-def.h"
  103. #include "hooks.h"
  104. #include "targhooks.h"
  105. #include "insn-target-def.h"