|
|
1.1 root 1: /* Definitions of target machine for GNU compiler.
2: m68k series COFF object files and debugging, version.
3: Copyright (C) 1987, 1988, 1991, 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: /* This file is included after m68k.h by CPU COFF specific files. It
22: is not a complete target itself. */
23:
24: /* Generate sdb debugging information. */
25:
26: #undef DBX_DEBUGGING_INFO
27: #define SDB_DEBUGGING_INFO
28:
29: /* Output DBX (stabs) debugging information if using -gstabs. */
30:
31: #define DBX_DEBUGGING_INFO
32:
33: #undef PREFERRED_DEBUGGING_TYPE
34: #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
35:
36: /* COFF symbols don't start with an underscore. */
37:
38: #undef USER_LABEL_PREFIX
39: #define USER_LABEL_PREFIX ""
40:
41: /* Use a prefix for local labels, just to be on the save side. */
42:
43: #undef LOCAL_LABEL_PREFIX
44: #define LOCAL_LABEL_PREFIX "."
45:
46: /* Use a register prefix to avoid clashes with external symbols (classic
47: example: `extern char PC;' in termcap). */
48:
49: #undef REGISTER_PREFIX
50: #define REGISTER_PREFIX "%"
51:
52: /* In the machine description we can't use %R, because it will not be seen
53: by ASM_FPRINTF. (Isn't that a design bug?). */
54:
55: #undef REGISTER_PREFIX_MD
56: #define REGISTER_PREFIX_MD "%%"
57:
58: /* config/m68k.md has an explicit reference to the program counter,
59: prefix this by the register prefix. */
60:
61: #define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)"
62:
63: /* Here are the new register names. */
64:
65: #undef REGISTER_NAMES
66: #ifndef SUPPORT_SUN_FPA
67: #define REGISTER_NAMES \
68: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
69: "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
70: "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }
71: #else /* SUPPORTED_SUN_FPA */
72: #define REGISTER_NAMES \
73: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
74: "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
75: "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \
76: "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \
77: "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \
78: "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \
79: "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" }
80: #endif /* defined SUPPORT_SUN_FPA */
81:
82: #undef ASM_FILE_START
83: #define ASM_FILE_START(FILE) \
84: output_file_directive ((FILE), main_input_filename)
85:
86: /* Support the ctors and dtors sections for g++. */
87:
88: #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\""
89: #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\""
90:
91: /* A list of other sections which the compiler might be "in" at any
92: given time. */
93:
94: #undef EXTRA_SECTIONS
95: #define EXTRA_SECTIONS in_ctors, in_dtors
96:
97: /* A list of extra section function definitions. */
98:
99: #undef EXTRA_SECTION_FUNCTIONS
100: #define EXTRA_SECTION_FUNCTIONS \
101: CTORS_SECTION_FUNCTION \
102: DTORS_SECTION_FUNCTION
103:
104: #define CTORS_SECTION_FUNCTION \
105: void \
106: ctors_section () \
107: { \
108: if (in_section != in_ctors) \
109: { \
110: fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
111: in_section = in_ctors; \
112: } \
113: }
114:
115: #define DTORS_SECTION_FUNCTION \
116: void \
117: dtors_section () \
118: { \
119: if (in_section != in_dtors) \
120: { \
121: fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
122: in_section = in_dtors; \
123: } \
124: }
125:
126: #define INT_ASM_OP ".long"
127:
128: /* A C statement (sans semicolon) to output an element in the table of
129: global constructors. */
130: #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
131: do { \
132: ctors_section (); \
133: fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
134: assemble_name (FILE, NAME); \
135: fprintf (FILE, "\n"); \
136: } while (0)
137:
138: /* A C statement (sans semicolon) to output an element in the table of
139: global destructors. */
140: #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
141: do { \
142: dtors_section (); \
143: fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
144: assemble_name (FILE, NAME); \
145: fprintf (FILE, "\n"); \
146: } while (0)
147:
148: /* Don't assume anything about startfiles. */
149:
150: #define STARTFILE_SPEC ""
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.