|
|
1.1 root 1: /* Definitions of target machine for GNU compiler. Apollo 680X0 version.
2: Copyright (C) 1989 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 1, 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
19:
20: #include "tm-m68k.h"
21:
22: /* This symbol may be tested in other files for special Apollo handling */
23:
24: #define TM_APOLLO
25:
26: /* See tm-m68k.h. 7 means 68020 with 68881. */
27:
28: #ifndef TARGET_DEFAULT
29: #define TARGET_DEFAULT 7
30: #endif
31:
32: /* Target switches for the Apollo is the same as in tm-m68k.h, except
33: there is no Sun FPA. */
34:
35: #undef TARGET_SWITCHES
36: #define TARGET_SWITCHES \
37: { { "68020", 5}, \
38: { "c68020", 5}, \
39: { "68881", 2}, \
40: { "bitfield", 4}, \
41: { "68000", -5}, \
42: { "c68000", -5}, \
43: { "soft-float", -0102}, \
44: { "nobitfield", -4}, \
45: { "rtd", 8}, \
46: { "nortd", -8}, \
47: { "short", 040}, \
48: { "noshort", -040}, \
49: { "", TARGET_DEFAULT}}
50:
51: /* Define __HAVE_68881__ in preprocessor,
52: according to the -m flags.
53: This will control the use of inline 68881 insns in certain macros.
54: Also inform the program which CPU this is for. */
55:
56: #if TARGET_DEFAULT & 02
57:
58: /* -m68881 is the default */
59: #define CPP_SPEC \
60: "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\
1.1.1.3 root 61: %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
62: %{!ansi:-D_APOLLO_SOURCE}}"
1.1 root 63:
64: #else
65:
66: /* -msoft-float is the default */
67: #define CPP_SPEC \
68: "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\
1.1.1.3 root 69: %{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\
70: %{!ansi:-D_APOLLO_SOURCE}}"
1.1 root 71:
72: #endif
73:
74: /* Names to predefine in the preprocessor for this target machine. */
75: /* These are the ones defined by Apollo, plus mc68000 for uniformity with
76: GCC on other 68000 systems. */
77:
78: #define CPP_PREDEFINES "-Dapollo -Daegis -Dunix"
79:
80: /* cpp has to support a #sccs directive for the /usr/include files */
81:
82: #define SCCS_DIRECTIVE
83:
84: /* Allow #ident but output nothing for it. */
85:
86: #define IDENT_DIRECTIVE
87: #define ASM_OUTPUT_IDENT(FILE, NAME)
88:
89: /* Allow dollarsigns in identifiers */
90:
91: #define DOLLARS_IN_IDENTIFIERS 1
92:
93: /* -m68000 requires special flags to the assembler.
94: The -C flag is passed to a modified GNU assembler to cause COFF
1.1.1.2 root 95: modules to be produced. Remove it if you're not using this.
96: (See [email protected].) */
1.1 root 97:
98: #define ASM_SPEC \
99: "-C %{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
100:
101: /* STARTFILE_SPEC
102: Note that includes knowledge of the default specs for gcc, ie. no
103: args translates to the same effect as -m68881 */
104:
1.1.1.4 ! root 105: /* To get ANSI-conformant behavior, a special version of crt0.o must be used.
! 106: We use the -ansi switch to pick up that version. */
1.1 root 107:
1.1.1.4 ! root 108: #define STARTFILE_SPEC \
! 109: "%{ansi:/usr/apollo/lib/%{pg:gcrt0.o}%{!pg:%{p:mcrt0.o}%{!p:crt0.o}}}\
! 110: %{!ansi:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}"
! 111:
! 112: /* Make sure ld sets the entry point to _start.
! 113: This is in LIB_SPEC rather than LINK_SPEC because it needs to
! 114: come after _start is defined, and to eliminate the default LIB_SPEC. */
! 115: #define LIB_SPEC "-e _start"
1.1 root 116:
117: /* Debugging is not supported yet */
118:
119: #undef DBX_DEBUGGING_INFO
120: #undef SDB_DEBUGGING_INFO
121:
122: /* Every structure or union's size must be a multiple of 2 bytes. */
123:
124: #define STRUCTURE_SIZE_BOUNDARY 16
125:
126: /* Functions which return large structures get the address
127: to place the wanted value at offset 8 from the frame. */
128:
129: #undef PCC_STATIC_STRUCT_RETURN
130: #undef STRUCT_VALUE_REGNUM
131:
132: /* Caller treats address of return area like a parm. */
133: #define STRUCT_VALUE 0
134:
135: #define STRUCT_VALUE_INCOMING \
136: gen_rtx (MEM, Pmode, \
137: gen_rtx (PLUS, SImode, frame_pointer_rtx, \
138: gen_rtx (CONST_INT, VOIDmode, 8)))
139:
1.1.1.3 root 140: /* Boundary (in *bits*) on which stack pointer should be aligned. */
141: #undef STACK_BOUNDARY
142: #define STACK_BOUNDARY 32
143:
1.1 root 144: /* Specify how to pad function arguments.
1.1.1.3 root 145: Arguments are not padded at all; the stack is kept aligned on long
146: boundaries. */
1.1 root 147:
1.1.1.3 root 148: #define FUNCTION_ARG_PADDING(mode, size) none
1.1 root 149:
150: /* Short integral argument prototype promotion is not done */
151:
152: #undef PROMOTE_PROTOTYPES
153:
154: /* The definition of this macro imposes a limit on the size of
155: an aggregate object which can be treated as if it were a scalar
156: object. */
157:
158: #define MAX_FIXED_MODE_SIZE BITS_PER_WORD
159:
160: /* The definition of this macro implies that there are cases where
161: a scalar value cannot be returned in registers.
162: For Apollo, anything larger than one integer register is returned
163: using the structure-value mechanism, i.e. objects of DFmode are
164: returned that way. */
165:
166: #define RETURN_IN_MEMORY(type) \
167: (GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
168:
169: /* This is how to output a reference to a user-level label named NAME.
170: In order to link to Apollo libraries, no underscore is prepended to names.
171: `assemble_name' uses this. */
172:
173: #undef ASM_OUTPUT_LABELREF
174: #define ASM_OUTPUT_LABELREF(FILE,NAME) \
175: fprintf (FILE, "%s", NAME)
176:
177:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.