comparison gcc/config/rs6000/rtems.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Definitions for rtems targeting a PowerPC using elf. 1 /* Definitions for rtems targeting a PowerPC using elf.
2 Copyright (C) 1996-2018 Free Software Foundation, Inc. 2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
3 Contributed by Joel Sherrill (joel@OARcorp.com). 3 Contributed by Joel Sherrill (joel@OARcorp.com).
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify it 7 GCC is free software; you can redistribute it and/or modify it
109 error (INVALID_64BIT, "prototype"); \ 109 error (INVALID_64BIT, "prototype"); \
110 } \ 110 } \
111 if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ 111 if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \
112 { \ 112 { \
113 rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ 113 rs6000_isa_flags |= OPTION_MASK_POWERPC64; \
114 error ("-m64 requires a PowerPC64 cpu"); \ 114 error ("%<-m64%> requires a PowerPC64 cpu"); \
115 } \ 115 } \
116 if ((rs6000_isa_flags_explicit \ 116 if ((rs6000_isa_flags_explicit \
117 & OPTION_MASK_MINIMAL_TOC) != 0) \ 117 & OPTION_MASK_MINIMAL_TOC) != 0) \
118 { \ 118 { \
119 if (global_options_set.x_rs6000_current_cmodel \ 119 if (global_options_set.x_rs6000_current_cmodel \
120 && rs6000_current_cmodel != CMODEL_SMALL) \ 120 && rs6000_current_cmodel != CMODEL_SMALL) \
121 error ("-mcmodel incompatible with other toc options"); \ 121 error ("%<-mcmodel%> incompatible with other toc options"); \
122 SET_CMODEL (CMODEL_SMALL); \ 122 SET_CMODEL (CMODEL_SMALL); \
123 } \ 123 } \
124 else \ 124 else \
125 { \ 125 { \
126 if (!global_options_set.x_rs6000_current_cmodel) \ 126 if (!global_options_set.x_rs6000_current_cmodel) \
220 220
221 /* Copy and paste from linux64.h and freebsd64.h */ 221 /* Copy and paste from linux64.h and freebsd64.h */
222 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P 222 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
223 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \ 223 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
224 (TARGET_TOC \ 224 (TARGET_TOC \
225 && (GET_CODE (X) == SYMBOL_REF \ 225 && (SYMBOL_REF_P (X) \
226 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \ 226 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
227 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \ 227 && SYMBOL_REF_P (XEXP (XEXP (X, 0), 0))) \
228 || GET_CODE (X) == LABEL_REF \ 228 || GET_CODE (X) == LABEL_REF \
229 || (GET_CODE (X) == CONST_INT \ 229 || (CONST_INT_P (X) \
230 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \ 230 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
231 || (GET_CODE (X) == CONST_DOUBLE \ 231 || (CONST_DOUBLE_P (X) \
232 && ((TARGET_64BIT \ 232 && ((TARGET_64BIT \
233 && (TARGET_MINIMAL_TOC \ 233 && (TARGET_MINIMAL_TOC \
234 || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ 234 || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
235 && ! TARGET_NO_FP_IN_TOC))) \ 235 && ! TARGET_NO_FP_IN_TOC))) \
236 || (!TARGET_64BIT \ 236 || (!TARGET_64BIT \
252 %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \ 252 %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
253 %{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \ 253 %{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \
254 %{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } } \ 254 %{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } } \
255 %{mcpu=e6500: -D__PPC_CPU_E6500__}" 255 %{mcpu=e6500: -D__PPC_CPU_E6500__}"
256 256
257 #undef ASM_DEFAULT_SPEC
258 #define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
259
260 #undef ASM_SPEC 257 #undef ASM_SPEC
261 #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)" 258 #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
262 259
263 #define ASM_SPEC32 "-a32 \ 260 #define ASM_SPEC32 "-a32 \
264 %{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \ 261 %{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \
286 { "asm_spec_common", ASM_SPEC_COMMON }, \ 283 { "asm_spec_common", ASM_SPEC_COMMON }, \
287 { "asm_spec32", ASM_SPEC32 }, \ 284 { "asm_spec32", ASM_SPEC32 }, \
288 { "asm_spec64", ASM_SPEC64 }, \ 285 { "asm_spec64", ASM_SPEC64 }, \
289 { "link_os_spec32", LINK_OS_SPEC32 }, \ 286 { "link_os_spec32", LINK_OS_SPEC32 }, \
290 { "link_os_spec64", LINK_OS_SPEC64 }, 287 { "link_os_spec64", LINK_OS_SPEC64 },
288
289 /* Use gnu-user.h LINK_GCC_SEQUENCE_SPEC for rtems. */
290 #undef LINK_GCC_C_SEQUENCE_SPEC
291 #define LINK_GCC_C_SEQUENCE_SPEC \
292 "%{mads|myellowknife|mmvme|msim:%G %L %G;" \
293 "!mcall-*|mcall-linux:" GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC ";" \
294 ":%G %L %G}"