|
|
1.1 root 1: /* Definitions of target machine for GNU compiler. Sun 2 running Sunos 4.
2: Copyright (C) 1987, 1988, 1993 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
1.1.1.2 ! root 18: the Free Software Foundation, 59 Temple Place - Suite 330,
! 19: Boston, MA 02111-1307, USA. */
1.1 root 20:
21: #include "m68k/sun2.h"
22:
23:
24: /* Define __HAVE_SKY__ in preprocessor, according to the -m flags.
25: Also inform the program which CPU this is for. */
26:
27: #undef CPP_SPEC
28:
29: #undef PTRDIFF_TYPE
30: #define PTRDIFF_TYPE "int"
31: #undef SIZE_TYPE
32: #define SIZE_TYPE "int"
33: #undef WCHAR_TYPE
34: #define WCHAR_TYPE "short unsigned int"
35: #undef WCHAR_TYPE_SIZE
36: #define WCHAR_TYPE_SIZE 16
37:
38: #if TARGET_DEFAULT & 0200
39:
40: /* -msky is the default */
41: #define CPP_SPEC \
42: "%{!msoft-float:-D__HAVE_SKY__}\
43: %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}"
44:
45: #else
46:
47: /* -msoft-float is the default */
48: #define CPP_SPEC \
49: "%{msky:-D__HAVE_SKY__ }\
50: %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}"
51:
52: #endif
53:
54: /* STARTFILE_SPEC to include sun floating point initialization
55: This is necessary (tr: Sun does it) for the sky routines.
56: I'm not sure what would happen below if people gave contradictory
57: arguments (eg. -msoft-float -mfpa) */
58:
59: #undef STARTFILE_SPEC
60:
61: #if TARGET_DEFAULT & 0200
62: /* -msky is the default */
63: #define STARTFILE_SPEC \
64: "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}} \
65: %{msoft-float:Fcrt1.o%s} \
66: %{!msoft-float:Scrt1.o%s}"
67: #else
68: /* -msoft-float is the default */
69: #define STARTFILE_SPEC \
70: "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}} \
71: %{msky:Scrt1.o%s} \
72: %{!msky:Fcrt1.o%s}"
73: #endif
74:
75: /* Specify library to handle `-a' basic block profiling.
76: Control choice of libm.a (if user says -lm)
77: based on fp arith default and options. */
78:
79: #undef LIB_SPEC
80:
81: #if TARGET_DEFAULT & 0200
82: /* -msky is the default */
83: #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
84: %{a:/usr/lib/bb_link.o -lc} %{g:-lg} \
85: %{msoft-float:-L/usr/lib/fsoft} \
86: %{!msoft_float:-L/usr/lib/fsky}"
87: #else
88: /* -msoft-float is the default */
89: #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
90: %{a:/usr/lib/bb_link.o -lc} %{g:-lg} \
91: %{!msky:-L/usr/lib/fsoft} \
92: %{msky:-L/usr/lib/ffpa}"
93: #endif
94:
95: #undef LINK_SPEC
96: #define LINK_SPEC \
97: "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}"
98:
99: #undef ASM_OUTPUT_DOUBLE
100: #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
101: do { if (REAL_VALUE_ISINF (VALUE)) \
102: { \
103: if (REAL_VALUE_NEGATIVE (VALUE)) \
104: fprintf (FILE, "\t.double 0r-99e999\n"); \
105: else \
106: fprintf (FILE, "\t.double 0r99e999\n"); \
107: } \
108: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
109: { \
110: fprintf (FILE, "\t.long 0x80000000,0\n"); \
111: } \
112: else \
113: { char dstr[30]; \
114: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
115: fprintf (FILE, "\t.double 0r%s\n", dstr); \
116: } \
117: } while (0)
118:
119: /* This is how to output an assembler line defining a `float' constant. */
120:
121: #undef ASM_OUTPUT_FLOAT
122: #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
123: do { if (REAL_VALUE_ISINF (VALUE)) \
124: { \
125: if (REAL_VALUE_NEGATIVE (VALUE)) \
126: fprintf (FILE, "\t.single 0r-99e999\n"); \
127: else \
128: fprintf (FILE, "\t.single 0r99e999\n"); \
129: } \
130: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
131: { \
132: fprintf (FILE, "\t.long 0x80000000\n"); \
133: } \
134: else \
135: { char dstr[30]; \
136: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
137: fprintf (FILE, "\t.single 0r%s\n", dstr); \
138: } \
139: } while (0)
140:
141: #undef ASM_OUTPUT_FLOAT_OPERAND
142: #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
143: do { \
144: if (CODE != 'f') \
145: { \
146: long l; \
147: REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
148: if (sizeof (int) == sizeof (long)) \
149: asm_fprintf ((FILE), "%I0x%x", l); \
150: else \
151: asm_fprintf ((FILE), "%I0x%lx", l); \
152: } \
153: else if (REAL_VALUE_ISINF (VALUE)) \
154: { \
155: if (REAL_VALUE_NEGATIVE (VALUE)) \
156: fprintf (FILE, "#0r-99e999"); \
157: else \
158: fprintf (FILE, "#0r99e999"); \
159: } \
160: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
161: { \
162: fprintf (FILE, "#0r-0.0"); \
163: } \
164: else \
165: { char dstr[30]; \
166: REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
167: fprintf (FILE, "#0r%s", dstr); \
168: } \
169: } while (0)
170:
171: #undef ASM_OUTPUT_DOUBLE_OPERAND
172: #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
173: do { if (REAL_VALUE_ISINF (VALUE)) \
174: { \
175: if (REAL_VALUE_NEGATIVE (VALUE)) \
176: fprintf (FILE, "#0r-99e999"); \
177: else \
178: fprintf (FILE, "#0r99e999"); \
179: } \
180: else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
181: { \
182: fprintf (FILE, "#0r-0.0"); \
183: } \
184: else \
185: { char dstr[30]; \
186: REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
187: fprintf (FILE, "#0r%s", dstr); \
188: } \
189: } while (0)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.