1 /* Definitions of target machine for GNU compiler. Sun 2 running SunOS 4.
2 Copyright (C) 1987, 1988, 1993, 1996, 1997 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/sun2.h"
24 /* Define __HAVE_SKY__ in preprocessor, according to the -m flags.
25 Also inform the program which CPU this is for. */
30 #define PTRDIFF_TYPE "int"
32 #define SIZE_TYPE "int"
34 #define WCHAR_TYPE "short unsigned int"
35 #undef WCHAR_TYPE_SIZE
36 #define WCHAR_TYPE_SIZE 16
38 #if TARGET_DEFAULT & MASK_SKY
40 /* -msky is the default */
42 "%{!msoft-float:-D__HAVE_SKY__}\
43 %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}"
47 /* -msoft-float is the default */
49 "%{msky:-D__HAVE_SKY__ }\
50 %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}"
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) */
61 #if TARGET_DEFAULT & MASK_SKY
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}"
68 /* -msoft-float is the default */
69 #define STARTFILE_SPEC \
70 "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}} \
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. */
81 #if TARGET_DEFAULT & MASK_SKY
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}"
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}"
97 "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}"
99 #undef ASM_OUTPUT_FLOAT_OPERAND
100 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
105 REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
106 if (sizeof (int) == sizeof (long)) \
107 asm_fprintf ((FILE), "%I0x%x", (int) l); \
109 asm_fprintf ((FILE), "%I0x%lx", l); \
111 else if (REAL_VALUE_ISINF (VALUE)) \
113 if (REAL_VALUE_NEGATIVE (VALUE)) \
114 fprintf (FILE, "#0r-99e999"); \
116 fprintf (FILE, "#0r99e999"); \
118 else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
120 fprintf (FILE, "#0r-0.0"); \
124 REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
125 fprintf (FILE, "#0r%s", dstr); \
129 #undef ASM_OUTPUT_DOUBLE_OPERAND
130 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
131 do { if (REAL_VALUE_ISINF (VALUE)) \
133 if (REAL_VALUE_NEGATIVE (VALUE)) \
134 fprintf (FILE, "#0r-99e999"); \
136 fprintf (FILE, "#0r99e999"); \
138 else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
140 fprintf (FILE, "#0r-0.0"); \
144 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
145 fprintf (FILE, "#0r%s", dstr); \