1 /* Definitions of target machine for GNU compiler.
2 m68k series COFF object files and debugging, version.
3 Copyright (C) 1994, 1996 Free Software Foundation, Inc.
5 This file is part of GNU CC.
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)
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.
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. */
22 /* This file is included after m68k.h by CPU COFF specific files. It
23 is not a complete target itself. */
25 /* Generate sdb debugging information. */
27 #define SDB_DEBUGGING_INFO
29 /* Output DBX (stabs) debugging information if using -gstabs. */
33 /* COFF symbols don't start with an underscore. */
35 #undef USER_LABEL_PREFIX
36 #define USER_LABEL_PREFIX ""
38 /* Use a prefix for local labels, just to be on the save side. */
40 #undef LOCAL_LABEL_PREFIX
41 #define LOCAL_LABEL_PREFIX "."
43 /* Use a register prefix to avoid clashes with external symbols (classic
44 example: `extern char PC;' in termcap). */
46 #undef REGISTER_PREFIX
47 #define REGISTER_PREFIX "%"
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?). */
52 #undef REGISTER_PREFIX_MD
53 #define REGISTER_PREFIX_MD "%%"
55 /* config/m68k.md has an explicit reference to the program counter,
56 prefix this by the register prefix. */
58 #define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)"
60 /* Here are the new register names. */
63 #ifndef SUPPORT_SUN_FPA
64 #define REGISTER_NAMES \
65 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
66 "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
67 "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }
68 #else /* SUPPORTED_SUN_FPA */
69 #define REGISTER_NAMES \
70 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
71 "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
72 "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \
73 "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \
74 "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \
75 "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \
76 "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" }
77 #endif /* defined SUPPORT_SUN_FPA */
80 #define ASM_FILE_START(FILE) \
81 output_file_directive ((FILE), main_input_filename)
83 /* Support the ctors and dtors sections for g++. */
85 #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\""
86 #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\""
88 /* A list of other sections which the compiler might be "in" at any
92 #define EXTRA_SECTIONS in_ctors, in_dtors
94 /* A list of extra section function definitions. */
96 #undef EXTRA_SECTION_FUNCTIONS
97 #define EXTRA_SECTION_FUNCTIONS \
98 CTORS_SECTION_FUNCTION \
99 DTORS_SECTION_FUNCTION
101 #define CTORS_SECTION_FUNCTION \
105 if (in_section != in_ctors) \
107 fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
108 in_section = in_ctors; \
112 #define DTORS_SECTION_FUNCTION \
116 if (in_section != in_dtors) \
118 fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
119 in_section = in_dtors; \
123 #define INT_ASM_OP ".long"
125 /* A C statement (sans semicolon) to output an element in the table of
126 global constructors. */
127 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
130 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
131 assemble_name (FILE, NAME); \
132 fprintf (FILE, "\n"); \
135 /* A C statement (sans semicolon) to output an element in the table of
136 global destructors. */
137 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
140 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \
141 assemble_name (FILE, NAME); \
142 fprintf (FILE, "\n"); \
145 /* Don't assume anything about startfiles. */
147 #define STARTFILE_SPEC ""