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 Intel Corp. |
---|
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 | |
---|
9 | /* |
---|
10 | This file is part of GNU CC. |
---|
11 | |
---|
12 | GNU CC is free software; you can redistribute it and/or modify |
---|
13 | it under the terms of the GNU General Public License as published by |
---|
14 | the Free Software Foundation; either version 2, or (at your option) |
---|
15 | any later version. |
---|
16 | |
---|
17 | GNU CC is distributed in the hope that it will be useful, |
---|
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
20 | GNU General Public License for more details. |
---|
21 | |
---|
22 | You should have received a copy of the GNU General Public License |
---|
23 | along with GNU CC; see the file COPYING. If not, write to |
---|
24 | the Free Software Foundation, 59 Temple Place - Suite 330, |
---|
25 | Boston, MA 02111-1307, USA. */ |
---|
26 | |
---|
27 | #include "i960/i960.h" |
---|
28 | |
---|
29 | /* Generate SDB_DEBUGGING_INFO by default. */ |
---|
30 | #undef PREFERRED_DEBUGGING_TYPE |
---|
31 | #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG |
---|
32 | |
---|
33 | #undef ASM_FILE_START |
---|
34 | #define ASM_FILE_START(FILE) \ |
---|
35 | output_file_directive ((FILE), main_input_filename) |
---|
36 | |
---|
37 | /* Support the ctors and dtors sections for g++. */ |
---|
38 | |
---|
39 | #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" |
---|
40 | #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" |
---|
41 | |
---|
42 | /* A list of other sections which the compiler might be "in" at any |
---|
43 | given time. */ |
---|
44 | |
---|
45 | #undef EXTRA_SECTIONS |
---|
46 | #define EXTRA_SECTIONS in_ctors, in_dtors |
---|
47 | |
---|
48 | /* A list of extra section function definitions. */ |
---|
49 | |
---|
50 | #undef EXTRA_SECTION_FUNCTIONS |
---|
51 | #define EXTRA_SECTION_FUNCTIONS \ |
---|
52 | CTORS_SECTION_FUNCTION \ |
---|
53 | DTORS_SECTION_FUNCTION |
---|
54 | |
---|
55 | #define CTORS_SECTION_FUNCTION \ |
---|
56 | void \ |
---|
57 | ctors_section () \ |
---|
58 | { \ |
---|
59 | if (in_section != in_ctors) \ |
---|
60 | { \ |
---|
61 | fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ |
---|
62 | in_section = in_ctors; \ |
---|
63 | } \ |
---|
64 | } |
---|
65 | |
---|
66 | #define DTORS_SECTION_FUNCTION \ |
---|
67 | void \ |
---|
68 | dtors_section () \ |
---|
69 | { \ |
---|
70 | if (in_section != in_dtors) \ |
---|
71 | { \ |
---|
72 | fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ |
---|
73 | in_section = in_dtors; \ |
---|
74 | } \ |
---|
75 | } |
---|
76 | |
---|
77 | #define INT_ASM_OP ".word" |
---|
78 | |
---|
79 | /* A C statement (sans semicolon) to output an element in the table of |
---|
80 | global constructors. */ |
---|
81 | #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ |
---|
82 | do { \ |
---|
83 | ctors_section (); \ |
---|
84 | fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ |
---|
85 | assemble_name (FILE, NAME); \ |
---|
86 | fprintf (FILE, "\n"); \ |
---|
87 | } while (0) |
---|
88 | |
---|
89 | /* A C statement (sans semicolon) to output an element in the table of |
---|
90 | global destructors. */ |
---|
91 | #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ |
---|
92 | do { \ |
---|
93 | dtors_section (); \ |
---|
94 | fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ |
---|
95 | assemble_name (FILE, NAME); \ |
---|
96 | fprintf (FILE, "\n"); \ |
---|
97 | } while (0) |
---|
98 | |
---|
99 | /* end of i960-coff.h */ |
---|