OSDN Git Service

* i386/isc.h (TARGET_DEFAULT): Define symbolicly.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / sco.h
1 /* Definitions for Intel 386 running SCO Unix System V.
2    Copyright (C) 1988, 1992, 1994, 1995 Free, 1996 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 /* Mostly it's like AT&T Unix System V. */
22
23 #include "i386/sysv3.h"
24
25 /* By default, target has a 80387, uses IEEE compatible arithmetic,
26    and returns float values in the 387, ie,
27    (TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387)
28
29    SCO's software emulation of a 387 fails to handle the `fucomp'
30    opcode.  fucomp is only used when generating IEEE compliant code.
31    So don't make TARGET_IEEE_FP default for SCO. */
32
33 #undef TARGET_DEFAULT
34 #define TARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS)
35
36 /* Let's guess that the SCO software FPU emulator can't handle
37    80-bit XFmode insns, so don't generate them.  */
38 #undef LONG_DOUBLE_TYPE_SIZE
39 #define LONG_DOUBLE_TYPE_SIZE 64
40
41 /* Use crt1.o as a startup file and crtn.o as a closing file.  */
42
43 #undef STARTFILE_SPEC
44 #define STARTFILE_SPEC \
45  "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s"
46
47 #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
48
49 /* Library spec, including SCO international language support. */
50
51 #undef LIB_SPEC
52 #define LIB_SPEC \
53  "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} %{scointl:libintl.a%s} -lc"
54
55 /* Specify predefined symbols in preprocessor.  */
56
57 #undef CPP_PREDEFINES
58 #define CPP_PREDEFINES "-Dunix -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP -Asystem(svr3)"
59
60 #undef CPP_SPEC
61 #define CPP_SPEC "%(cpp_cpu) %{scointl:-DM_INTERNAT}"
62
63 /* This spec is used for telling cpp whether char is signed or not.  */
64
65 #undef SIGNED_CHAR_SPEC
66 #if DEFAULT_SIGNED_CHAR
67 #define SIGNED_CHAR_SPEC \
68  "%{funsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
69 #else
70 #define SIGNED_CHAR_SPEC \
71  "%{!fsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
72 #endif
73
74 /* Use atexit for static destructors, instead of defining
75    our own exit function.  */
76 #define HAVE_ATEXIT
77
78 /* Specify the size_t type.  */
79 #define SIZE_TYPE "unsigned int"
80
81 #if 0 /* Not yet certain whether this is needed.  */
82 /* If no 387, use the general regs to return floating values,
83    since this system does not emulate the 80387.  */
84
85 #undef VALUE_REGNO
86 #define VALUE_REGNO(MODE) \
87   ((TARGET_80387
88      && ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode)
89    ? FIRST_FLOAT_REG : 0)
90
91 #undef HARD_REGNO_MODE_OK
92 #define HARD_REGNO_MODE_OK(REGNO, MODE)                                   \
93   ((REGNO) < 2 ? 1                                                        \
94    : (REGNO) < 4 ? 1                                                      \
95    : FP_REGNO_P (REGNO) ? ((GET_MODE_CLASS (MODE) == MODE_FLOAT           \
96                           || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \
97                          && TARGET_80387                                  \
98                          && GET_MODE_UNIT_SIZE (MODE) <= 8)               \
99    : (MODE) != QImode)
100 #endif
101
102 /* caller has to pop the extra argument passed to functions that return
103    structures. */
104
105 #undef RETURN_POPS_ARGS
106 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE)   \
107   ((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0      \
108    : (TARGET_RTD                                                \
109       && (TYPE_ARG_TYPES (FUNTYPE) == 0                         \
110           || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
111               == void_type_node))) ? (SIZE)                     \
112    : 0)
113 /* On other 386 systems, the last line looks like this:
114    : (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0)  */
115
116 /* Handle #pragma pack. */
117 #define HANDLE_SYSV_PRAGMA