OSDN Git Service

* rtl.h (addr_diff_vec_flags): New typedef.
[pf3gnuchains/gcc-fork.git] / gcc / config / m68k / apollo68.h
1 /* Definitions of target machine for GNU compiler.  Apollo 680X0 version.
2    Copyright (C) 1989, 1992, 1996, 1997 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
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)
9 any later version.
10
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.
15
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.  */
20
21 #include "m68k/m68k.h"
22
23 /* This symbol may be tested in other files for special Apollo handling */
24
25 #define TM_APOLLO
26
27 /* See m68k.h.  7 means 68020 with 68881.  */
28
29 #ifndef TARGET_DEFAULT
30 #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
31 #endif
32
33 /* Target switches for the Apollo is the same as in m68k.h, except
34    there is no Sun FPA. */
35
36 #undef TARGET_SWITCHES
37 #define TARGET_SWITCHES  \
38   { { "68020", 5},                              \
39     { "c68020", 5},                             \
40     { "68881", 2},                              \
41     { "bitfield", 4},                           \
42     { "68000", -5},                             \
43     { "c68000", -5},                            \
44     { "soft-float", -0102},                     \
45     { "nobitfield", -4},                        \
46     { "rtd", 8},                                \
47     { "nortd", -8},                             \
48     { "short", 040},                            \
49     { "noshort", -040},                         \
50     { "", TARGET_DEFAULT}}
51
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.  */
56
57 #if TARGET_DEFAULT & MASK_68881
58
59 /* -m68881 is the default */
60 #define CPP_SPEC \
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}}"
64
65 #else
66
67 /* -msoft-float is the default */
68 #define CPP_SPEC \
69 "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\
70 %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
71 %{!ansi:-D_APOLLO_SOURCE}}"
72
73 #endif
74
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.  */
78
79 #define CPP_PREDEFINES "-Dapollo -Daegis -Dunix -Asystem(unix)  -Acpu(m68k) -Amachine(m68k)"
80
81 /* cpp has to support a #sccs directive for the /usr/include files */
82
83 #define SCCS_DIRECTIVE
84
85 /* Allow #ident but output nothing for it.  */
86
87 #define IDENT_DIRECTIVE
88 #define ASM_OUTPUT_IDENT(FILE, NAME)
89
90 /* -m68000 requires special flags to the assembler.  */
91
92 #define ASM_SPEC \
93  "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
94
95 /* STARTFILE_SPEC
96    Note that includes knowledge of the default specs for gcc, ie. no
97    args translates to the same effect as -m68881 */
98
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}}"
103 #else
104 /* -msoft-float is the default */
105 #define STARTFILE_SPEC                                  \
106   "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
107 #endif
108
109 /* Specify library to handle `-a' basic block profiling.  */
110
111 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
112 %{a:/usr/lib/bb_link.o} "
113
114 /* Debugging is not supported yet */
115
116 #undef DBX_DEBUGGING_INFO
117 #undef SDB_DEBUGGING_INFO
118
119 /* We have atexit(2).  So C++ can use it for global destructors.  */
120
121 #if 0 /* troy@cbme.unsw.edu.au says people are still using sr10.2
122          and it does not support atexit.  */
123 #define HAVE_ATEXIT
124 #endif
125
126 /* Every structure or union's size must be a multiple of 2 bytes.  */
127
128 #define STRUCTURE_SIZE_BOUNDARY 16
129
130 /* Boundary (in *bits*) on which stack pointer should be aligned.  */
131 #undef STACK_BOUNDARY
132 #define STACK_BOUNDARY 32
133
134 /* Functions which return large structures get the address
135    to place the wanted value from a hidden parameter.  */
136
137 #undef  PCC_STATIC_STRUCT_RETURN
138 #undef  STRUCT_VALUE_REGNUM
139 #define STRUCT_VALUE 0
140 #define STRUCT_VALUE_INCOMING 0
141
142 /* Specify how to pad function arguments.
143    Arguments are not padded at all; the stack is kept aligned on long
144    boundaries. */
145
146 #define FUNCTION_ARG_PADDING(mode, size) none
147
148 /* The definition of this macro imposes a limit on the size of
149    an aggregate object which can be treated as if it were a scalar
150    object.  */
151
152 #define MAX_FIXED_MODE_SIZE    BITS_PER_WORD
153
154 /* The definition of this macro implies that there are cases where
155    a scalar value cannot be returned in registers.
156    For Apollo, anything larger than one integer register is returned
157    using the structure-value mechanism, i.e. objects of DFmode are
158    returned that way. */
159
160 #define RETURN_IN_MEMORY(type) \
161   (TYPE_MODE (type) == BLKmode \
162    || GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
163
164 /* In order to link with Apollo libraries, we can't prefix external
165    symbols with an underscore.  */
166
167 #undef  USER_LABEL_PREFIX
168
169 /* Use a prefix for local labels, just to be on the save side.  */
170
171 #undef LOCAL_LABEL_PREFIX
172 #define LOCAL_LABEL_PREFIX "."
173
174 /* Use a register prefix to avoid clashes with external symbols (classic
175    example: `extern char PC;' in termcap).  */
176
177 #undef REGISTER_PREFIX
178 #define REGISTER_PREFIX "%"
179
180 /* config/m68k.md has an explicit reference to the program counter,
181    prefix this by the register prefix.  */
182
183 #define ASM_RETURN_CASE_JUMP                    \
184   do {                                          \
185     if (TARGET_5200)                            \
186       return "ext%.l %0\n\tjmp %%pc@(2,%0:l)";  \
187     else                                        \
188       return "jmp %%pc@(2,%0:w)"                \
189   } while (0)
190
191 /* Here are the new register names.  */
192
193 #undef REGISTER_NAMES
194 #ifndef SUPPORT_SUN_FPA
195 #define REGISTER_NAMES \
196 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",        \
197  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp",        \
198  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }
199 #else /* SUPPORTED_SUN_FPA */
200 #define REGISTER_NAMES \
201 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",        \
202  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp",        \
203  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7", \
204  "%fpa0", "%fpa1", "%fpa2", "%fpa3", "%fpa4", "%fpa5", "%fpa6", "%fpa7", \
205  "%fpa8", "%fpa9", "%fpa10", "%fpa11", "%fpa12", "%fpa13", "%fpa14", "%fpa15", \
206  "%fpa16", "%fpa17", "%fpa18", "%fpa19", "%fpa20", "%fpa21", "%fpa22", "%fpa23", \
207  "%fpa24", "%fpa25", "%fpa26", "%fpa27", "%fpa28", "%fpa29", "%fpa30", "%fpa31" }
208 #endif /* defined SUPPORT_SUN_FPA */