comparison dmd/mtype.c @ 243:4d006f7b2ada trunk

[svn r260] Changed some of the LLVMDC specific code in the Tango core and did some minor cleanups.
author lindquist
date Mon, 09 Jun 2008 03:02:14 +0200
parents 0806379a5eca
children d9d5d59873d8
comparison
equal deleted inserted replaced
242:ab43d1e1bf2a 243:4d006f7b2ada
221 basic[basetab[i]] = new TypeBasic(basetab[i]); 221 basic[basetab[i]] = new TypeBasic(basetab[i]);
222 basic[Terror] = basic[Tint32]; 222 basic[Terror] = basic[Tint32];
223 223
224 tvoidptr = tvoid->pointerTo(); 224 tvoidptr = tvoid->pointerTo();
225 225
226 // set size_t / ptrdiff_t types
226 if (global.params.is64bit) 227 if (global.params.is64bit)
227 { 228 {
228 PTRSIZE = 8; 229 Tsize_t = Tuns64;
229 #if !IN_LLVM 230 Tptrdiff_t = Tint64;
230 if (global.params.isLinux) 231 }
231 REALSIZE = 10; 232 else
232 else 233 {
233 REALSIZE = 8; 234 Tsize_t = Tuns32;
234 #else 235 Tptrdiff_t = Tint32;
236 }
237
238 // set real size and padding
239 if (global.params.useFP80)
240 {
241 REALSIZE = 12;
242 REALPAD = 2;
243 }
244 else
245 {
235 REALSIZE = 8; 246 REALSIZE = 8;
236 REALPAD = 0; 247 REALPAD = 0;
237 #endif
238 Tsize_t = Tuns64;
239 Tptrdiff_t = Tint64;
240 }
241 else
242 {
243 PTRSIZE = 4;
244 #if IN_LLVM
245 REALSIZE = 8;
246 REALPAD = 0;
247 #elif TARGET_LINUX
248 REALSIZE = 12;
249 REALPAD = 2;
250 #else
251 REALSIZE = 10;
252 REALPAD = 0;
253 #endif
254 Tsize_t = Tuns32;
255 Tptrdiff_t = Tint32;
256 } 248 }
257 } 249 }
258 250
259 d_uns64 Type::size() 251 d_uns64 Type::size()
260 { 252 {