OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [config/] [sparc/] [sol2-bi.h] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Definitions of target machine for GCC, for bi-arch SPARC
2
   running Solaris 2 using the system assembler and linker.  */
3
 
4
/* The default code model used to be CM_MEDANY on Solaris
5
   but even Sun eventually found it to be quite wasteful
6
   and changed it to CM_MEDMID in the Studio 9 compiler.  */
7
#undef SPARC_DEFAULT_CMODEL
8
#define SPARC_DEFAULT_CMODEL CM_MEDMID
9
 
10
#define AS_SPARC64_FLAG "-xarch=v9"
11
 
12
#undef ASM_CPU32_DEFAULT_SPEC
13
#define ASM_CPU32_DEFAULT_SPEC  ""
14
#undef ASM_CPU64_DEFAULT_SPEC
15
#define ASM_CPU64_DEFAULT_SPEC  AS_SPARC64_FLAG
16
 
17
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9
18
#undef CPP_CPU64_DEFAULT_SPEC
19
#define CPP_CPU64_DEFAULT_SPEC ""
20
#undef ASM_CPU32_DEFAULT_SPEC
21
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plus"
22
#endif
23
 
24
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
25
#undef CPP_CPU64_DEFAULT_SPEC
26
#define CPP_CPU64_DEFAULT_SPEC ""
27
#undef ASM_CPU32_DEFAULT_SPEC
28
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusa"
29
#undef ASM_CPU64_DEFAULT_SPEC
30
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a"
31
#endif
32
 
33
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
34
#undef CPP_CPU64_DEFAULT_SPEC
35
#define CPP_CPU64_DEFAULT_SPEC ""
36
#undef ASM_CPU32_DEFAULT_SPEC
37
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusb"
38
#undef ASM_CPU64_DEFAULT_SPEC
39
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "b"
40
#endif
41
 
42
#if DEFAULT_ARCH32_P
43
#define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
44
#define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
45
#else
46
#define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}"
47
#define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}"
48
#endif
49
 
