OSDN Git Service

(DBX_DEBUGGING_INFO): Define.
[pf3gnuchains/gcc-fork.git] / gcc / config / a29k / udi.h
1 /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU
2    running over UDI using COFF.
3    Copyright (C) 1994 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
20
21 #include "a29k/a29k.h"
22
23 /* Output DBX (stabs) debugging information if doing -gstabs.  */
24
25 #define DBX_DEBUGGING_INFO
26
27 /* Generate SDB debugging information by default. */
28
29 #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
30
31 /* Support the ctors and dtors sections for g++.  */
32
33 #define CTORS_SECTION_ASM_OP    "\t.use .ctors"
34 #define DTORS_SECTION_ASM_OP    "\t.use .dtors"
35
36 /* A list of other sections which the compiler might be "in" at any
37    given time.  */
38
39 #undef EXTRA_SECTIONS
40 #define EXTRA_SECTIONS readonly_data, in_ctors, in_dtors
41
42 /* A list of extra section function definitions.  */
43
44 #undef EXTRA_SECTION_FUNCTIONS
45 #define EXTRA_SECTION_FUNCTIONS                                         \
46   READONLY_DATA_FUNCTION                                                \
47   CTORS_SECTION_FUNCTION                                                \
48   DTORS_SECTION_FUNCTION
49
50 #define READONLY_DATA_FUNCTION                                  \
51 void                                                            \
52 literal_section ()                                              \
53 {                                                               \
54   if (in_section != readonly_data)                              \
55     {                                                           \
56       fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \
57       in_section = readonly_data;                               \
58     }                                                           \
59 }                                                               \
60
61 #define CTORS_SECTION_FUNCTION                                          \
62 void                                                                    \
63 ctors_section ()                                                        \
64 {                                                                       \
65   if (in_section != in_ctors)                                           \
66     {                                                                   \
67       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);             \
68       in_section = in_ctors;                                            \
69     }                                                                   \
70 }
71
72 #define DTORS_SECTION_FUNCTION                                          \
73 void                                                                    \
74 dtors_section ()                                                        \
75 {                                                                       \
76   if (in_section != in_dtors)                                           \
77     {                                                                   \
78       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);             \
79       in_section = in_dtors;                                            \
80     }                                                                   \
81 }
82
83 #define INT_ASM_OP ".word"
84
85 /* A C statement (sans semicolon) to output an element in the table of
86    global constructors.  */
87 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
88   do {                                                                  \
89     ctors_section ();                                                   \
90     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
91     assemble_name (FILE, NAME);                                         \
92     fprintf (FILE, "\n");                                               \
93   } while (0)
94
95 /* A C statement (sans semicolon) to output an element in the table of
96    global destructors.  */
97 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
98   do {                                                                  \
99     dtors_section ();                                                   \
100     fprintf (FILE, "\t%s\t ", INT_ASM_OP);                              \
101     assemble_name (FILE, NAME);                                         \
102     fprintf (FILE, "\n");                                               \
103   } while (0)