1 /* Definitions of target machine for GNU compiler, for MCore using COFF/PE.
2 Copyright (C) 1994, 1999, 2000, 2002, 2003, 2004
3 Free Software Foundation, Inc.
4 Contributed by Michael Tiemann (tiemann@cygnus.com).
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* Run-time Target Specification. */
24 #define TARGET_VERSION fputs (" (MCORE/pe)", stderr)
26 #define TARGET_OS_CPP_BUILTINS() \
29 builtin_define ("__pe__"); \
33 /* The MCore ABI says that bitfields are unsigned by default. */
34 /* The EPOC C++ environment does not support exceptions. */
36 #define CC1_SPEC "-funsigned-bitfields %{!DIN_GCC:-fno-rtti} %{!DIN_GCC:-fno-exceptions}"
38 #undef SDB_DEBUGGING_INFO
39 #define DBX_DEBUGGING_INFO 1
41 /* Computed in toplev.c. */
42 #undef PREFERRED_DEBUGGING_TYPE
44 #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata"
46 #define MCORE_EXPORT_NAME(STREAM, NAME) \
49 fprintf (STREAM, "\t.section .drectve\n"); \
50 fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \
51 (* targetm.strip_name_encoding) (NAME)); \
56 /* Output the label for an initialized variable. */
57 #undef ASM_DECLARE_OBJECT_NAME
58 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
61 if (mcore_dllexport_name_p (NAME)) \
63 section *save_section = in_section; \
64 MCORE_EXPORT_NAME (STREAM, NAME); \
65 switch_to_section (save_section); \
67 ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
71 /* Output a function label definition. */
72 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
75 if (mcore_dllexport_name_p (NAME)) \
77 MCORE_EXPORT_NAME (STREAM, NAME); \
78 switch_to_section (function_section (DECL)); \
80 ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
84 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
86 #define DBX_LINES_FUNCTION_RELATIVE 1
88 #define STARTFILE_SPEC "crt0.o%s"
89 #define ENDFILE_SPEC "%{!mno-lsim:-lsim}"
91 /* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script. */
92 #define CTOR_LISTS_DEFINED_EXTERNALLY
94 #undef DO_GLOBAL_CTORS_BODY
95 #undef DO_GLOBAL_DTORS_BODY
96 #undef INIT_SECTION_ASM_OP
97 #undef DTORS_SECTION_ASM_OP
99 #define SUPPORTS_ONE_ONLY 1
101 /* Switch into a generic section. */
102 #undef TARGET_ASM_NAMED_SECTION
103 #define TARGET_ASM_NAMED_SECTION default_pe_asm_named_section