diff --git a/runtime/llvmdc.diff b/runtime/llvmdc.diff index 61487c90..e663252f 100644 --- a/runtime/llvmdc.diff +++ b/runtime/llvmdc.diff @@ -1,6 +1,6 @@ Index: object.di =================================================================== ---- object.di (revision 3819) +--- object.di (revision 3831) +++ object.di (working copy) @@ -150,6 +150,9 @@ void function() dtor; @@ -14,7 +14,7 @@ Index: object.di Index: lib/common/tango/core/BitManip.d =================================================================== ---- lib/common/tango/core/BitManip.d (revision 3819) +--- lib/common/tango/core/BitManip.d (revision 3831) +++ lib/common/tango/core/BitManip.d (working copy) @@ -171,6 +171,10 @@ */ @@ -29,7 +29,7 @@ Index: lib/common/tango/core/BitManip.d public import std.intrinsic; Index: lib/common/tango/core/Thread.d =================================================================== ---- lib/common/tango/core/Thread.d (revision 3819) +--- lib/common/tango/core/Thread.d (revision 3831) +++ lib/common/tango/core/Thread.d (working copy) @@ -244,10 +244,33 @@ } @@ -96,7 +96,7 @@ Index: lib/common/tango/core/Thread.d Index: lib/gc/basic/gcx.d =================================================================== ---- lib/gc/basic/gcx.d (revision 3819) +--- lib/gc/basic/gcx.d (revision 3831) +++ lib/gc/basic/gcx.d (working copy) @@ -2178,6 +2178,28 @@ __builtin_unwind_init(); @@ -140,7 +140,7 @@ Index: lib/gc/basic/gcx.d asm Index: lib/gc/basic/gcbits.d =================================================================== ---- lib/gc/basic/gcbits.d (revision 3819) +--- lib/gc/basic/gcbits.d (revision 3831) +++ lib/gc/basic/gcbits.d (working copy) @@ -39,6 +39,10 @@ { @@ -155,7 +155,7 @@ Index: lib/gc/basic/gcbits.d version = Asm86; Index: tango/text/convert/Layout.d =================================================================== ---- tango/text/convert/Layout.d (revision 3819) +--- tango/text/convert/Layout.d (revision 3831) +++ tango/text/convert/Layout.d (working copy) @@ -47,6 +47,12 @@ alias void* Arg; @@ -192,7 +192,7 @@ Index: tango/text/convert/Layout.d long[64] longargs = void; Index: tango/core/Vararg.d =================================================================== ---- tango/core/Vararg.d (revision 3819) +--- tango/core/Vararg.d (revision 3831) +++ tango/core/Vararg.d (working copy) @@ -15,6 +15,10 @@ { @@ -207,7 +207,7 @@ Index: tango/core/Vararg.d /** Index: tango/math/Math.d =================================================================== ---- tango/math/Math.d (revision 3819) +--- tango/math/Math.d (revision 3831) +++ tango/math/Math.d (working copy) @@ -76,7 +76,77 @@ version = DigitalMars_D_InlineAsm_X86; @@ -218,10 +218,10 @@ Index: tango/math/Math.d + private + { -+ pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f32") -+ float llvm_sqrt(float); -+ pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f64") -+ double llvm_sqrt(double); ++ pragma(intrinsic, "llvm.sqrt.f32") ++ float sqrt(float); ++ pragma(intrinsic, "llvm.sqrt.f64") ++ double sqrt(double); + + version(LLVM_X86_FP80) + { @@ -235,7 +235,7 @@ Index: tango/math/Math.d + alias tango.stdc.math.tanhl llvm_tanh; + alias tango.stdc.math.cbrtl llvm_cbrt; + alias tango.stdc.math.expl llvm_exp; -+ alias tango.stdc.math.exp1ml llvm_exp1m; ++ alias tango.stdc.math.expm1l llvm_expm1; + alias tango.stdc.math.exp2l llvm_exp2; + alias tango.stdc.math.logl llvm_log; + alias tango.stdc.math.log1pl llvm_log1p; @@ -245,12 +245,12 @@ Index: tango/math/Math.d + alias tango.stdc.math.lrintl llvm_lrint; + alias tango.stdc.math.llrintl llvm_llrint; + -+ pragma(LLVM_internal, "intrinsic", "llvm.cos.f80") -+ real llvm_cos(real); -+ pragma(LLVM_internal, "intrinsic", "llvm.sin.f80") -+ real llvm_sin(real); -+ pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f80") -+ real llvm_sqrt(real); ++ pragma(intrinsic, "llvm.cos.f80") ++ real cos(real); ++ pragma(intrinsic, "llvm.sin.f80") ++ real sin(real); ++ pragma(intrinsic, "llvm.sqrt.f80") ++ real sqrt(real); + } + else + { @@ -264,7 +264,7 @@ Index: tango/math/Math.d + alias tango.stdc.math.tanh llvm_tanh; + alias tango.stdc.math.cbrt llvm_cbrt; + alias tango.stdc.math.exp llvm_exp; -+ alias tango.stdc.math.exp1m llvm_exp1m; ++ alias tango.stdc.math.expm1 llvm_expm1; + alias tango.stdc.math.exp2 llvm_exp2; + alias tango.stdc.math.log llvm_log; + alias tango.stdc.math.log1p llvm_log1p; @@ -274,12 +274,12 @@ Index: tango/math/Math.d + alias tango.stdc.math.lrint llvm_lrint; + alias tango.stdc.math.llrint llvm_llrint; + -+ pragma(LLVM_internal, "intrinsic", "llvm.cos.f64") -+ real llvm_cos(real); -+ pragma(LLVM_internal, "intrinsic", "llvm.sin.f64") -+ real llvm_sin(real); -+ pragma(LLVM_internal, "intrinsic", "llvm.sqrt.f64") -+ real llvm_sqrt(real); ++ pragma(intrinsic, "llvm.cos.f64") ++ real cos(real); ++ pragma(intrinsic, "llvm.sin.f64") ++ real sin(real); ++ pragma(intrinsic, "llvm.sqrt.f64") ++ real sqrt(real); + } + } +} @@ -287,29 +287,45 @@ Index: tango/math/Math.d /* * Constants */ -@@ -300,6 +370,10 @@ +@@ -298,6 +368,10 @@ + * Bugs: + * Results are undefined if |x| >= $(POWER 2,64). */ ++version(LLVMDC) ++{} ++else ++{ real cos(real x) /* intrinsic */ { -+ version(LLVMDC) -+ { -+ return llvm_cos(x); -+ } version(D_InlineAsm_X86) - { - asm -@@ -335,6 +409,10 @@ +@@ -313,6 +387,7 @@ + return tango.stdc.math.cosl(x); + } + } ++} + + debug(UnitTest) { + unittest { +@@ -333,6 +408,10 @@ + * Bugs: + * Results are undefined if |x| >= $(POWER 2,64). */ ++version(LLVMDC) ++{} ++else ++{ real sin(real x) /* intrinsic */ { -+ version(LLVMDC) -+ { -+ return llvm_sin(x); -+ } version(D_InlineAsm_X86) - { - asm -@@ -374,6 +452,9 @@ +@@ -348,6 +427,7 @@ + return tango.stdc.math.sinl(x); + } + } ++} + + debug(UnitTest) { + unittest { +@@ -374,6 +454,9 @@ { version (GNU) { return tanl(x); @@ -319,7 +335,7 @@ Index: tango/math/Math.d } else { asm { -@@ -576,7 +657,14 @@ +@@ -576,7 +659,14 @@ */ real acos(real x) { @@ -335,7 +351,7 @@ Index: tango/math/Math.d } debug(UnitTest) { -@@ -599,7 +687,14 @@ +@@ -599,7 +689,14 @@ */ real asin(real x) { @@ -351,7 +367,7 @@ Index: tango/math/Math.d } debug(UnitTest) { -@@ -621,7 +716,14 @@ +@@ -621,7 +718,14 @@ */ real atan(real x) { @@ -367,23 +383,23 @@ Index: tango/math/Math.d } debug(UnitTest) { -@@ -658,7 +760,14 @@ +@@ -658,7 +762,14 @@ */ real atan2(real y, real x) { - return tango.stdc.math.atan2l(y,x); + version(LLVMDC) + { -+ return llvm_atan2(x); ++ return llvm_atan2(y,x); + } + else + { -+ return tango.stdc.math.atan2l(x); ++ return tango.stdc.math.atan2l(y,x); + } } debug(UnitTest) { -@@ -707,7 +816,14 @@ +@@ -707,7 +818,14 @@ */ real cosh(real x) { @@ -399,7 +415,7 @@ Index: tango/math/Math.d } debug(UnitTest) { -@@ -728,7 +844,14 @@ +@@ -728,7 +846,14 @@ */ real sinh(real x) { @@ -415,7 +431,7 @@ Index: tango/math/Math.d } debug(UnitTest) { -@@ -749,7 +872,14 @@ +@@ -749,7 +874,14 @@ */ real tanh(real x) { @@ -431,49 +447,26 @@ Index: tango/math/Math.d } debug(UnitTest) { -@@ -949,8 +1079,12 @@ +@@ -947,6 +1079,10 @@ + *