OSDN Git Service

* configure.in (m68*-*-rtemscoff*): New target, formal name for
[pf3gnuchains/gcc-fork.git] / gcc / config / i960 / i960-coff.h
1 /* Definitions of target machine for GNU compiler, for "naked" Intel
2    80960 using coff object format and coff debugging symbols.
3    Copyright (C) 1988, 1989, 1991, 1996 Free Software Foundation.
4    Contributed by Steven McGeady (mcg@omepd.intel.com)
5    Additional work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson
6    Converted to GCC 2.0 by Michael Tiemann, Cygnus Support.
7
8 This file is part of GNU CC.
9
10 GNU CC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 GNU CC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with GNU CC; see the file COPYING.  If not, write to
22 the Free Software Foundation, 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA.  */
24
25 /* Support -gstabs using stabs in COFF sections.  */
26
27 /* Generate SDB_DEBUGGING_INFO by default.  */
28 #undef PREFERRED_DEBUGGING_TYPE
29 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
30
31 /* This is intended to be used with Cygnus's newlib library, so we want to
32    use the standard definition of LIB_SPEC.  */
33 #undef LIB_SPEC
34
35 #undef ASM_FILE_START
36 #define ASM_FILE_START(FILE) \
37   output_file_directive ((FILE), main_input_filename)
38
39 /* Support the ctors and dtors sections for g++.  */
40
41 #define CTORS_SECTION_ASM_OP    ".section\t.ctors,\"x\""
42 #define DTORS_SECTION_ASM_OP    ".section\t.dtors,\"x\""
43
44 /* A list of other sections which the compiler might be "in" at any
45    given time.  */
46
47 #undef EXTRA_SECTIONS
48 #define EXTRA_SECTIONS in_ctors, in_dtors
49
50 /* A list of extra section function definitions.  */
51
52 #undef EXTRA_SECTION_FUNCTIONS
53 #define EXTRA_SECTION_FUNCTIONS                                         \
54   CTORS_SECTION_FUNCTION                                                \
55   DTORS_SECTION_FUNCTION
56
57 #define CTORS_SECTION_FUNCTION                                          \
58 void                                                                    \
59 ctors_section ()                                                        \
60 {                                                                       \
61   if (in_section != in_ctors)                                           \
62     {                                                                   \
63       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);             \
64       in_section = in_ctors;                                            \
65     }                                                                   \
66 }
67
68 #define DTORS_SECTION_FUNCTION                                          \
69 void                                                                    \
70 dtors_section ()                                                        \
71 {                                                                       \
72   if (in_section != in_dtors)                                           \
73     {                                                                   \
74       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);             \
75       in_section = in_dtors;                                            \
76     }                                                                   \
77 }
78
79 #define INT_ASM_OP ".word"
80
81 /* A C statement (sans semicolon) to output an element in the table of
82    global constructors.  */
83 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
84   do {                                                                  \
85     ctors_section ();                                                   \
86     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
87     assemble_name (FILE, NAME);                                         \
88     fprintf (FILE, "\n");                                               \
89   } while (0)
90
91 /* A C statement (sans semicolon) to output an element in the table of
92    global destructors.  */
93 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
94   do {                                                                  \
95     dtors_section ();                                                   \
96     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
97     assemble_name (FILE, NAME);                                         \
98     fprintf (FILE, "\n");                                               \
99   } while (0)
100
101 /* end of i960-coff.h */