1 /* Definitions of target machine for GNU compiler. Apollo 680X0 version.
2 Copyright (C) 1989, 1992, 1996, 1997, 1999 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #include "m68k/m68k.h"
23 /* This symbol may be tested in other files for special Apollo handling */
27 /* See m68k.h. 7 means 68020 with 68881. */
29 #ifndef TARGET_DEFAULT
30 #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
33 /* Target switches for the Apollo is the same as in m68k.h, except
34 there is no Sun FPA. */
36 #undef TARGET_SWITCHES
37 #define TARGET_SWITCHES \
44 { "soft-float", -0102}, \
45 { "nobitfield", -4}, \
50 { "", TARGET_DEFAULT}}
52 /* Define __HAVE_68881__ in preprocessor,
53 according to the -m flags.
54 This will control the use of inline 68881 insns in certain macros.
55 Also inform the program which CPU this is for. */
57 #if TARGET_DEFAULT & MASK_68881
59 /* -m68881 is the default */
61 "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\
62 %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
63 %{!ansi:-D_APOLLO_SOURCE}}"
67 /* -msoft-float is the default */
69 "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\
70 %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
71 %{!ansi:-D_APOLLO_SOURCE}}"
75 /* Names to predefine in the preprocessor for this target machine. */
76 /* These are the ones defined by Apollo, plus mc68000 for uniformity with
77 GCC on other 68000 systems. */
79 #define CPP_PREDEFINES "-Dapollo -Daegis -Dunix -Asystem(unix) -Acpu(m68k) -Amachine(m68k)"
81 /* cpp has to support a #sccs directive for the /usr/include files */
83 #define SCCS_DIRECTIVE
85 /* Allow #ident but output nothing for it. */
87 #define IDENT_DIRECTIVE
88 #define ASM_OUTPUT_IDENT(FILE, NAME)
90 /* -m68000 requires special flags to the assembler. */
93 "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
96 Note that includes knowledge of the default specs for gcc, ie. no
97 args translates to the same effect as -m68881 */
99 #if TARGET_DEFAULT & MASK_68881
100 /* -m68881 is the default */
101 #define STARTFILE_SPEC \
102 "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
104 /* -msoft-float is the default */
105 #define STARTFILE_SPEC \
106 "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
109 /* Specify library to handle `-a' basic block profiling. */
111 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
112 %{a:/usr/lib/bb_link.o} "
114 /* Debugging is not supported yet */
116 #undef DBX_DEBUGGING_INFO
117 #undef SDB_DEBUGGING_INFO
119 /* troy@cbme.unsw.edu.au says people are still using sr10.2
120 and it does not support atexit. */
123 /* Every structure or union's size must be a multiple of 2 bytes. */
125 #define STRUCTURE_SIZE_BOUNDARY 16
127 /* Boundary (in *bits*) on which stack pointer should be aligned. */
128 #undef STACK_BOUNDARY
129 #define STACK_BOUNDARY 32
131 /* Functions which return large structures get the address
132 to place the wanted value from a hidden parameter. */
134 #undef PCC_STATIC_STRUCT_RETURN
135 #undef STRUCT_VALUE_REGNUM
136 #define STRUCT_VALUE 0
137 #define STRUCT_VALUE_INCOMING 0
139 /* Specify how to pad function arguments.
140 Arguments are not padded at all; the stack is kept aligned on long
143 #define FUNCTION_ARG_PADDING(mode, size) none
145 /* The definition of this macro imposes a limit on the size of
146 an aggregate object which can be treated as if it were a scalar
149 #define MAX_FIXED_MODE_SIZE BITS_PER_WORD
151 /* The definition of this macro implies that there are cases where
152 a scalar value cannot be returned in registers.
153 For Apollo, anything larger than one integer register is returned
154 using the structure-value mechanism, i.e. objects of DFmode are
155 returned that way. */
157 #define RETURN_IN_MEMORY(type) \
158 (TYPE_MODE (type) == BLKmode \
159 || GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
161 /* In order to link with Apollo libraries, we can't prefix external
162 symbols with an underscore. */
164 #undef USER_LABEL_PREFIX
166 /* Use a prefix for local labels, just to be on the save side. */
168 #undef LOCAL_LABEL_PREFIX
169 #define LOCAL_LABEL_PREFIX "."
171 /* Use a register prefix to avoid clashes with external symbols (classic
172 example: `extern char PC;' in termcap). */
174 #undef REGISTER_PREFIX
175 #define REGISTER_PREFIX "%"
177 /* config/m68k.md has an explicit reference to the program counter,
178 prefix this by the register prefix. */
180 #define ASM_RETURN_CASE_JUMP \
183 return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \
185 return "jmp %%pc@(2,%0:w)" \
188 /* Here are the new register names. */
190 #undef REGISTER_NAMES
191 #ifndef SUPPORT_SUN_FPA
192 #define REGISTER_NAMES \
193 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
194 "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
195 "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }
196 #else /* SUPPORTED_SUN_FPA */
197 #define REGISTER_NAMES \
198 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
199 "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
200 "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \
201 "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \
202 "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \
203 "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \
204 "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" }
205 #endif /* defined SUPPORT_SUN_FPA */