50
#undef CPP_CPU_SPEC
51
#define CPP_CPU_SPEC "\
52
%{mcypress:} \
53
%{msparclite|mf930|mf934:-D__sparclite__} \
54
%{mv8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
55
%{msupersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
56
%{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} \
57
%{mcpu=sparclite|mcpu-f930|mcpu=f934:-D__sparclite__} \
58
%{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
59
%{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
60
%{mcpu=v9|mcpu=ultrasparc|mcpu=ultrasparc3:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
61
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
62
"
63
 
64
#undef ASM_CPU_SPEC
65
#define ASM_CPU_SPEC "\
66
%{mcpu=v9:" DEF_ARCH32_SPEC("-xarch=v8plus") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "} \
67
%{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-xarch=v8plusa") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "a") "} \
68
%{mcpu=ultrasparc3:" DEF_ARCH32_SPEC("-xarch=v8plusb") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "b") "} \
69
%{!mcpu=ultrasparc3:%{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:" DEF_ARCH32_SPEC("-xarch=v8") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "}}}} \
70
%{!mcpu*:%(asm_cpu_default)} \
71
"
72
 
73
#undef CPP_CPU_DEFAULT_SPEC
74
#define CPP_CPU_DEFAULT_SPEC \
75
(DEFAULT_ARCH32_P ? "\
76
%{m64:" CPP_CPU64_DEFAULT_SPEC "} \
77
%{!m64:" CPP_CPU32_DEFAULT_SPEC "} \
78
" : "\
79
%{m32:" CPP_CPU32_DEFAULT_SPEC "} \
80
%{!m32:" CPP_CPU64_DEFAULT_SPEC "} \
81
")
82
 
83
#undef ASM_CPU_DEFAULT_SPEC
84
#define ASM_CPU_DEFAULT_SPEC \
85
(DEFAULT_ARCH32_P ? "\
86
%{m64:" ASM_CPU64_DEFAULT_SPEC "} \
87
%{!m64:" ASM_CPU32_DEFAULT_SPEC "} \
88
" : "\
89
%{m32:" ASM_CPU32_DEFAULT_SPEC "} \
90
%{!m32:" ASM_CPU64_DEFAULT_SPEC "} \
91
")
92
 
93
/* wchar_t is called differently in <wchar.h> for 32 and 64-bit
94
   compilations.  This is called for by SCD 2.4.1, p. 6-83, Figure 6-65
95
   (32-bit) and p. 6P-10, Figure 6.38 (64-bit).  */
96
 
97
#undef WCHAR_TYPE
98
#define WCHAR_TYPE (TARGET_ARCH64 ? "int" : "long int")
99
 
100
#undef WCHAR_TYPE_SIZE
101
#define WCHAR_TYPE_SIZE 32
102
 
103
/* Same for wint_t.  See SCD 2.4.1, p. 6-83, Figure 6-66 (32-bit).  There's
104
   no corresponding 64-bit definition, but this is what Solaris 8
105
   <iso/wchar_iso.h> uses.  */
106
 
107
#undef WINT_TYPE
108
#define WINT_TYPE (TARGET_ARCH64 ? "int" : "long int")
109
 
110
#undef WINT_TYPE_SIZE
111
#define WINT_TYPE_SIZE 32
112
 
113
#undef CPP_ARCH32_SPEC
114
#define CPP_ARCH32_SPEC ""
115
#undef CPP_ARCH64_SPEC
116
#define CPP_ARCH64_SPEC "-D__arch64__ -D__sparcv9"
117
 
118
#undef CPP_ARCH_SPEC
119
#define CPP_ARCH_SPEC "\
120
%{m32:%(cpp_arch32)} \
121
%{m64:%(cpp_arch64)} \
122
%{!m32:%{!m64:%(cpp_arch_default)}} \
123
"
124
 
125
#undef ASM_ARCH_SPEC
126
#define ASM_ARCH_SPEC ""
127
 
128
#undef ASM_ARCH32_SPEC
129
#define ASM_ARCH32_SPEC ""
130
 
131
#undef ASM_ARCH64_SPEC
132
#define ASM_ARCH64_SPEC ""
133
 
134
#undef ASM_ARCH_DEFAULT_SPEC
135
#define ASM_ARCH_DEFAULT_SPEC ""
136
 
137
#undef SUBTARGET_EXTRA_SPECS
138
#define SUBTARGET_EXTRA_SPECS \
139
  { "startfile_arch",    STARTFILE_ARCH_SPEC },           \
140
  { "link_arch32",       LINK_ARCH32_SPEC },              \
141
  { "link_arch64",       LINK_ARCH64_SPEC },              \
142
  { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },        \
143
  { "link_arch",         LINK_ARCH_SPEC },
144
 
145
/*
146
 * This should be the same as in sol2.h, except with "/sparcv9"
147
 * appended to the paths and /usr/ccs/lib is no longer necessary
148
 */
149
#define LINK_ARCH64_SPEC_BASE \
150
  "%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
151
   %{G:-G} \
152
   %{YP,*} \
153
   %{R*} \
154
   %{compat-bsd: \
155
     %{!YP,*:%{p|pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
156
       %{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} \
157
     -R /usr/ucblib/sparcv9} \
158
   %{!compat-bsd: \
159
     %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
160
       %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}"
161
 
162
#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
163
 
164
#undef LINK_ARCH_SPEC
165
#if DISABLE_MULTILIB
166
#if DEFAULT_ARCH32_P
167
#define LINK_ARCH_SPEC "\
168
%{m32:%(link_arch32)} \
169
%{m64:%edoes not support multilib} \
170
%{!m32:%{!m64:%(link_arch_default)}} \
171
"
172
#else
173
#define LINK_ARCH_SPEC "\
174
%{m32:%edoes not support multilib} \
175
%{m64:%(link_arch64)} \
176
%{!m32:%{!m64:%(link_arch_default)}} \
177
"
178
#endif
179
#else
180
#define LINK_ARCH_SPEC "\
181
%{m32:%(link_arch32)} \
182
%{m64:%(link_arch64)} \
183
%{!m32:%{!m64:%(link_arch_default)}} \
184
"
185
#endif
186
 
187
#define LINK_ARCH_DEFAULT_SPEC \
188
(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
189
 
190
#undef  CC1_SPEC
191
#if DEFAULT_ARCH32_P
192
#define CC1_SPEC "\
193
%{sun4:} %{target:} \
194
%{mcypress:-mcpu=cypress} \
195
%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
196
%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
197
%{m32:%{m64:%emay not use both -m32 and -m64}} \
198
%{m64:-mptr64 -mstack-bias -mno-v8plus \
199
  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8*:%{!msupersparc:-mcpu=v9}}}}}}}} \
200
"
201
#else
202
#define CC1_SPEC "\
203
%{sun4:} %{target:} \
204
%{mcypress:-mcpu=cypress} \
205
%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
206
%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
207
%{m32:%{m64:%emay not use both -m32 and -m64}} \
208
%{m32:-mptr32 -mno-stack-bias \
209
  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8*:%{!msupersparc:-mcpu=cypress}}}}}}}} \
210
%{mv8plus:-m32 -mptr32 -mno-stack-bias \
211
  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=v9}}}}}}}} \
212
"
213
#endif
214
 
215
/* Support for a compile-time default CPU, et cetera.  The rules are:
216
   --with-cpu is ignored if -mcpu is specified.
217
   --with-tune is ignored if -mtune is specified.
218
   --with-float is ignored if -mhard-float, -msoft-float, -mfpu, or -mno-fpu
219
     are specified.
220
   In the SPARC_BI_ARCH compiler we cannot pass %{!mcpu=*:-mcpu=%(VALUE)}
221
   here, otherwise say -mcpu=v7 would be passed even when -m64.
222
   CC1_SPEC above takes care of this instead.  */
223
#undef OPTION_DEFAULT_SPECS
224
#if DEFAULT_ARCH32_P
225
#define OPTION_DEFAULT_SPECS \
226
  {"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
227
  {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
228
  {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
229
#else
230
#define OPTION_DEFAULT_SPECS \
231
  {"cpu", "%{!m32:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
232
  {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
233
  {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" }
234
#endif
235
 
236
#if DEFAULT_ARCH32_P
237
#define MULTILIB_DEFAULTS { "m32" }
238
#else
239
#define MULTILIB_DEFAULTS { "m64" }
240
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.