annotate runtime/llvmdc.diff @ 529:cef0cbcf7d22

Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 20 Aug 2008 19:03:28 +0200
parents 283d113d4753
children f775ea9d09d3
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 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
3 --- object.di (revision 3880)
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 ===================================================================
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
17 --- lib/unittest.sh (revision 3880)
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 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
74 --- lib/common/tango/core/BitManip.d (revision 3880)
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 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
89 --- lib/common/tango/core/Thread.d (revision 3880)
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)
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
91 @@ -244,10 +244,33 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
92 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
93 body
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
94 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
95 - 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
96 + 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
97 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
98 + // put registers on the stack
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
99 + 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
100 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
101 + uint _eax, _ecx, _edx, _ebx, _esp, _ebp, _esi, _edi;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
102 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
103 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
104 + mov _eax, EAX;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
105 + mov _ecx, ECX;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
106 + mov _edx, EDX;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
107 + mov _ebx, EBX;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
108 + mov _esp, ESP;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
109 + mov _ebp, EBP;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
110 + mov _esi, ESI;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
111 + mov _edi, EDI;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
112 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
113 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
114 + 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
115 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
116 + // FIXME
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
117 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
118 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
119 + 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
120 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
121 + 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
122 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
123 pushad;
44f08170f4ef Removed tango from the repository and instead added a 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 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
125 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
126 @@ -297,8 +320,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
127 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
128 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
129
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
130 - 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
131 + 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
132 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
133 + // 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
134 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
135 + 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
136 + {
44f08170f4ef Removed tango from the repository and instead added a 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 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
138 {
44f08170f4ef Removed tango from the repository and instead added a 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 popad;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
140 @@ -2266,8 +2293,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
141
44f08170f4ef Removed tango from the repository and instead added a 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 private
44f08170f4ef Removed tango from the repository and instead added a 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 - 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
145 + 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
146 {
44f08170f4ef Removed tango from the repository and instead added a 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 +
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
148 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
149 + 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
150 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
151 version( X86_64 )
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
152 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
153
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
154 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
155 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
156 --- lib/gc/basic/gcx.d (revision 3880)
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
157 +++ lib/gc/basic/gcx.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
158 @@ -2178,6 +2178,28 @@
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
159 __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
160 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
161 }
44f08170f4ef Removed tango from the repository and instead added a 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 + 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
163 + {
44f08170f4ef Removed tango from the repository and instead added a 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 + 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
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 + uint _eax, _ecx, _edx, _ebx, _ebp, _esi, _edi;
44f08170f4ef Removed tango from the repository and instead added a 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 + 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
168 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
169 + mov _eax, EAX;
44f08170f4ef Removed tango from the repository and instead added a 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 + mov _ecx, ECX;
44f08170f4ef Removed tango from the repository and instead added a 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 + mov _edx, EDX;
44f08170f4ef Removed tango from the repository and instead added a 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 + mov _ebx, EBX;
44f08170f4ef Removed tango from the repository and instead added a 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 + mov _ebp, EBP;
44f08170f4ef Removed tango from the repository and instead added a 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 + mov _esi, ESI;
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
175 + mov _edi, EDI;
44f08170f4ef Removed tango from the repository and instead added a 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 + mov sp, ESP;
44f08170f4ef Removed tango from the repository and instead added a 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 + }
44f08170f4ef Removed tango from the repository and instead added a 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 + 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
180 + {
44f08170f4ef Removed tango from the repository and instead added a 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 + // FIXME
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
182 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
183 + }
44f08170f4ef Removed tango from the repository and instead added a 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 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
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 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
187 @@ -2191,6 +2213,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
188 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
189 // 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
190 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
191 + 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
192 + {
44f08170f4ef Removed tango from the repository and instead added a 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 + // 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
194 + }
44f08170f4ef Removed tango from the repository and instead added a 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 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
196 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
197 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
198 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
199 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
200 --- lib/gc/basic/gcbits.d (revision 3880)
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
201 +++ 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
202 @@ -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
203 {
44f08170f4ef Removed tango from the repository and instead added a 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 // 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
205 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
206 +else version(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
207 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
208 + // 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
209 +}
44f08170f4ef Removed tango from the repository and instead added a 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 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
211 {
44f08170f4ef Removed tango from the repository and instead added a 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 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
213 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
214 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
215 --- tango/text/convert/Layout.d (revision 3880)
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
216 +++ 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
217 @@ -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
218 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
219 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
220 }
44f08170f4ef Removed tango from the repository and instead added a 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 +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
222 + {
44f08170f4ef Removed tango from the repository and instead added a 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 + 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
224 + 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
225 + 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
226 + }
44f08170f4ef Removed tango from the repository and instead added a 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 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
228 {
44f08170f4ef Removed tango from the repository and instead added a 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 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
230 @@ -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
231 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
232 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
233
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
234 - 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
235 + 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
236 {
44f08170f4ef Removed tango from the repository and instead added a 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 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
238 + 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
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 + 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
241 + 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
242 + }
44f08170f4ef Removed tango from the repository and instead added a 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 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
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 + 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
247 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
248 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
249 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
250 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
251 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
252 --- tango/core/Vararg.d (revision 3880)
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
253 +++ 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
254 @@ -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
255 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
256 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
257 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
258 +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
259 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
260 + 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
261 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
262 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
263 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
264 /**
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
265 Index: tango/core/Variant.d
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 --- tango/core/Variant.d (revision 3880)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
268 +++ tango/core/Variant.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
269 @@ -102,13 +102,45 @@
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
270 const isInterface = false;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
271 }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
272
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
273 - template isStaticArray(T)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
274 +// template isStaticArray(T)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
275 +// {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
276 +// static if( is( typeof(T.init)[(T).sizeof / typeof(T.init).sizeof] == T ) )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
277 +// const isStaticArray = true;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
278 +// else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
279 +// const isStaticArray = false;
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 + /* *******************************************
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 + template isStaticArray_impl(T)
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 - static if( is( typeof(T.init)[(T).sizeof / typeof(T.init).sizeof] == T ) )
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
286 - const isStaticArray = true;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
287 + const T inst = void;
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 + static if (is(typeof(T.length)))
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 + static if (!is(T == typeof(T.init)))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
292 + { // abuses the fact that int[5].init == int
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
293 + static if (is(T == typeof(T[0])[inst.length]))
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
294 + { // sanity check. this check alone isn't enough because dmd complains about dynamic arrays
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
295 + const bool res = true;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
296 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
297 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
298 + const bool res = false;
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 else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
301 - const isStaticArray = false;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
302 + const bool res = false;
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
303 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
304 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
305 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
306 + const bool res = false;
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 }
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 + * Detect whether type T is a static array.
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 + template isStaticArray(T)
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 + const bool isStaticArray = isStaticArray_impl!(T).res;
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
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
317 bool isAny(T,argsT...)(T v, argsT args)
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 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
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 --- tango/core/Atomic.d (revision 3880)
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
322 +++ 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
323 @@ -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
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 +// 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
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 +
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 +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
332 +{
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
333 + 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
334 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
335 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
336 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
337 + // 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
338 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
339 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
340 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
341 + 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
342 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
343 + 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
344 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
345 + 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
346 + 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
347 + 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
348 + 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
349 + 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
350 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
351 + 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
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 + 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
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 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
356 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
357 + 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
358 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
359 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
360 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
361 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
362 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
363 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
364 + // 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
365 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
366 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
367 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
368 + 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
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 + 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
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 + 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
373 + 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
374 + 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
375 + 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
376 + 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
377 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
378 + 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
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 + 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
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 + 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
383 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
384 + 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
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 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
387 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
388 + 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
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 + }
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 +
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 + // 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
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 +
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 + 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
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 + 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
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 + 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
404 + 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
405 + 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
406 + 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
407 + 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
408 + false);
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
409 + 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
410 + 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
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 + 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
413 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
414 + 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
415 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
416 + 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
417 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
418 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
419 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
420 + 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
421 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
422 + 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
423 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
424 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
425 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
426 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
427 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
428 + // 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
429 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
430 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
431 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
432 + 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
433 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
434 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
435 + // 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
436 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
437 + 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
438 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
439 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
440 + 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
441 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
442 + 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
443 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
444 + 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
445 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
446 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
447 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
448 + 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
449 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
450 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
451 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
452 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
453 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
454 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
455 + // 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
456 + ////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
457 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
458 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
459 + 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
460 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
461 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
462 + // 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
463 + //
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
464 + 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
465 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
466 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
467 + 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
468 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
469 + 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
470 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
471 + 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
472 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
473 + else
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
474 + {
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
475 + 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
476 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
477 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
478 + }
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
479 +}
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
480 +
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
481 +////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
482 // 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
483 ////////////////////////////////////////////////////////////////////////////////
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
484
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
485 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
486 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
487 --- tango/math/Math.d (revision 3880)
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
488 +++ 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
489 @@ -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
490 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
491 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
492 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
493 +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
494 +{
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
495 + import llvmdc.intrinsics;
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
496 + 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
497 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
498 + 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
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 +}
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
501
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
502 /*
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
503 * Constants
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
504 @@ -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
505 * Bugs:
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
506 * 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
507 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
508 +version(LLVMDC)
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
509 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
510 + 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
511 + 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
512 + version(X86)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
513 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
514 + 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
515 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
516 + else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
517 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
518 + 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
519 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
520 + 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
521 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
522 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
523 +}
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
524 +else
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
525 +{
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
526 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
527 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
528 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
529 @@ -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
530 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
531 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
532 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
533 +}
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
534
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
535 debug(UnitTest) {
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
536 unittest {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
537 @@ -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
538 * Bugs:
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
539 * 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
540 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
541 +version(LLVMDC)
445
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 + 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
544 + 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
545 + version(X86)
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
546 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
547 + 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
548 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
549 + else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
550 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
551 + 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
552 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
553 + 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
554 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
555 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
556 +}
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
557 +else
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
558 +{
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
559 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
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 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
562 @@ -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
563 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
564 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
565 }
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
566 +}
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
567
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
568 debug(UnitTest) {
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
569 unittest {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
570 @@ -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
571 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
572 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
573 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
574 - } 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
575 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
576 + 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
577 + 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
578 + }
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
579 + 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
580 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
581 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
582 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
583 @@ -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
584 * <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
585 * )
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
586 */
444
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
587 +version(LLVMDC)
f2b5f86348ef Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 443
diff changeset
588 +{
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
589 + 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
590 + 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
591 + 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
592 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
593 + 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
594 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
595 + else
44f08170f4ef Removed tango from the repository and instead added a 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 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
597 + 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
598 + {
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
599 + 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
600 + }
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
601 + }
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
602 +}
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
603 +else
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
604 +{
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
605 +
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
606 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
607 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
608 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
609 @@ -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
610 }
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
611 }
44f08170f4ef Removed tango from the repository and instead added a 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
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
613 +}
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
614 +
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
615 /** ditto */
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
616 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
617 {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
618 @@ -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
619 }
44f08170f4ef Removed tango from the repository and instead added a 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 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
622 - 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
623 + 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
624 + {
445
cc40db549aea Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 444
diff changeset
625 + 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
626 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
627 + 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
628 + {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
629 + 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
630 + }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
631 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
632
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
633 debug(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
634 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
635 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
636 --- tango/stdc/stdlib.d (revision 3880)
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
637 +++ 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
638 @@ -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
639 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
640 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
641 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
642 +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
643 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
644 + 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
645 + 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
646 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
647 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
648 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
649 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
650 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
651 ===================================================================
529
cef0cbcf7d22 Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 454
diff changeset
652 --- tango/stdc/stdarg.d (revision 3880)
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
653 +++ 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
654 @@ -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
655 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
656 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
657 }
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
658 +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
659 +{
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
660 + 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
661 +}
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
662 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
663 {
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
664 alias void* va_list;