annotate runtime/llvmdc.diff @ 531:f775ea9d09d3

Updated the tango patch, removed some now unnecessarily complex inline asm.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 21 Aug 2008 15:35:24 +0200
parents cef0cbcf7d22
children 2fe2d4518618
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
1 Index: object.di
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
2 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
3 --- object.di (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
4 +++ object.di (working copy)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
5 @@ -150,6 +150,9 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
6 void function() dtor;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
7 void function() unitTest;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
8
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
9 + void* xgetMembers;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
10 + void function() ictor;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
11 +
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
12 static int opApply( int delegate( inout ModuleInfo ) );
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
13 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
14
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
15 Index: lib/unittest.sh
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
16 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
17 --- lib/unittest.sh (revision 3899)
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
18 +++ lib/unittest.sh (working copy)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
19 @@ -18,8 +18,9 @@
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
20 --help: This message
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
21 --run-all: Reports result instead of breaking. Do not use this if you want to
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
22 run unittest runner through a debugger.
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
23 - dmd: Builds unittests for dmd
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
24 - gdc: Builds unittests for gdc
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
25 + dmd: Builds unittests for dmd
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
26 + gdc: Builds unittests for gdc
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
27 + llvmdc: Builds unittests for llvmdc
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
28
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
29 <none>: Builds unittests for all known compilers.'
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
30 exit 0
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
31 @@ -86,7 +87,7 @@
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
32 void main() {}
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
33 EOF
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
34
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
35 - rebuild -w -d -g -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
36 + rebuild -w -d -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
37 -version=UnitTest $EXE.d tango/core/*.d tango/core/sync/*.d tango/io/digest/*.d \
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
38 tango/io/model/*.d tango/io/protocol/*.d tango/io/selector/*.d tango/io/*.d \
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
39 tango/io/vfs/*.d tango/io/vfs/model/*.d \
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
40 @@ -125,6 +126,9 @@
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
41 gdc)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
42 GDC=1
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
43 ;;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
44 + llvmdc)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
45 + LLVMDC=1
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
46 + ;;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
47 *)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
48 usage
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
49 ;;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
50 @@ -132,10 +136,11 @@
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
51 shift
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
52 done
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
53
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
54 -if [ ! "$DMD" -a ! "$GDC" ]
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
55 +if [ ! "$DMD" -a ! "$GDC" -a ! "$LLVMDC" ]
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
56 then
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
57 DMD=1
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
58 GDC=1
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
59 + LLVMDC=1
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
60 fi
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
61
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
62 if [ "$DMD" = "1" ]
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
63 @@ -146,4 +151,7 @@
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
64 then
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
65 compile gdc runUnitTest_gdc
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
66 fi
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
67 -
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
68 +if [ "$LLVMDC" = "1" ]
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
69 +then
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
70 + compile llvmdc runUnitTest_llvmdc
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
71 +fi
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
72 Index: lib/common/tango/core/BitManip.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
73 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
74 --- lib/common/tango/core/BitManip.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
75 +++ lib/common/tango/core/BitManip.d (working copy)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
76 @@ -171,6 +171,10 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
77 */
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
78 uint outpl( uint port_address, uint value );
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
79 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
80 +else version( LLVMDC )
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
81 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
82 + public import llvmdc.bitmanip;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
83 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
84 else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
85 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
86 public import std.intrinsic;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
87 Index: lib/common/tango/core/Thread.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
88 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
89 --- lib/common/tango/core/Thread.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
90 +++ lib/common/tango/core/Thread.d (working copy)
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
91 @@ -255,6 +255,10 @@
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
92 {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
93 __builtin_unwind_init();
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
94 }
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
95 + else version( LLVMDC )
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
96 + {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
97 + pragma(msg, "don't know how to push registers on the stack for this architecture with LLVMDC");
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
98 + }
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
99 else
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
100 {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
101 static assert( false, "Architecture not supported." );
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
102 @@ -308,6 +312,10 @@
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
103 {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
104 // registers will be popped automatically
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
105 }
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
106 + else version( LLVMDC )
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
107 + {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
108 + // TODO
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
109 + }
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
110 else
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
111 {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
112 static assert( false, "Architecture not supported." );
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
113 Index: lib/gc/basic/gcx.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
114 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
115 --- lib/gc/basic/gcx.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
116 +++ lib/gc/basic/gcx.d (working copy)
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
117 @@ -2178,6 +2178,21 @@
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
118 __builtin_unwind_init();
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
119 sp = & sp;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
120 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
121 + else version(LLVMDC)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
122 + {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
123 + version(X86)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
124 + {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
125 + asm
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
126 + {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
127 + pushad ;
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
128 + mov sp[EBP],ESP ;
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
129 + }
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
130 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
131 + else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
132 + {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
133 + pragma(msg, "don't know how to push registers on the stack for this architecture with llvmdc");
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
134 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
135 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
136 else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
137 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
138 asm
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
139 @@ -2191,6 +2206,20 @@
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
140 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
141 // nothing to do
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
142 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
143 + else version(LLVMDC)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
144 + {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
145 + version(X86)
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
146 + {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
147 + asm
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
148 + {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
149 + popad ;
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
150 + }
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
151 + }
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
152 + else
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
153 + {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
154 + // TODO
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
155 + }
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
156 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
157 else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
158 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
159 asm
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
160 Index: lib/gc/basic/gcbits.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
161 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
162 --- lib/gc/basic/gcbits.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
163 +++ lib/gc/basic/gcbits.d (working copy)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
164 @@ -39,6 +39,10 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
165 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
166 // use the unoptimized version
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
167 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
168 +else version(LLVMDC)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
169 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
170 + // ditto
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
171 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
172 else version (D_InlineAsm_X86)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
173 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
174 version = Asm86;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
175 Index: tango/text/convert/Layout.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
176 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
177 --- tango/text/convert/Layout.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
178 +++ tango/text/convert/Layout.d (working copy)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
179 @@ -47,6 +47,12 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
180 alias void* Arg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
181 alias va_list ArgList;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
182 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
183 +else version(LLVMDC)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
184 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
185 + private import tango.core.Vararg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
186 + alias void* Arg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
187 + alias va_list ArgList;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
188 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
189 else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
190 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
191 alias void* Arg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
192 @@ -197,9 +203,18 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
193 assert (formatStr, "null format specifier");
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
194 assert (arguments.length < 64, "too many args in Layout.convert");
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
195
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
196 - version (GNU)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
197 + version (LLVMDC)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
198 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
199 Arg[64] arglist = void;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
200 + foreach (i, arg; arguments)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
201 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
202 + arglist[i] = args;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
203 + args += (arg.tsize + size_t.sizeof - 1) & ~ (size_t.sizeof - 1);
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
204 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
205 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
206 + else version (GNU)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
207 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
208 + Arg[64] arglist = void;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
209 int[64] intargs = void;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
210 byte[64] byteargs = void;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
211 long[64] longargs = void;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
212 Index: tango/core/Vararg.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
213 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
214 --- tango/core/Vararg.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
215 +++ tango/core/Vararg.d (working copy)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
216 @@ -15,6 +15,10 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
217 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
218 public import std.stdarg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
219 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
220 +else version( LLVMDC )
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
221 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
222 + public import llvmdc.vararg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
223 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
224 else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
225 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
226 /**
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
227 Index: tango/core/Atomic.d
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
228 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
229 --- tango/core/Atomic.d (revision 3899)
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
230 +++ tango/core/Atomic.d (working copy)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
231 @@ -270,6 +270,161 @@
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
232
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
233
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
234 ////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
235 +// LLVMDC Atomics Implementation
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
236 +////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
237 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
238 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
239 +else version( LLVMDC )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
240 +{
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
241 + import llvmdc.intrinsics;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
242 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
243 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
244 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
245 + // Atomic Load
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
246 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
247 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
248 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
249 + template atomicLoad( msync ms = msync.seq, T )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
250 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
251 + T atomicLoad(ref T val)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
252 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
253 + llvm_memory_barrier(
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
254 + ms == msync.hlb || ms == msync.acq || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
255 + ms == msync.hsb || ms == msync.acq || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
256 + ms == msync.slb || ms == msync.rel || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
257 + ms == msync.ssb || ms == msync.rel || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
258 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
259 + static if (isPointerType!(T))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
260 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
261 + return cast(T)llvm_atomic_load_add!(size_t)(cast(size_t*)&val, 0);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
262 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
263 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
264 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
265 + return llvm_atomic_load_add!(T)(&val, cast(T)0);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
266 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
267 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
268 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
269 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
270 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
271 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
272 + // Atomic Store
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
273 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
274 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
275 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
276 + template atomicStore( msync ms = msync.seq, T )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
277 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
278 + void atomicStore( ref T val, T newval )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
279 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
280 + llvm_memory_barrier(
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
281 + ms == msync.hlb || ms == msync.acq || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
282 + ms == msync.hsb || ms == msync.acq || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
283 + ms == msync.slb || ms == msync.rel || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
284 + ms == msync.ssb || ms == msync.rel || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
285 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
286 + static if (isPointerType!(T))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
287 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
288 + llvm_atomic_swap!(size_t)(cast(size_t*)&val, cast(size_t)newval);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
289 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
290 + else static if (is(T == bool))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
291 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
292 + llvm_atomic_swap!(ubyte)(cast(ubyte*)&val, newval?1:0);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
293 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
294 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
295 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
296 + llvm_atomic_swap!(T)(&val, newval);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
297 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
298 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
299 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
300 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
301 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
302 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
303 + // Atomic Store If
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
304 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
305 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
306 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
307 + template atomicStoreIf( msync ms = msync.seq, T )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
308 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
309 + bool atomicStoreIf( ref T val, T newval, T equalTo )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
310 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
311 + llvm_memory_barrier(
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
312 + ms == msync.hlb || ms == msync.acq || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
313 + ms == msync.hsb || ms == msync.acq || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
314 + ms == msync.slb || ms == msync.rel || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
315 + ms == msync.ssb || ms == msync.rel || ms == msync.seq,
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
316 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
317 + T oldval = void;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
318 + static if (isPointerType!(T))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
319 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
320 + oldval = cast(T)llvm_atomic_cmp_swap!(size_t)(cast(size_t*)&val, cast(size_t)equalTo, cast(size_t)newval);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
321 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
322 + else static if (is(T == bool))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
323 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
324 + oldval = llvm_atomic_cmp_swap!(ubyte)(cast(ubyte*)&val, equalTo?1:0, newval?1:0)?0:1;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
325 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
326 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
327 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
328 + oldval = llvm_atomic_cmp_swap!(T)(&val, equalTo, newval);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
329 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
330 + return oldval == equalTo;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
331 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
332 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
333 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
334 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
335 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
336 + // Atomic Increment
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
337 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
338 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
339 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
340 + template atomicIncrement( msync ms = msync.seq, T )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
341 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
342 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
343 + // NOTE: This operation is only valid for integer or pointer types
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
344 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
345 + static assert( isValidNumericType!(T) );
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
346 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
347 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
348 + T atomicIncrement( ref T val )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
349 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
350 + static if (isPointerType!(T))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
351 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
352 + return cast(T)llvm_atomic_load_add!(size_t)(cast(size_t*)&val, 1);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
353 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
354 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
355 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
356 + return llvm_atomic_load_add!(T)(&val, cast(T)1);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
357 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
358 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
359 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
360 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
361 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
362 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
363 + // Atomic Decrement
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
364 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
365 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
366 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
367 + template atomicDecrement( msync ms = msync.seq, T )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
368 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
369 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
370 + // NOTE: This operation is only valid for integer or pointer types
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
371 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
372 + static assert( isValidNumericType!(T) );
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
373 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
374 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
375 + T atomicDecrement( ref T val )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
376 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
377 + static if (isPointerType!(T))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
378 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
379 + return cast(T)llvm_atomic_load_sub!(size_t)(cast(size_t*)&val, 1);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
380 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
381 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
382 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
383 + return llvm_atomic_load_sub!(T)(&val, cast(T)1);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
384 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
385 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
386 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
387 +}
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
388 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
389 +////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
390 // x86 Atomic Function Implementation
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
391 ////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
392
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
393 Index: tango/math/Math.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
394 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
395 --- tango/math/Math.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
396 +++ tango/math/Math.d (working copy)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
397 @@ -76,6 +76,14 @@
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
398 version = DigitalMars_D_InlineAsm_X86;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
399 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
400 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
401 +else version(LLVMDC)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
402 +{
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
403 + import llvmdc.intrinsics;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
404 + version(X86)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
405 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
406 + version = LLVMDC_X86;
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
407 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
408 +}
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
409
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
410 /*
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
411 * Constants
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
412 @@ -298,6 +306,24 @@
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
413 * Bugs:
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
414 * Results are undefined if |x| >= $(POWER 2,64).
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
415 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
416 +version(LLVMDC)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
417 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
418 + alias llvm_cos_f32 cos;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
419 + alias llvm_cos_f64 cos;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
420 + version(X86)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
421 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
422 + alias llvm_cos_f80 cos;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
423 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
424 + else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
425 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
426 + real cos(real x)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
427 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
428 + return tango.stdc.math.cosl(x);
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
429 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
430 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
431 +}
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
432 +else
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
433 +{
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
434 real cos(real x) /* intrinsic */
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
435 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
436 version(D_InlineAsm_X86)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
437 @@ -313,6 +339,7 @@
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
438 return tango.stdc.math.cosl(x);
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
439 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
440 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
441 +}
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
442
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
443 debug(UnitTest) {
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
444 unittest {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
445 @@ -333,6 +360,24 @@
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
446 * Bugs:
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
447 * Results are undefined if |x| >= $(POWER 2,64).
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
448 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
449 +version(LLVMDC)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
450 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
451 + alias llvm_sin_f32 sin;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
452 + alias llvm_sin_f64 sin;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
453 + version(X86)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
454 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
455 + alias llvm_sin_f80 sin;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
456 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
457 + else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
458 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
459 + real sin(real x)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
460 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
461 + return tango.stdc.math.sinl(x);
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
462 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
463 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
464 +}
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
465 +else
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
466 +{
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
467 real sin(real x) /* intrinsic */
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
468 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
469 version(D_InlineAsm_X86)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
470 @@ -348,6 +393,7 @@
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
471 return tango.stdc.math.sinl(x);
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
472 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
473 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
474 +}
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
475
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
476 debug(UnitTest) {
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
477 unittest {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
478 @@ -374,7 +420,11 @@
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
479 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
480 version (GNU) {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
481 return tanl(x);
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
482 - } else {
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
483 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
484 + else version(LLVMDC) {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
485 + return tango.stdc.math.tanl(x);
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
486 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
487 + else {
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
488 asm
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
489 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
490 fld x[EBP] ; // load theta
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
491 @@ -947,6 +997,25 @@
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
492 * <tr> <td> +&infin; <td> +&infin; <td> no
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
493 * )
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
494 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
495 +version(LLVMDC)
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
496 +{
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
497 + alias llvm_sqrt_f32 sqrt;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
498 + alias llvm_sqrt_f64 sqrt;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
499 + version(X86)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
500 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
501 + alias llvm_sqrt_f80 sqrt;
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
502 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
503 + else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
504 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
505 + real sqrt(real x)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
506 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
507 + return tango.stdc.math.sqrtl(x);
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
508 + }
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
509 + }
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
510 +}
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
511 +else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
512 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
513 +
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
514 float sqrt(float x) /* intrinsic */
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
515 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
516 version(D_InlineAsm_X86)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
517 @@ -995,6 +1064,8 @@
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
518 }
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
519 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
520
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
521 +}
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
522 +
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
523 /** ditto */
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
524 creal sqrt(creal z)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
525 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
526 @@ -1477,7 +1548,14 @@
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
527 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
528 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
529 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
530 - return tango.stdc.math.powl(x, y);
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
531 + version(LLVMDC_X86)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
532 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
533 + return llvm_pow_f80(x, y);
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
534 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
535 + else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
536 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
537 + return tango.stdc.math.powl(x, y);
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
538 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
539 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
540
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
541 debug(UnitTest) {
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
542 Index: tango/math/internal/BignumX86.d
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
543 ===================================================================
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
544 --- tango/math/internal/BignumX86.d (revision 3899)
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
545 +++ tango/math/internal/BignumX86.d (working copy)
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
546 @@ -50,6 +50,8 @@
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
547 private:
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
548 version(GNU) {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
549 // GDC is a filthy liar. It can't actually do inline asm.
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
550 +} else version(LLVMDC) {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
551 + // I guess the same goes for llvmdc to some extent :(
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
552 } else version(D_InlineAsm_X86) {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
553 /* Duplicate string s, with n times, substituting index for '@'.
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
554 *
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
555 Index: tango/math/internal/BiguintCore.d
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
556 ===================================================================
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
557 --- tango/math/internal/BiguintCore.d (revision 3899)
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
558 +++ tango/math/internal/BiguintCore.d (working copy)
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
559 @@ -12,7 +12,10 @@
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
560 } else version(GNU) {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
561 // GDC lies about its X86 support
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
562 private import tango.math.internal.BignumNoAsm;
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
563 -} else version(D_InlineAsm_X86) {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
564 +} else version(LLVMDC) {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
565 + // I guess llvmdc does too :(
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
566 +private import tango.math.internal.BignumNoAsm;
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
567 +} else version(D_InlineAsm_X86) {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
568 private import tango.math.internal.BignumX86;
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
569 } else {
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
570 private import tango.math.internal.BignumNoAsm;
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
571 Index: tango/stdc/stdlib.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
572 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
573 --- tango/stdc/stdlib.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
574 +++ tango/stdc/stdlib.d (working copy)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
575 @@ -94,6 +94,11 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
576 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
577 void* alloca(size_t size);
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
578 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
579 +else version( LLVMDC )
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
580 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
581 + pragma(alloca)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
582 + void* alloca(size_t size);
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
583 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
584 else version( GNU )
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
585 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
586 private import gcc.builtins;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
587 Index: tango/stdc/stdarg.d
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
588 ===================================================================
531
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
589 --- tango/stdc/stdarg.d (revision 3899)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
590 +++ tango/stdc/stdarg.d (working copy)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
591 @@ -13,6 +13,10 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
592 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
593 public import std.c.stdarg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
594 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
595 +else version( LLVMDC )
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
596 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
597 + public import llvmdc.cstdarg;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
598 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
599 else
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
600 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
601 alias void* va_list;