OSDN Git Service

* config/i386/sol2.h (UNALIGNED_DOUBLE_INT_ASM_OP): New.
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / isa3264.h
1 /* Definitions of target machine for GNU compiler.
2    MIPS 32 and MIPS 64 version.
3    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #ifndef MIPS_ISA_DEFAULT
23 #define MIPS_ISA_DEFAULT 32
24 #endif
25
26 #ifndef MIPS_ABI_DEFAULT
27 #define MIPS_ABI_DEFAULT ABI_MEABI
28 #endif
29
30 #ifndef MIPS_ENABLE_EMBEDDED_O32
31 #define MIPS_ENABLE_EMBEDDED_O32 1
32 #endif
33
34 #ifndef PREFERRED_DEBUGGING_TYPE
35 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
36 #endif
37
38 #include "mips/elf.h"
39
40 /* This must be done after including mips.h so that the
41    ABI_{EABI,O64,O32,...} are #defined. */
42
43 #if MIPS_ABI_DEFAULT == ABI_EABI
44 #undef SUBTARGET_CPP_SIZE_SPEC
45 #define SUBTARGET_CPP_SIZE_SPEC "\
46 %{mabi=eabi|!mabi=*:\
47   %{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
48   %{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
49 %{mabi=o64:\
50  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
51  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
52 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
53 "
54 #elif MIPS_ABI_DEFAULT == ABI_O64
55 #undef SUBTARGET_CPP_SIZE_SPEC
56 #define SUBTARGET_CPP_SIZE_SPEC "\
57 %{mabi=eabi:\
58   %{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
59   %{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
60 %{mabi=o64|!mabi=*:\
61  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
62  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
63 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
64 "
65
66 #elif MIPS_ABI_DEFAULT == ABI_32
67 #if MIPS_ISA_DEFAULT == 3 || MIPS_ISA_DEFAULT == 4 || MIPS_ISA_DEFAULT == 5 || MIPS_ISA_DEFAULT == 64
68 #undef SUBTARGET_CPP_SIZE_SPEC
69 #define SUBTARGET_CPP_SIZE_SPEC "\
70 %{mabi=eabi:\
71   %{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
72   %{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
73 %{mabi=o64|!!mabi=*:\
74  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
75  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
76 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
77 "
78 #else /* not a 64bit default ISA */
79 #undef SUBTARGET_CPP_SIZE_SPEC
80 #define SUBTARGET_CPP_SIZE_SPEC "\
81 %{mabi=eabi:\
82   %{mips3|mips4|mips5|mips64|mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
83   %{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}} \
84 %{mabi=o64:\
85  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
86  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
87 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
88 %{!mabi=*:\
89  %{mips3|mips4|mips5|mips64:\
90   %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
91   %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \
92  %{!mips3:%{!mips4:%{!mips5:%{!mips64:\
93   -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \
94 "
95 #endif /* ISA */
96
97 #elif MIPS_ABI_DEFAULT == ABI_MEABI
98 /* For MEABI, don't link with crt0 files, let the linker start files specify
99    the appropriate crt0 file.  */
100 #undef  STARTFILE_SPEC
101 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0: }"
102
103 /*
104    The MIPS_ISA_DEFAULT test is for EABI, in which the size of longs depends on
105    the ISA.
106
107    For MEABI the size of longs is always 32bits.  If long64 is specified then
108    we honor that.  The errors for long64 & long32 is because while CC1 can
109    handle overriding mlong32 with mlong64 and vise-versa, the specs cannot. */
110
111 #if MIPS_ISA_DEFAULT == 3 || MIPS_ISA_DEFAULT == 4 || MIPS_ISA_DEFAULT == 5 || MIPS_ISA_DEFAULT == 64
112 #undef SUBTARGET_CPP_SIZE_SPEC
113 #define SUBTARGET_CPP_SIZE_SPEC "\
114 %{mabi=meabi:\
115   %{mips1|mips2|mips32|mlong32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
116   %{!mips1:%{!mips2:%{!mips32:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}} \
117 %{mabi=o64:\
118  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
119   %{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
120  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
121 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
122 %{mabi=meabi|!mabi=*:\
123  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
124   %{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
125  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
126 "
127
128 #else /* not a 64bit default ISA */
129 #undef SUBTARGET_CPP_SIZE_SPEC
130 #define SUBTARGET_CPP_SIZE_SPEC "\
131 %{mabi=meabi:\
132   %{mips3|mips4|mips5|mips64|mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
133   %{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}} \
134 %{mabi=o64:\
135  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
136   %{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
137  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
138 %{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
139 %{mabi=meabi|!mabi=*:\
140  %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \
141   %{mlong32:%e-mlong32 and -mlong64 can not both be specified.}} \
142  %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int }} \
143 "
144 #endif /* ISA */
145
146 #endif /* ABI */
147
148 /* eof */