]>
gcc.gnu.org Git - gcc.git/blob - gcc/config/mcore/mcore-pe.h
1 /* Definitions of target machine for GNU compiler, for MCore using COFF/PE.
2 Copyright (C) 1994, 1999, 2000, 2002 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@cygnus.com).
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Run-time Target Specification. */
23 #define TARGET_VERSION fputs (" (MCORE/pe)", stderr)
25 #define SUBTARGET_CPP_PREDEFINES " -D__pe__"
27 /* The MCore ABI says that bitfields are unsigned by default. */
28 /* The EPOC C++ environment does not support exceptions. */
29 #define CC1_SPEC "-funsigned-bitfields %{!DIN_GCC:-fno-rtti} %{!DIN_GCC:-fno-exceptions}"
32 #include "mcore/mcore.h"
35 #undef SDB_DEBUGGING_INFO
36 #define DBX_DEBUGGING_INFO 1
38 /* Computed in toplev.c. */
39 #undef PREFERRED_DEBUGGING_TYPE
41 /* Lay out additional 'sections' where we place things like code
42 and readonly data. This gets them out of default places. */
44 #define SUBTARGET_SWITCH_SECTIONS \
45 case in_drectve: drectve_section (); break;
47 #define DRECTVE_SECTION_ASM_OP "\t.section .drectve"
48 #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata"
50 #define SUBTARGET_EXTRA_SECTIONS in_drectve
52 #define SUBTARGET_EXTRA_SECTION_FUNCTIONS \
53 DRECTVE_SECTION_FUNCTION
55 #define DRECTVE_SECTION_FUNCTION \
59 if (in_section != in_drectve) \
61 fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP); \
62 in_section = in_drectve; \
66 #define MCORE_EXPORT_NAME(STREAM, NAME) \
70 fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \
71 (* targetm.strip_name_encoding) (NAME)); \
75 /* Output the label for an initialized variable. */
76 #undef ASM_DECLARE_OBJECT_NAME
77 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
80 if (mcore_dllexport_name_p (NAME)) \
82 enum in_section save_section = in_section; \
83 MCORE_EXPORT_NAME (STREAM, NAME); \
84 switch_to_section (save_section, (DECL)); \
86 ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
90 /* Output a function label definition. */
91 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
94 if (mcore_dllexport_name_p (NAME)) \
96 MCORE_EXPORT_NAME (STREAM, NAME); \
97 function_section (DECL); \
99 ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
103 #undef ASM_FILE_START
104 #define ASM_FILE_START(STREAM) \
107 fprintf (STREAM, "%s Generated by gcc %s for MCore/pe\n", \
108 ASM_COMMENT_START, version_string); \
109 output_file_directive ((STREAM), main_input_filename); \
113 #undef ASM_OUTPUT_SOURCE_LINE
114 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
116 if (write_symbols == DBX_DEBUG) \
118 static int sym_lineno = 1; \
121 ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", sym_lineno); \
122 fprintf (FILE, ".stabn 68,0,%d,", LINE); \
123 assemble_name (FILE, buffer); \
125 assemble_name (FILE, \
126 XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
128 ASM_OUTPUT_INTERNAL_LABEL (FILE, "LM", sym_lineno); \
133 #define STARTFILE_SPEC "crt0.o%s"
134 #define ENDFILE_SPEC "%{!mno-lsim:-lsim}"
136 /* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script. */
137 #define CTOR_LISTS_DEFINED_EXTERNALLY
139 #undef DO_GLOBAL_CTORS_BODY
140 #undef DO_GLOBAL_DTORS_BODY
141 #undef INIT_SECTION_ASM_OP
142 #undef DTORS_SECTION_ASM_OP
144 #define SUPPORTS_ONE_ONLY 1
146 /* Switch into a generic section. */
147 #undef TARGET_ASM_NAMED_SECTION
148 #define TARGET_ASM_NAMED_SECTION default_pe_asm_named_section
This page took 0.039376 seconds and 5 git commands to generate.