Mercurial > projects > ldc
comparison runtime/llvmdc.diff @ 444:f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 01:12:33 +0200 |
parents | 44f08170f4ef |
children | cc40db549aea |
comparison
equal
deleted
inserted
replaced
443:44f08170f4ef | 444:f2b5f86348ef |
---|---|
1 Index: object.di | 1 Index: object.di |
2 =================================================================== | 2 =================================================================== |
3 --- object.di (revision 3819) | 3 --- object.di (revision 3831) |
4 +++ object.di (working copy) | 4 +++ object.di (working copy) |
5 @@ -150,6 +150,9 @@ | 5 @@ -150,6 +150,9 @@ |
6 void function() dtor; | 6 void function() dtor; |
7 void function() unitTest; | 7 void function() unitTest; |
8 | 8 |
12 static int opApply( int delegate( inout ModuleInfo ) ); | 12 static int opApply( int delegate( inout ModuleInfo ) ); |
13 } | 13 } |
14 | 14 |
15 Index: lib/common/tango/core/BitManip.d | 15 Index: lib/common/tango/core/BitManip.d |
16 =================================================================== | 16 =================================================================== |
17 --- lib/common/tango/core/BitManip.d (revision 3819) | 17 --- lib/common/tango/core/BitManip.d (revision 3831) |
18 +++ lib/common/tango/core/BitManip.d (working copy) | 18 +++ lib/common/tango/core/BitManip.d (working copy) |
19 @@ -171,6 +171,10 @@ | 19 @@ -171,6 +171,10 @@ |
20 */ | 20 */ |
21 uint outpl( uint port_address, uint value ); | 21 uint outpl( uint port_address, uint value ); |
22 } | 22 } |
27 else | 27 else |
28 { | 28 { |
29 public import std.intrinsic; | 29 public import std.intrinsic; |
30 Index: lib/common/tango/core/Thread.d | 30 Index: lib/common/tango/core/Thread.d |
31 =================================================================== | 31 =================================================================== |
32 --- lib/common/tango/core/Thread.d (revision 3819) | 32 --- lib/common/tango/core/Thread.d (revision 3831) |
33 +++ lib/common/tango/core/Thread.d (working copy) | 33 +++ lib/common/tango/core/Thread.d (working copy) |
34 @@ -244,10 +244,33 @@ | 34 @@ -244,10 +244,33 @@ |
35 } | 35 } |
36 body | 36 body |
37 { | 37 { |
94 version( X86_64 ) | 94 version( X86_64 ) |
95 { | 95 { |
96 | 96 |
97 Index: lib/gc/basic/gcx.d | 97 Index: lib/gc/basic/gcx.d |
98 =================================================================== | 98 =================================================================== |
99 --- lib/gc/basic/gcx.d (revision 3819) | 99 --- lib/gc/basic/gcx.d (revision 3831) |
100 +++ lib/gc/basic/gcx.d (working copy) | 100 +++ lib/gc/basic/gcx.d (working copy) |
101 @@ -2178,6 +2178,28 @@ | 101 @@ -2178,6 +2178,28 @@ |
102 __builtin_unwind_init(); | 102 __builtin_unwind_init(); |
103 sp = & sp; | 103 sp = & sp; |
104 } | 104 } |
138 else | 138 else |
139 { | 139 { |
140 asm | 140 asm |
141 Index: lib/gc/basic/gcbits.d | 141 Index: lib/gc/basic/gcbits.d |
142 =================================================================== | 142 =================================================================== |
143 --- lib/gc/basic/gcbits.d (revision 3819) | 143 --- lib/gc/basic/gcbits.d (revision 3831) |
144 +++ lib/gc/basic/gcbits.d (working copy) | 144 +++ lib/gc/basic/gcbits.d (working copy) |
145 @@ -39,6 +39,10 @@ | 145 @@ -39,6 +39,10 @@ |
146 { | 146 { |
147 // use the unoptimized version | 147 // use the unoptimized version |
148 } | 148 } |
153 else version (D_InlineAsm_X86) | 153 else version (D_InlineAsm_X86) |
154 { | 154 { |
155 version = Asm86; | 155 version = Asm86; |
156 Index: tango/text/convert/Layout.d | 156 Index: tango/text/convert/Layout.d |
157 =================================================================== | 157 =================================================================== |
158 --- tango/text/convert/Layout.d (revision 3819) | 158 --- tango/text/convert/Layout.d (revision 3831) |
159 +++ tango/text/convert/Layout.d (working copy) | 159 +++ tango/text/convert/Layout.d (working copy) |
160 @@ -47,6 +47,12 @@ | 160 @@ -47,6 +47,12 @@ |
161 alias void* Arg; | 161 alias void* Arg; |
162 alias va_list ArgList; | 162 alias va_list ArgList; |
163 } | 163 } |
190 int[64] intargs = void; | 190 int[64] intargs = void; |
191 byte[64] byteargs = void; | 191 byte[64] byteargs = void; |
192 long[64] longargs = void; | 192 long[64] longargs = void; |
193 Index: tango/core/Vararg.d | 193 Index: tango/core/Vararg.d |
194 =================================================================== | 194 =================================================================== |
195 --- tango/core/Vararg.d (revision 3819) | 195 --- tango/core/Vararg.d (revision 3831) |
196 +++ tango/core/Vararg.d (working copy) | 196 +++ tango/core/Vararg.d (working copy) |
197 @@ -15,6 +15,10 @@ | 197 @@ -15,6 +15,10 @@ |
198 { | 198 { |
199 public import std.stdarg; | 199 public import std.stdarg; |
200 } | 200 } |
205 else | 205 else |
206 { | 206 { |
207 /** | 207 /** |
208 Index: tango/math/Math.d | 208 Index: tango/math/Math.d |
209 =================================================================== | 209 =================================================================== |
210 --- tango/math/Math.d (revision 3819) | 210 --- tango/math/Math.d (revision 3831) |
211 +++ tango/math/Math.d (working copy) | 211 +++ tango/math/Math.d (working copy) |
212 @@ -76,7 +76,77 @@ | 212 @@ -76,7 +76,77 @@ |
213 version = DigitalMars_D_InlineAsm_X86; | 213 version = DigitalMars_D_InlineAsm_X86; |
214 } | 214 } |
215 } | 215 } |
216 +else version(LLVMDC) | 216 +else version(LLVMDC) |
217 +{ | 217 +{ |
218 + private | 218 + private |
219 + { | 219 + { |
220 | 220 |
221 + pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f32") | 221 + pragma(intrinsic, "llvm.sqrt.f32") |
222 + float llvm_sqrt(float); | 222 + float sqrt(float); |
223 + pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f64") | 223 + pragma(intrinsic, "llvm.sqrt.f64") |
224 + double llvm_sqrt(double); | 224 + double sqrt(double); |
225 + | 225 + |
226 + version(LLVM_X86_FP80) | 226 + version(LLVM_X86_FP80) |
227 + { | 227 + { |
228 + alias tango.stdc.math.tanl llvm_tan; | 228 + alias tango.stdc.math.tanl llvm_tan; |
229 + alias tango.stdc.math.acosl llvm_acos; | 229 + alias tango.stdc.math.acosl llvm_acos; |
233 + alias tango.stdc.math.coshl llvm_cosh; | 233 + alias tango.stdc.math.coshl llvm_cosh; |
234 + alias tango.stdc.math.sinhl llvm_sinh; | 234 + alias tango.stdc.math.sinhl llvm_sinh; |
235 + alias tango.stdc.math.tanhl llvm_tanh; | 235 + alias tango.stdc.math.tanhl llvm_tanh; |
236 + alias tango.stdc.math.cbrtl llvm_cbrt; | 236 + alias tango.stdc.math.cbrtl llvm_cbrt; |
237 + alias tango.stdc.math.expl llvm_exp; | 237 + alias tango.stdc.math.expl llvm_exp; |
238 + alias tango.stdc.math.exp1ml llvm_exp1m; | 238 + alias tango.stdc.math.expm1l llvm_expm1; |
239 + alias tango.stdc.math.exp2l llvm_exp2; | 239 + alias tango.stdc.math.exp2l llvm_exp2; |
240 + alias tango.stdc.math.logl llvm_log; | 240 + alias tango.stdc.math.logl llvm_log; |
241 + alias tango.stdc.math.log1pl llvm_log1p; | 241 + alias tango.stdc.math.log1pl llvm_log1p; |
242 + alias tango.stdc.math.log2l llvm_log2; | 242 + alias tango.stdc.math.log2l llvm_log2; |
243 + alias tango.stdc.math.log10l llvm_log10; | 243 + alias tango.stdc.math.log10l llvm_log10; |
244 + alias tango.stdc.math.powl llvm_pow; | 244 + alias tango.stdc.math.powl llvm_pow; |
245 + alias tango.stdc.math.lrintl llvm_lrint; | 245 + alias tango.stdc.math.lrintl llvm_lrint; |
246 + alias tango.stdc.math.llrintl llvm_llrint; | 246 + alias tango.stdc.math.llrintl llvm_llrint; |
247 + | 247 + |
248 + pragma(LLVM_internal, "intrinsic", "llvm.cos.f80") | 248 + pragma(intrinsic, "llvm.cos.f80") |
249 + real llvm_cos(real); | 249 + real cos(real); |
250 + pragma(LLVM_internal, "intrinsic", "llvm.sin.f80") | 250 + pragma(intrinsic, "llvm.sin.f80") |
251 + real llvm_sin(real); | 251 + real sin(real); |
252 + pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f80") | 252 + pragma(intrinsic, "llvm.sqrt.f80") |
253 + real llvm_sqrt(real); | 253 + real sqrt(real); |
254 + } | 254 + } |
255 + else | 255 + else |
256 + { | 256 + { |
257 + alias tango.stdc.math.tan llvm_tan; | 257 + alias tango.stdc.math.tan llvm_tan; |
258 + alias tango.stdc.math.acos llvm_acos; | 258 + alias tango.stdc.math.acos llvm_acos; |
262 + alias tango.stdc.math.cosh llvm_cosh; | 262 + alias tango.stdc.math.cosh llvm_cosh; |
263 + alias tango.stdc.math.sinh llvm_sinh; | 263 + alias tango.stdc.math.sinh llvm_sinh; |
264 + alias tango.stdc.math.tanh llvm_tanh; | 264 + alias tango.stdc.math.tanh llvm_tanh; |
265 + alias tango.stdc.math.cbrt llvm_cbrt; | 265 + alias tango.stdc.math.cbrt llvm_cbrt; |
266 + alias tango.stdc.math.exp llvm_exp; | 266 + alias tango.stdc.math.exp llvm_exp; |
267 + alias tango.stdc.math.exp1m llvm_exp1m; | 267 + alias tango.stdc.math.expm1 llvm_expm1; |
268 + alias tango.stdc.math.exp2 llvm_exp2; | 268 + alias tango.stdc.math.exp2 llvm_exp2; |
269 + alias tango.stdc.math.log llvm_log; | 269 + alias tango.stdc.math.log llvm_log; |
270 + alias tango.stdc.math.log1p llvm_log1p; | 270 + alias tango.stdc.math.log1p llvm_log1p; |
271 + alias tango.stdc.math.log2 llvm_log2; | 271 + alias tango.stdc.math.log2 llvm_log2; |
272 + alias tango.stdc.math.log10 llvm_log10; | 272 + alias tango.stdc.math.log10 llvm_log10; |
273 + alias tango.stdc.math.pow llvm_pow; | 273 + alias tango.stdc.math.pow llvm_pow; |
274 + alias tango.stdc.math.lrint llvm_lrint; | 274 + alias tango.stdc.math.lrint llvm_lrint; |
275 + alias tango.stdc.math.llrint llvm_llrint; | 275 + alias tango.stdc.math.llrint llvm_llrint; |
276 + | 276 + |
277 + pragma(LLVM_internal, "intrinsic", "llvm.cos.f64") | 277 + pragma(intrinsic, "llvm.cos.f64") |
278 + real llvm_cos(real); | 278 + real cos(real); |
279 + pragma(LLVM_internal, "intrinsic", "llvm.sin.f64") | 279 + pragma(intrinsic, "llvm.sin.f64") |
280 + real llvm_sin(real); | 280 + real sin(real); |
281 + pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f64") | 281 + pragma(intrinsic, "llvm.sqrt.f64") |
282 + real llvm_sqrt(real); | 282 + real sqrt(real); |
283 + } | 283 + } |
284 + } | 284 + } |
285 +} | 285 +} |
286 + | 286 + |
287 /* | 287 /* |
288 * Constants | 288 * Constants |
289 */ | 289 */ |
290 @@ -300,6 +370,10 @@ | 290 @@ -298,6 +368,10 @@ |
291 */ | 291 * Bugs: |
292 * Results are undefined if |x| >= $(POWER 2,64). | |
293 */ | |
294 +version(LLVMDC) | |
295 +{} | |
296 +else | |
297 +{ | |
292 real cos(real x) /* intrinsic */ | 298 real cos(real x) /* intrinsic */ |
293 { | 299 { |
294 + version(LLVMDC) | |
295 + { | |
296 + return llvm_cos(x); | |
297 + } | |
298 version(D_InlineAsm_X86) | 300 version(D_InlineAsm_X86) |
299 { | 301 @@ -313,6 +387,7 @@ |
300 asm | 302 return tango.stdc.math.cosl(x); |
301 @@ -335,6 +409,10 @@ | 303 } |
302 */ | 304 } |
305 +} | |
306 | |
307 debug(UnitTest) { | |
308 unittest { | |
309 @@ -333,6 +408,10 @@ | |
310 * Bugs: | |
311 * Results are undefined if |x| >= $(POWER 2,64). | |
312 */ | |
313 +version(LLVMDC) | |
314 +{} | |
315 +else | |
316 +{ | |
303 real sin(real x) /* intrinsic */ | 317 real sin(real x) /* intrinsic */ |
304 { | 318 { |
305 + version(LLVMDC) | |
306 + { | |
307 + return llvm_sin(x); | |
308 + } | |
309 version(D_InlineAsm_X86) | 319 version(D_InlineAsm_X86) |
310 { | 320 @@ -348,6 +427,7 @@ |
311 asm | 321 return tango.stdc.math.sinl(x); |
312 @@ -374,6 +452,9 @@ | 322 } |
323 } | |
324 +} | |
325 | |
326 debug(UnitTest) { | |
327 unittest { | |
328 @@ -374,6 +454,9 @@ | |
313 { | 329 { |
314 version (GNU) { | 330 version (GNU) { |
315 return tanl(x); | 331 return tanl(x); |
316 + } | 332 + } |
317 + else version(LLVMDC) { | 333 + else version(LLVMDC) { |
318 + return llvm_tan(x); | 334 + return llvm_tan(x); |
319 } else { | 335 } else { |
320 asm | 336 asm |
321 { | 337 { |
322 @@ -576,7 +657,14 @@ | 338 @@ -576,7 +659,14 @@ |
323 */ | 339 */ |
324 real acos(real x) | 340 real acos(real x) |
325 { | 341 { |
326 - return tango.stdc.math.acosl(x); | 342 - return tango.stdc.math.acosl(x); |
327 + version(LLVMDC) | 343 + version(LLVMDC) |
333 + return tango.stdc.math.acosl(x); | 349 + return tango.stdc.math.acosl(x); |
334 + } | 350 + } |
335 } | 351 } |
336 | 352 |
337 debug(UnitTest) { | 353 debug(UnitTest) { |
338 @@ -599,7 +687,14 @@ | 354 @@ -599,7 +689,14 @@ |
339 */ | 355 */ |
340 real asin(real x) | 356 real asin(real x) |
341 { | 357 { |
342 - return tango.stdc.math.asinl(x); | 358 - return tango.stdc.math.asinl(x); |
343 + version(LLVMDC) | 359 + version(LLVMDC) |
349 + return tango.stdc.math.asinl(x); | 365 + return tango.stdc.math.asinl(x); |
350 + } | 366 + } |
351 } | 367 } |
352 | 368 |
353 debug(UnitTest) { | 369 debug(UnitTest) { |
354 @@ -621,7 +716,14 @@ | 370 @@ -621,7 +718,14 @@ |
355 */ | 371 */ |
356 real atan(real x) | 372 real atan(real x) |
357 { | 373 { |
358 - return tango.stdc.math.atanl(x); | 374 - return tango.stdc.math.atanl(x); |
359 + version(LLVMDC) | 375 + version(LLVMDC) |
365 + return tango.stdc.math.atanl(x); | 381 + return tango.stdc.math.atanl(x); |
366 + } | 382 + } |
367 } | 383 } |
368 | 384 |
369 debug(UnitTest) { | 385 debug(UnitTest) { |
370 @@ -658,7 +760,14 @@ | 386 @@ -658,7 +762,14 @@ |
371 */ | 387 */ |
372 real atan2(real y, real x) | 388 real atan2(real y, real x) |
373 { | 389 { |
374 - return tango.stdc.math.atan2l(y,x); | 390 - return tango.stdc.math.atan2l(y,x); |
375 + version(LLVMDC) | 391 + version(LLVMDC) |
376 + { | 392 + { |
377 + return llvm_atan2(x); | 393 + return llvm_atan2(y,x); |
378 + } | 394 + } |
379 + else | 395 + else |
380 + { | 396 + { |
381 + return tango.stdc.math.atan2l(x); | 397 + return tango.stdc.math.atan2l(y,x); |
382 + } | 398 + } |
383 } | 399 } |
384 | 400 |
385 debug(UnitTest) { | 401 debug(UnitTest) { |
386 @@ -707,7 +816,14 @@ | 402 @@ -707,7 +818,14 @@ |
387 */ | 403 */ |
388 real cosh(real x) | 404 real cosh(real x) |
389 { | 405 { |
390 - return tango.stdc.math.coshl(x); | 406 - return tango.stdc.math.coshl(x); |
391 + version(LLVMDC) | 407 + version(LLVMDC) |
397 + return tango.stdc.math.coshl(x); | 413 + return tango.stdc.math.coshl(x); |
398 + } | 414 + } |
399 } | 415 } |
400 | 416 |
401 debug(UnitTest) { | 417 debug(UnitTest) { |
402 @@ -728,7 +844,14 @@ | 418 @@ -728,7 +846,14 @@ |
403 */ | 419 */ |
404 real sinh(real x) | 420 real sinh(real x) |
405 { | 421 { |
406 - return tango.stdc.math.sinhl(x); | 422 - return tango.stdc.math.sinhl(x); |
407 + version(LLVMDC) | 423 + version(LLVMDC) |
413 + return tango.stdc.math.sinhl(x); | 429 + return tango.stdc.math.sinhl(x); |
414 + } | 430 + } |
415 } | 431 } |
416 | 432 |
417 debug(UnitTest) { | 433 debug(UnitTest) { |
418 @@ -749,7 +872,14 @@ | 434 @@ -749,7 +874,14 @@ |
419 */ | 435 */ |
420 real tanh(real x) | 436 real tanh(real x) |
421 { | 437 { |
422 - return tango.stdc.math.tanhl(x); | 438 - return tango.stdc.math.tanhl(x); |
423 + version(LLVMDC) | 439 + version(LLVMDC) |
429 + return tango.stdc.math.tanhl(x); | 445 + return tango.stdc.math.tanhl(x); |
430 + } | 446 + } |
431 } | 447 } |
432 | 448 |
433 debug(UnitTest) { | 449 debug(UnitTest) { |
434 @@ -949,8 +1079,12 @@ | 450 @@ -947,6 +1079,10 @@ |
435 */ | 451 * <tr> <td> +∞ <td> +∞ <td> no |
452 * ) | |
453 */ | |
454 +version(LLVMDC) | |
455 +{} | |
456 +else | |
457 +{ | |
436 float sqrt(float x) /* intrinsic */ | 458 float sqrt(float x) /* intrinsic */ |
437 { | 459 { |
438 - version(D_InlineAsm_X86) | 460 version(D_InlineAsm_X86) |
439 + version(LLVMDC) | 461 @@ -994,6 +1130,7 @@ |
440 { | 462 return tango.stdc.math.sqrtl(x); |
441 + return llvm_sqrt_f32(x); | 463 } |
442 + } | 464 } |
443 + else version(D_InlineAsm_X86) | 465 +} |
444 + { | 466 |
445 asm | 467 /** ditto */ |
446 { | 468 creal sqrt(creal z) |
447 fld x; | 469 @@ -1045,7 +1182,14 @@ |
448 @@ -965,8 +1099,12 @@ | |
449 | |
450 double sqrt(double x) /* intrinsic */ /// ditto | |
451 { | |
452 - version(D_InlineAsm_X86) | |
453 + version(LLVMDC) | |
454 { | |
455 + return llvm_sqrt_f64(x); | |
456 + } | |
457 + else version(D_InlineAsm_X86) | |
458 + { | |
459 asm | |
460 { | |
461 fld x; | |
462 @@ -981,8 +1119,12 @@ | |
463 | |
464 real sqrt(real x) /* intrinsic */ /// ditto | |
465 { | |
466 - version(D_InlineAsm_X86) | |
467 + version(LLVMDC) | |
468 { | |
469 + return llvm_sqrt_f80(x); | |
470 + } | |
471 + else version(D_InlineAsm_X86) | |
472 + { | |
473 asm | |
474 { | |
475 fld x; | |
476 @@ -1045,7 +1187,14 @@ | |
477 */ | 470 */ |
478 real cbrt(real x) | 471 real cbrt(real x) |
479 { | 472 { |
480 - return tango.stdc.math.cbrtl(x); | 473 - return tango.stdc.math.cbrtl(x); |
481 + version(LLVMDC) | 474 + version(LLVMDC) |
487 + return tango.stdc.math.cbrtl(x); | 480 + return tango.stdc.math.cbrtl(x); |
488 + } | 481 + } |
489 } | 482 } |
490 | 483 |
491 | 484 |
492 @@ -1067,7 +1216,14 @@ | 485 @@ -1067,7 +1211,14 @@ |
493 */ | 486 */ |
494 real exp(real x) | 487 real exp(real x) |
495 { | 488 { |
496 - return tango.stdc.math.expl(x); | 489 - return tango.stdc.math.expl(x); |
497 + version(LLVMDC) | 490 + version(LLVMDC) |
503 + return tango.stdc.math.expl(x); | 496 + return tango.stdc.math.expl(x); |
504 + } | 497 + } |
505 } | 498 } |
506 | 499 |
507 debug(UnitTest) { | 500 debug(UnitTest) { |
508 @@ -1093,7 +1249,14 @@ | 501 @@ -1093,7 +1244,14 @@ |
509 */ | 502 */ |
510 real expm1(real x) | 503 real expm1(real x) |
511 { | 504 { |
512 - return tango.stdc.math.expm1l(x); | 505 - return tango.stdc.math.expm1l(x); |
513 + version(LLVMDC) | 506 + version(LLVMDC) |
519 + return tango.stdc.math.expm1l(x); | 512 + return tango.stdc.math.expm1l(x); |
520 + } | 513 + } |
521 } | 514 } |
522 | 515 |
523 debug(UnitTest) { | 516 debug(UnitTest) { |
524 @@ -1115,7 +1278,14 @@ | 517 @@ -1115,7 +1273,14 @@ |
525 */ | 518 */ |
526 real exp2(real x) | 519 real exp2(real x) |
527 { | 520 { |
528 - return tango.stdc.math.exp2l(x); | 521 - return tango.stdc.math.exp2l(x); |
529 + version(LLVMDC) | 522 + version(LLVMDC) |
535 + return tango.stdc.math.exp2l(x); | 528 + return tango.stdc.math.exp2l(x); |
536 + } | 529 + } |
537 } | 530 } |
538 | 531 |
539 debug(UnitTest) { | 532 debug(UnitTest) { |
540 @@ -1141,7 +1311,14 @@ | 533 @@ -1141,7 +1306,14 @@ |
541 */ | 534 */ |
542 real log(real x) | 535 real log(real x) |
543 { | 536 { |
544 - return tango.stdc.math.logl(x); | 537 - return tango.stdc.math.logl(x); |
545 + version(LLVMDC) | 538 + version(LLVMDC) |
551 + return tango.stdc.math.logl(x); | 544 + return tango.stdc.math.logl(x); |
552 + } | 545 + } |
553 } | 546 } |
554 | 547 |
555 debug(UnitTest) { | 548 debug(UnitTest) { |
556 @@ -1167,7 +1344,14 @@ | 549 @@ -1167,7 +1339,14 @@ |
557 */ | 550 */ |
558 real log1p(real x) | 551 real log1p(real x) |
559 { | 552 { |
560 - return tango.stdc.math.log1pl(x); | 553 - return tango.stdc.math.log1pl(x); |
561 + version(LLVMDC) | 554 + version(LLVMDC) |
567 + return tango.stdc.math.log1pl(x); | 560 + return tango.stdc.math.log1pl(x); |
568 + } | 561 + } |
569 } | 562 } |
570 | 563 |
571 debug(UnitTest) { | 564 debug(UnitTest) { |
572 @@ -1190,7 +1374,14 @@ | 565 @@ -1190,7 +1369,14 @@ |
573 */ | 566 */ |
574 real log2(real x) | 567 real log2(real x) |
575 { | 568 { |
576 - return tango.stdc.math.log2l(x); | 569 - return tango.stdc.math.log2l(x); |
577 + version(LLVMDC) | 570 + version(LLVMDC) |
583 + return tango.stdc.math.log2l(x); | 576 + return tango.stdc.math.log2l(x); |
584 + } | 577 + } |
585 } | 578 } |
586 | 579 |
587 debug(UnitTest) { | 580 debug(UnitTest) { |
588 @@ -1212,7 +1403,14 @@ | 581 @@ -1212,7 +1398,14 @@ |
589 */ | 582 */ |
590 real log10(real x) | 583 real log10(real x) |
591 { | 584 { |
592 - return tango.stdc.math.log10l(x); | 585 - return tango.stdc.math.log10l(x); |
593 + version(LLVMDC) | 586 + version(LLVMDC) |
599 + return tango.stdc.math.log10l(x); | 592 + return tango.stdc.math.log10l(x); |
600 + } | 593 + } |
601 } | 594 } |
602 | 595 |
603 debug(UnitTest) { | 596 debug(UnitTest) { |
604 @@ -1477,7 +1675,14 @@ | 597 @@ -1477,7 +1670,14 @@ |
605 } | 598 } |
606 } | 599 } |
607 } | 600 } |
608 - return tango.stdc.math.powl(x, y); | 601 - return tango.stdc.math.powl(x, y); |
609 + version(LLVMDC) | 602 + version(LLVMDC) |
615 + return tango.stdc.math.powl(x, y); | 608 + return tango.stdc.math.powl(x, y); |
616 + } | 609 + } |
617 } | 610 } |
618 | 611 |
619 debug(UnitTest) { | 612 debug(UnitTest) { |
620 @@ -1823,6 +2028,10 @@ | 613 @@ -1823,6 +2023,10 @@ |
621 } | 614 } |
622 return n; | 615 return n; |
623 } | 616 } |
624 + else version(LLVMDC) | 617 + else version(LLVMDC) |
625 + { | 618 + { |
626 + return llvm_lrint(x); | 619 + return llvm_lrint(x); |
627 + } | 620 + } |
628 else | 621 else |
629 { | 622 { |
630 return tango.stdc.math.lrintl(x); | 623 return tango.stdc.math.lrintl(x); |
631 @@ -1842,6 +2051,10 @@ | 624 @@ -1842,6 +2046,10 @@ |
632 } | 625 } |
633 return n; | 626 return n; |
634 } | 627 } |
635 + else version(LLVMDC) | 628 + else version(LLVMDC) |
636 + { | 629 + { |
639 else | 632 else |
640 { | 633 { |
641 return tango.stdc.math.llrintl(x); | 634 return tango.stdc.math.llrintl(x); |
642 Index: tango/stdc/stdlib.d | 635 Index: tango/stdc/stdlib.d |
643 =================================================================== | 636 =================================================================== |
644 --- tango/stdc/stdlib.d (revision 3819) | 637 --- tango/stdc/stdlib.d (revision 3831) |
645 +++ tango/stdc/stdlib.d (working copy) | 638 +++ tango/stdc/stdlib.d (working copy) |
646 @@ -94,6 +94,11 @@ | 639 @@ -94,6 +94,11 @@ |
647 { | 640 { |
648 void* alloca(size_t size); | 641 void* alloca(size_t size); |
649 } | 642 } |
655 else version( GNU ) | 648 else version( GNU ) |
656 { | 649 { |
657 private import gcc.builtins; | 650 private import gcc.builtins; |
658 Index: tango/stdc/stdarg.d | 651 Index: tango/stdc/stdarg.d |
659 =================================================================== | 652 =================================================================== |
660 --- tango/stdc/stdarg.d (revision 3819) | 653 --- tango/stdc/stdarg.d (revision 3831) |
661 +++ tango/stdc/stdarg.d (working copy) | 654 +++ tango/stdc/stdarg.d (working copy) |
662 @@ -13,6 +13,10 @@ | 655 @@ -13,6 +13,10 @@ |
663 { | 656 { |
664 public import std.c.stdarg; | 657 public import std.c.stdarg; |
665 } | 658 } |