annotate runtime/llvmdc.diff @ 540:9312024a7053

Gah, missed something still. I'll test properly next time ;)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 24 Aug 2008 17:13:40 +0200
parents 795e972e17ce
children 52ab8f3130d9
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)
540
9312024a7053 Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 539
diff changeset
91 @@ -244,8 +244,29 @@
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
92 }
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
93 body
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
94 {
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
95 - version( D_InlineAsm_X86 )
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
96 + version( LLVMDC)
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 {
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
98 + version(X86)
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
99 + {
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
100 + uint eax,ecx,edx,ebx,ebp,esi,edi;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
101 + asm
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
102 + {
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
103 + mov eax[EBP], EAX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
104 + mov ecx[EBP], ECX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
105 + mov edx[EBP], EDX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
106 + mov ebx[EBP], EBX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
107 + mov ebp[EBP], EBP ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
108 + mov esi[EBP], ESI ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
109 + mov edi[EBP], EDI ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
110 + }
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
111 + }
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
112 + else
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
113 + {
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
114 + static assert( false, "Architecture not supported." );
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
115 + }
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
116 + }
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
117 + else version( D_InlineAsm_X86 )
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
118 + {
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
119 asm
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
120 {
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
121 pushad;
540
9312024a7053 Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 539
diff changeset
122 @@ -297,8 +318,12 @@
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
123 }
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 }
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
125
539
795e972e17ce Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 533
diff changeset
126 - version( D_InlineAsm_X86 )
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
127 + version( LLVMDC)
539
795e972e17ce Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 533
diff changeset
128 {
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
129 + // nothing to pop
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
130 + }
539
795e972e17ce Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 533
diff changeset
131 + else version( D_InlineAsm_X86 )
795e972e17ce Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 533
diff changeset
132 + {
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
133 asm
539
795e972e17ce Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 533
diff changeset
134 {
795e972e17ce Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 533
diff changeset
135 popad;
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
136 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
137 ===================================================================
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
138 --- 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
139 +++ lib/gc/basic/gcx.d (working copy)
540
9312024a7053 Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 539
diff changeset
140 @@ -2178,6 +2178,28 @@
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
141 __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
142 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
143 }
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 + 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
145 + {
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
146 + 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
147 + {
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
148 + uint eax,ecx,edx,ebx,ebp,esi,edi;
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
149 + 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
150 + {
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
151 + mov eax[EBP], EAX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
152 + mov ecx[EBP], ECX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
153 + mov edx[EBP], EDX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
154 + mov ebx[EBP], EBX ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
155 + mov ebp[EBP], EBP ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
156 + mov esi[EBP], ESI ;
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
157 + mov edi[EBP], EDI ;
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
158 + 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
159 + }
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
160 + }
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 + 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
162 + {
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
163 + 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
164 + }
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 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
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 asm
540
9312024a7053 Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 539
diff changeset
169 @@ -2191,6 +2213,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
170 {
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 // 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
172 }
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 + 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
174 + {
533
2fe2d4518618 Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 531
diff changeset
175 + // nothing to do
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
176 + }
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
177 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
178 {
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 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
180 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
181 ===================================================================
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
182 --- 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
183 +++ 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
184 @@ -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
185 {
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 // 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
187 }
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 +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
189 +{
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 + // 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
191 +}
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 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
193 {
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 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
195 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
196 ===================================================================
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
197 --- 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
198 +++ 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
199 @@ -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
200 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
201 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
202 }
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 +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
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 + 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
206 + 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
207 + 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
208 + }
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 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
210 {
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 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
212 @@ -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
213 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
214 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
215
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 - 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
217 + 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
218 {
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 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
220 + 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
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 + 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
223 + 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
224 + }
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 + 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
227 + {
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
228 + 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
229 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
230 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
231 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
232 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
233 ===================================================================
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
234 --- 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
235 +++ 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
236 @@ -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
237 {
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
238 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
239 }
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
240 +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
241 +{
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
242 + 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
243 +}
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
244 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
245 {
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
246 /**
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
247 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
248 ===================================================================
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
249 --- 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
250 +++ 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
251 @@ -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
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
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
254 ////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
255 +// 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
256 +////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
257 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
258 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
259 +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
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 + 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
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 +
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 + // 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
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 + 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
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 + 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
272 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
273 + 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
274 + 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
275 + 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
276 + 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
277 + 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
278 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
279 + 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
280 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
281 + 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
282 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
283 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
284 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
285 + 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
286 + }
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 + }
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 +
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 + // 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
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 +
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 + 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
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 + 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
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 + 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
301 + 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
302 + 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
303 + 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
304 + 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
305 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
306 + 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
307 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
308 + 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
309 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
310 + 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
311 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
312 + 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
313 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
314 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
315 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
316 + 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
317 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
318 + }
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 +
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 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
323 + // 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
324 + ////////////////////////////////////////////////////////////////////////////
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 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
327 + 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
328 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
329 + 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
330 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
331 + 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
332 + 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
333 + 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
334 + 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
335 + 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
336 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
337 + 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
338 + 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
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 + 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
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 + 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
343 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
344 + 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
345 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
346 + else
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 + 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
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 + 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
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 + }
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 +
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 + // 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
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 + 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
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 + // 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
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 + 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
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 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
368 + 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
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 + 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
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 + 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
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 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
375 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
376 + 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
377 + }
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 + }
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 +
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 + // 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
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 + 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
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 + // 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
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 + 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
393 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
394 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
395 + 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
396 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
397 + 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
398 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
399 + 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
400 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
401 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
402 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
403 + 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
404 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
405 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
406 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
407 +}
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
408 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
409 +////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
410 // 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
411 ////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
412
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
413 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
414 ===================================================================
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
415 --- 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
416 +++ 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
417 @@ -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
418 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
419 }
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
420 }
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
421 +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
422 +{
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
423 + import llvmdc.intrinsics;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
424 + 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
425 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
426 + 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
427 + }
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
428 +}
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
429
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
430 /*
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
431 * Constants
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
432 @@ -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
433 * Bugs:
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
434 * 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
435 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
436 +version(LLVMDC)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
437 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
438 + 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
439 + 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
440 + version(X86)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
441 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
442 + 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
443 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
444 + else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
445 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
446 + 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
447 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
448 + 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
449 + }
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 +}
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
452 +else
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
453 +{
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
454 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
455 {
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
456 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
457 @@ -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
458 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
459 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
460 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
461 +}
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
462
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
463 debug(UnitTest) {
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
464 unittest {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
465 @@ -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
466 * Bugs:
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
467 * 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
468 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
469 +version(LLVMDC)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
470 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
471 + 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
472 + 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
473 + version(X86)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
474 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
475 + 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
476 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
477 + else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
478 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
479 + 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
480 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
481 + 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
482 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
483 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
484 +}
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
485 +else
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
486 +{
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
487 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
488 {
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 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
490 @@ -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
491 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
492 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
493 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
494 +}
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
495
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
496 debug(UnitTest) {
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
497 unittest {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
498 @@ -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
499 {
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 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
501 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
502 - } 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
503 + }
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 + 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
505 + 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
506 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
507 + 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
508 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
509 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
510 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
511 @@ -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
512 * <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
513 * )
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
514 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
515 +version(LLVMDC)
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
516 +{
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
517 + 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
518 + 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
519 + 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
520 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
521 + 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
522 + }
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
523 + 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
524 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
525 + 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
526 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
527 + 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
528 + }
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
529 + }
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
530 +}
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
531 +else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
532 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
533 +
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
534 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
535 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
536 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
537 @@ -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
538 }
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
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
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
541 +}
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
542 +
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
543 /** ditto */
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
544 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
545 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
546 @@ -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
547 }
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
548 }
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
549 }
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
550 - 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
551 + 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
552 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
553 + 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
554 + }
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
555 + 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
556 + {
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
557 + 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
558 + }
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
559 }
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
560
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
561 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
562 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
563 ===================================================================
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 --- 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
565 +++ 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
566 @@ -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
567 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
568 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
569 // 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
570 +} 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
571 + // 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
572 } 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
573 /* 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
574 *
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
575 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
576 ===================================================================
f775ea9d09d3 Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 529
diff changeset
577 --- 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
578 +++ 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
579 @@ -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
580 } 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
581 // 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
582 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
583 -} 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
584 +} 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
585 + // 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
586 +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
587 +} 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
588 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
589 } 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
590 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
591 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
592 ===================================================================
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
593 --- 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
594 +++ 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
595 @@ -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
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 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
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 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
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 + 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
602 + 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
603 +}
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
604 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
605 {
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
606 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
607 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
608 ===================================================================
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
609 --- 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
610 +++ 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
611 @@ -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
612 {
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
613 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
614 }
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
615 +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
616 +{
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
617 + 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
618 +}
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
619 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
620 {
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
621 alias void* va_list;