OSDN Git Service

* rtl.h (addr_diff_vec_flags): New typedef.
[pf3gnuchains/gcc-fork.git] / gcc / config / m68k / coff.h
1 /* Definitions of target machine for GNU compiler.
2    m68k series COFF object files and debugging, version.
3    Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
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 /* This file is included after m68k.h by CPU COFF specific files.  It
23    is not a complete target itself.  */
24
25 /* Generate sdb debugging information.  */
26
27 #define SDB_DEBUGGING_INFO
28
29 /* Output DBX (stabs) debugging information if using -gstabs.  */
30
31 #include "dbxcoff.h"
32
33 /* COFF symbols don't start with an underscore.  */
34
35 #undef USER_LABEL_PREFIX
36 #define USER_LABEL_PREFIX ""
37
38 /* Use a prefix for local labels, just to be on the save side.  */
39
40 #undef LOCAL_LABEL_PREFIX
41 #define LOCAL_LABEL_PREFIX "."
42
43 /* Use a register prefix to avoid clashes with external symbols (classic
44    example: `extern char PC;' in termcap).  */
45
46 #undef REGISTER_PREFIX
47 #define REGISTER_PREFIX "%"
48
49 /* In the machine description we can't use %R, because it will not be seen
50    by ASM_FPRINTF.  (Isn't that a design bug?).  */
51
52 #undef REGISTER_PREFIX_MD
53 #define REGISTER_PREFIX_MD "%%"
54
55 /* config/m68k.md has an explicit reference to the program counter,
56    prefix this by the register prefix.  */
57
58 #define ASM_RETURN_CASE_JUMP                    \
59   do {                                          \
60     if (TARGET_5200)                            \
61       return "ext%.l %0\n\tjmp %%pc@(2,%0:l)";  \
62     else                                        \
63       return "jmp %%pc@(2,%0:w)";               \
64   } while (0)
65
66 /* Here are the new register names.  */
67
68 #undef REGISTER_NAMES
69 #ifndef SUPPORT_SUN_FPA
70 #define REGISTER_NAMES \
71 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",        \
72  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp",        \
73  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }
74 #else /* SUPPORTED_SUN_FPA */
75 #define REGISTER_NAMES \
76 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",        \
77  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp",        \
78  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \
79  "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \
80  "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \
81  "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \
82  "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" }
83 #endif /* defined SUPPORT_SUN_FPA */
84
85 #undef ASM_FILE_START
86 #define ASM_FILE_START(FILE) \
87   output_file_directive ((FILE), main_input_filename)
88
89 /* If defined, a C expression whose value is a string containing the
90    assembler operation to identify the following data as uninitialized global
91    data.  */
92
93 #define BSS_SECTION_ASM_OP      ".section\t.bss"
94
95 /* A C statement (sans semicolon) to output to the stdio stream
96    FILE the assembler definition of uninitialized global DECL named
97    NAME whose size is SIZE bytes and alignment is ALIGN bytes.
98    Try to use asm_output_aligned_bss to implement this macro.  */
99
100 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
101   asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
102
103 /* Support generic sections */
104
105 #undef ASM_OUTPUT_SECTION_NAME
106 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
107   fprintf((FILE), ".section\t%s,\"%c\"\n", (NAME), \
108           (DECL) && (TREE_CODE (DECL) == FUNCTION_DECL || \
109                      DECL_READONLY_SECTION (DECL, RELOC)) ? 'x' : 'd')
110
111 /* Support the ctors and dtors sections for g++.  */
112
113 #define CTORS_SECTION_ASM_OP    ".section\t.ctors,\"x\""
114 #define DTORS_SECTION_ASM_OP    ".section\t.dtors,\"x\""
115
116 /* A list of other sections which the compiler might be "in" at any
117    given time.  */
118
119 #undef EXTRA_SECTIONS
120 #define EXTRA_SECTIONS in_ctors, in_dtors
121
122 /* A list of extra section function definitions.  */
123
124 #undef EXTRA_SECTION_FUNCTIONS
125 #define EXTRA_SECTION_FUNCTIONS                                         \
126   CTORS_SECTION_FUNCTION                                                \
127   DTORS_SECTION_FUNCTION
128
129 #define CTORS_SECTION_FUNCTION                                          \
130 void                                                                    \
131 ctors_section ()                                                        \
132 {                                                                       \
133   if (in_section != in_ctors)                                           \
134     {                                                                   \
135       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);             \
136       in_section = in_ctors;                                            \
137     }                                                                   \
138 }
139
140 #define DTORS_SECTION_FUNCTION                                          \
141 void                                                                    \
142 dtors_section ()                                                        \
143 {                                                                       \
144   if (in_section != in_dtors)                                           \
145     {                                                                   \
146       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);             \
147       in_section = in_dtors;                                            \
148     }                                                                   \
149 }
150
151 #define INT_ASM_OP ".long"
152
153 /* A C statement (sans semicolon) to output an element in the table of
154    global constructors.  */
155 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
156   do {                                                                  \
157     ctors_section ();                                                   \
158     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
159     assemble_name (FILE, NAME);                                         \
160     fprintf (FILE, "\n");                                               \
161   } while (0)
162
163 /* A C statement (sans semicolon) to output an element in the table of
164    global destructors.  */
165 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
166   do {                                                                  \
167     dtors_section ();                                                   \
168     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
169     assemble_name (FILE, NAME);                                         \
170     fprintf (FILE, "\n");                                               \
171   } while (0)
172
173 /* Don't assume anything about startfiles.  */
174
175 #undef STARTFILE_SPEC
176 #define STARTFILE_SPEC ""