]> gcc.gnu.org Git - gcc.git/blob - gcc/config/mcore/mcore-pe.h
chorus.h: Consistently define *_DEBUGGING_INFO with the value 1.
[gcc.git] / 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).
4
5 This file is part of GNU CC.
6
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)
10 any later version.
11
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.
16
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. */
21
22 /* Run-time Target Specification. */
23 #define TARGET_VERSION fputs (" (MCORE/pe)", stderr)
24
25 #define SUBTARGET_CPP_PREDEFINES " -D__pe__"
26
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}"
30
31 #include "svr3.h"
32 #include "mcore/mcore.h"
33 #include "dbxcoff.h"
34
35 #undef SDB_DEBUGGING_INFO
36 #define DBX_DEBUGGING_INFO 1
37
38 /* Computed in toplev.c. */
39 #undef PREFERRED_DEBUGGING_TYPE
40
41 /* Lay out additional 'sections' where we place things like code
42 and readonly data. This gets them out of default places. */
43
44 #define SUBTARGET_SWITCH_SECTIONS \
45 case in_drectve: drectve_section (); break;
46
47 #define DRECTVE_SECTION_ASM_OP "\t.section .drectve"
48 #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata"
49
50 #define SUBTARGET_EXTRA_SECTIONS in_drectve
51
52 #define SUBTARGET_EXTRA_SECTION_FUNCTIONS \
53 DRECTVE_SECTION_FUNCTION
54
55 #define DRECTVE_SECTION_FUNCTION \
56 void \
57 drectve_section () \
58 { \
59 if (in_section != in_drectve) \
60 { \
61 fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP); \
62 in_section = in_drectve; \
63 } \
64 }
65
66 #define MCORE_EXPORT_NAME(STREAM, NAME) \
67 do \
68 { \
69 drectve_section (); \
70 fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \
71 (* targetm.strip_name_encoding) (NAME)); \
72 } \
73 while (0);
74
75 /* Output the label for an initialized variable. */
76 #undef ASM_DECLARE_OBJECT_NAME
77 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
78 do \
79 { \
80 if (mcore_dllexport_name_p (NAME)) \
81 { \
82 enum in_section save_section = in_section; \
83 MCORE_EXPORT_NAME (STREAM, NAME); \
84 switch_to_section (save_section, (DECL)); \
85 } \
86 ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
87 } \
88 while (0)
89
90 /* Output a function label definition. */
91 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
92 do \
93 { \
94 if (mcore_dllexport_name_p (NAME)) \
95 { \
96 MCORE_EXPORT_NAME (STREAM, NAME); \
97 function_section (DECL); \
98 } \
99 ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
100 } \
101 while (0);
102
103 #undef ASM_FILE_START
104 #define ASM_FILE_START(STREAM) \
105 do \
106 { \
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); \
110 } \
111 while (0)
112
113 #undef ASM_OUTPUT_SOURCE_LINE
114 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
115 { \
116 if (write_symbols == DBX_DEBUG) \
117 { \
118 static int sym_lineno = 1; \
119 char buffer[256]; \
120 \
121 ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", sym_lineno); \
122 fprintf (FILE, ".stabn 68,0,%d,", LINE); \
123 assemble_name (FILE, buffer); \
124 putc ('-', FILE); \
125 assemble_name (FILE, \
126 XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
127 putc ('\n', FILE); \
128 ASM_OUTPUT_INTERNAL_LABEL (FILE, "LM", sym_lineno); \
129 sym_lineno ++; \
130 } \
131 }
132
133 #define STARTFILE_SPEC "crt0.o%s"
134 #define ENDFILE_SPEC "%{!mno-lsim:-lsim}"
135
136 /* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script. */
137 #define CTOR_LISTS_DEFINED_EXTERNALLY
138
139 #undef DO_GLOBAL_CTORS_BODY
140 #undef DO_GLOBAL_DTORS_BODY
141 #undef INIT_SECTION_ASM_OP
142 #undef DTORS_SECTION_ASM_OP
143
144 #define SUPPORTS_ONE_ONLY 1
145
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.