Mercurial > projects > ldc
annotate runtime/llvmdc.diff @ 627:79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Wed, 01 Oct 2008 19:19:26 +0200 |
parents | c60e122f4ada |
children | 9fb1f559d9e9 |
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 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
3 --- object.di (revision 3939) |
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 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
17 --- lib/unittest.sh (revision 3939) |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
18 +++ lib/unittest.sh (working copy) |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
19 @@ -18,8 +18,9 @@ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
20 --help: This message |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
21 --run-all: Reports result instead of breaking. Do not use this if you want to |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
22 run unittest runner through a debugger. |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
23 - dmd: Builds unittests for dmd |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
24 - gdc: Builds unittests for gdc |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
25 + dmd: Builds unittests for dmd |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
26 + gdc: Builds unittests for gdc |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
27 + llvmdc: Builds unittests for llvmdc |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
28 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
29 <none>: Builds unittests for all known compilers.' |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
30 exit 0 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
31 @@ -86,7 +87,7 @@ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
32 void main() {} |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
33 EOF |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
34 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
35 - rebuild -w -d -g -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
36 + rebuild -w -d -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
37 -version=UnitTest $EXE.d tango/core/*.d tango/core/sync/*.d tango/io/digest/*.d \ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
38 tango/io/model/*.d tango/io/protocol/*.d tango/io/selector/*.d tango/io/*.d \ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
39 tango/io/vfs/*.d tango/io/vfs/model/*.d \ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
40 @@ -125,6 +126,9 @@ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
41 gdc) |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
42 GDC=1 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
43 ;; |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
44 + llvmdc) |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
45 + LLVMDC=1 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
46 + ;; |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
47 *) |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
48 usage |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
49 ;; |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
50 @@ -132,10 +136,11 @@ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
51 shift |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
52 done |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
53 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
54 -if [ ! "$DMD" -a ! "$GDC" ] |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
55 +if [ ! "$DMD" -a ! "$GDC" -a ! "$LLVMDC" ] |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
56 then |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
57 DMD=1 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
58 GDC=1 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
59 + LLVMDC=1 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
60 fi |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
61 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
62 if [ "$DMD" = "1" ] |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
63 @@ -146,4 +151,7 @@ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
64 then |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
65 compile gdc runUnitTest_gdc |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
66 fi |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
67 - |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
68 +if [ "$LLVMDC" = "1" ] |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
69 +then |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
70 + compile llvmdc runUnitTest_llvmdc |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
71 +fi |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
72 Index: lib/common/tango/core/BitManip.d |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
73 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
74 --- lib/common/tango/core/BitManip.d (revision 3939) |
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 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
89 --- lib/common/tango/core/Thread.d (revision 3939) |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
90 +++ lib/common/tango/core/Thread.d (working copy) |
540
9312024a7053
Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
539
diff
changeset
|
91 @@ -244,8 +244,29 @@ |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
92 } |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
93 body |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
94 { |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
95 - version( D_InlineAsm_X86 ) |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
96 + version( LLVMDC) |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
97 { |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
98 + version(X86) |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
99 + { |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
100 + uint eax,ecx,edx,ebx,ebp,esi,edi; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
101 + asm |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
102 + { |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
103 + mov eax[EBP], EAX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
104 + mov ecx[EBP], ECX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
105 + mov edx[EBP], EDX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
106 + mov ebx[EBP], EBX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
107 + mov ebp[EBP], EBP ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
108 + mov esi[EBP], ESI ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
109 + mov edi[EBP], EDI ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
110 + } |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
111 + } |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
112 + else |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
113 + { |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
114 + static assert( false, "Architecture not supported." ); |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
115 + } |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
116 + } |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
117 + else version( D_InlineAsm_X86 ) |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
118 + { |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
119 asm |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
120 { |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
121 pushad; |
540
9312024a7053
Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
539
diff
changeset
|
122 @@ -297,8 +318,12 @@ |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
123 } |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
124 } |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
125 |
539
795e972e17ce
Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
533
diff
changeset
|
126 - version( D_InlineAsm_X86 ) |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
127 + version( LLVMDC) |
539
795e972e17ce
Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
533
diff
changeset
|
128 { |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
129 + // nothing to pop |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
130 + } |
539
795e972e17ce
Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
533
diff
changeset
|
131 + else version( D_InlineAsm_X86 ) |
795e972e17ce
Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
533
diff
changeset
|
132 + { |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
133 asm |
539
795e972e17ce
Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
533
diff
changeset
|
134 { |
795e972e17ce
Made a small mistake in the Tango patch
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
533
diff
changeset
|
135 popad; |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
136 Index: lib/gc/basic/gcx.d |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
137 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
138 --- lib/gc/basic/gcx.d (revision 3939) |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
139 +++ lib/gc/basic/gcx.d (working copy) |
627
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
140 @@ -65,6 +65,13 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
141 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
142 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
143 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
144 +struct BlkInfo |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
145 +{ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
146 + void* base; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
147 + size_t size; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
148 + uint attr; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
149 +} |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
150 + |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
151 private |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
152 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
153 enum BlkAttr : uint |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
154 @@ -75,13 +82,6 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
155 ALL_BITS = 0b1111_1111 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
156 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
157 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
158 - struct BlkInfo |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
159 - { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
160 - void* base; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
161 - size_t size; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
162 - uint attr; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
163 - } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
164 - |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
165 extern (C) void* rt_stackBottom(); |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
166 extern (C) void* rt_stackTop(); |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
167 |
540
9312024a7053
Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
539
diff
changeset
|
168 @@ -2178,6 +2178,28 @@ |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
169 __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
|
170 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
|
171 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
172 + else version(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
|
173 + { |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
174 + 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
|
175 + { |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
176 + uint eax,ecx,edx,ebx,ebp,esi,edi; |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
177 + asm |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
178 + { |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
179 + mov eax[EBP], EAX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
180 + mov ecx[EBP], ECX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
181 + mov edx[EBP], EDX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
182 + mov ebx[EBP], EBX ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
183 + mov ebp[EBP], EBP ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
184 + mov esi[EBP], ESI ; |
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
185 + mov edi[EBP], EDI ; |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
186 + mov sp[EBP],ESP ; |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
187 + } |
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
|
188 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
189 + else |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
190 + { |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
191 + static assert( false, "Architecture not supported." ); |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
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 + } |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
195 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
196 asm |
540
9312024a7053
Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
539
diff
changeset
|
197 @@ -2191,6 +2213,10 @@ |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
198 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
199 // 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
|
200 } |
44f08170f4ef
Removed tango from the repository and instead added a 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 + 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
|
202 + { |
533
2fe2d4518618
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
531
diff
changeset
|
203 + // nothing to do |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
204 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
205 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
|
206 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
208 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
|
209 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
210 --- lib/gc/basic/gcbits.d (revision 3939) |
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
|
211 +++ 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
|
212 @@ -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
|
213 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 // 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
|
215 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
216 +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
|
217 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
218 + // 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
|
219 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
220 else version (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
|
221 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
222 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
|
223 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
|
224 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
225 --- tango/text/convert/Layout.d (revision 3939) |
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
|
226 +++ 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
|
227 @@ -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
|
228 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
|
229 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
|
230 } |
44f08170f4ef
Removed tango from the repository and instead added a 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 +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
|
232 + { |
44f08170f4ef
Removed tango from the repository and instead added a 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 + 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
|
234 + 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
|
235 + 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
|
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 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
|
238 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
240 @@ -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
|
241 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
|
242 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
|
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 - 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 + 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
|
246 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
248 + 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
|
249 + { |
44f08170f4ef
Removed tango from the repository and instead added a 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 + 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
|
251 + 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
|
252 + } |
44f08170f4ef
Removed tango from the repository and instead added a 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 + } |
44f08170f4ef
Removed tango from the repository and instead added a 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 + 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
|
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 + 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
|
257 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
|
258 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
|
259 long[64] longargs = void; |
627
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
260 Index: tango/text/xml/Document.d |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
261 =================================================================== |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
262 --- tango/text/xml/Document.d (revision 3939) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
263 +++ tango/text/xml/Document.d (working copy) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
264 @@ -1243,7 +1243,8 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
265 freeIndex = 0; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
266 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
267 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
268 - NodeSet set = {this}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
269 + NodeSet set; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
270 + set.host = this; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
271 auto mark = freeIndex; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
272 allocate(root); |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
273 return set.assign (mark); |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
274 @@ -1273,7 +1274,8 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
275 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
276 NodeSet dup () |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
277 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
278 - NodeSet copy = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
279 + NodeSet copy; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
280 + copy.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
281 copy.nodes = nodes.dup; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
282 return copy; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
283 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
284 @@ -1337,7 +1339,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
285 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
286 NodeSet nth (uint index) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
287 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
288 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
289 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
290 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
291 if (index < nodes.length) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
292 host.allocate (nodes [index]); |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
293 @@ -1495,7 +1497,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
294 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
295 NodeSet filter (bool delegate(Node) filter) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
296 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
297 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
298 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
299 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
300 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
301 foreach (node; nodes) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
302 @@ -1514,7 +1516,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
303 NodeSet child (bool delegate(Node) filter, |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
304 XmlNodeType type = XmlNodeType.Element) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
305 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
306 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
307 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
308 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
309 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
310 foreach (parent; nodes) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
311 @@ -1534,7 +1536,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
312 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
313 NodeSet attribute (bool delegate(Node) filter) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
314 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
315 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
316 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
317 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
318 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
319 foreach (node; nodes) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
320 @@ -1565,7 +1567,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
321 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
322 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
323 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
324 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
325 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
326 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
327 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
328 foreach (node; nodes) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
329 @@ -1583,7 +1585,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
330 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
331 NodeSet parent (bool delegate(Node) filter) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
332 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
333 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
334 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
335 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
336 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
337 foreach (node; nodes) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
338 @@ -1613,7 +1615,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
339 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
340 NodeSet ancestor (bool delegate(Node) filter) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
341 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
342 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
343 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
344 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
345 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
346 void traverse (Node child) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
347 @@ -1648,7 +1650,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
348 NodeSet next (bool delegate(Node) filter, |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
349 XmlNodeType type = XmlNodeType.Element) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
350 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
351 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
352 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
353 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
354 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
355 foreach (node; nodes) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
356 @@ -1675,7 +1677,7 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
357 NodeSet prev (bool delegate(Node) filter, |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
358 XmlNodeType type = XmlNodeType.Element) |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
359 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
360 - NodeSet set = {host}; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
361 + NodeSet set; set.host = host; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
362 auto mark = host.mark; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
363 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
364 foreach (node; nodes) |
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
|
365 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
|
366 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
367 --- tango/core/Vararg.d (revision 3939) |
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
|
368 +++ 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
|
369 @@ -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
|
370 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
371 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
|
372 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
373 +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
|
374 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
375 + 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
|
376 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
377 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
|
378 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
379 /** |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
380 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
|
381 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
382 --- tango/core/Atomic.d (revision 3939) |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
383 +++ tango/core/Atomic.d (working copy) |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
384 @@ -270,6 +270,167 @@ |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
385 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
386 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
387 //////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
388 +// 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
|
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 +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
|
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 + 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
|
395 + |
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 + // 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
|
399 + //////////////////////////////////////////////////////////////////////////// |
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 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
402 + 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
|
403 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
404 + 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
|
405 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
406 + 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
|
407 + 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
|
408 + 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
|
409 + 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
|
410 + 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
|
411 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
412 + 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
|
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 + 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
|
415 + } |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
416 + else static if (is(T == bool)) |
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
417 + { |
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
418 + return llvm_atomic_load_add!(ubyte)(cast(ubyte*)&val, cast(ubyte)0) ? 1 : 0; |
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
419 + } |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
420 + else |
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 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
|
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 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
429 + // 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
|
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 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
433 + 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
|
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 + 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
|
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 + 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
|
438 + 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
|
439 + 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
|
440 + 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
|
441 + 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
|
442 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
443 + 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
|
444 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
445 + 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
|
446 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
447 + 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
|
448 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
449 + 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
|
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 + else |
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 + 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
|
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 + } |
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 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
460 + // 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
|
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 + |
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 + 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
|
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 + 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
|
467 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
468 + 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
|
469 + 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
|
470 + 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
|
471 + 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
|
472 + 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
|
473 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
474 + 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
|
475 + 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
|
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 + 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
|
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 + 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
|
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 + 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
|
482 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
483 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
484 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
485 + 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
|
486 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
487 + 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
|
488 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
489 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
490 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
491 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
492 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
493 + // 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
|
494 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
495 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
496 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
497 + 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
|
498 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
499 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
500 + // 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
|
501 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
502 + 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
|
503 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
504 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
505 + 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
|
506 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
507 + 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
|
508 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
509 + llvm_atomic_load_add!(size_t)(cast(size_t*)&val, 1); |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
510 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
511 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
512 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
513 + llvm_atomic_load_add!(T)(&val, cast(T)1); |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
514 + } |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
515 + return val; |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
516 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
517 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
518 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
519 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
520 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
521 + // 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
|
522 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
523 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
524 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
525 + 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
|
526 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
527 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
528 + // 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
|
529 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
530 + 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
|
531 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
532 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
533 + 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
|
534 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
535 + 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
|
536 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
537 + llvm_atomic_load_sub!(size_t)(cast(size_t*)&val, 1); |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
538 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
539 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
540 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
541 + llvm_atomic_load_sub!(T)(&val, cast(T)1); |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
542 + } |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
543 + return val; |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
544 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
545 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
546 +} |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
547 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
548 +//////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
549 // 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
|
550 //////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
551 |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
552 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
|
553 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
554 --- tango/math/Math.d (revision 3939) |
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
|
555 +++ 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
|
556 @@ -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
|
557 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
|
558 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
559 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
560 +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
|
561 +{ |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
562 + import llvmdc.intrinsics; |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
563 + 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
|
564 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
565 + 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
|
566 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
567 +} |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
568 |
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
|
569 /* |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
570 * Constants |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
571 @@ -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
|
572 * Bugs: |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
573 * 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
|
574 */ |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
575 +version(LLVMDC) |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
576 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
577 + 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
|
578 + 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
|
579 + version(X86) |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
580 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
581 + 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
|
582 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
583 + else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
584 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
585 + 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
|
586 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
587 + 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
|
588 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
589 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
590 +} |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
591 +else |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
592 +{ |
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
|
593 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
|
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 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
|
596 @@ -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
|
597 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
|
598 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
599 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
600 +} |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
601 |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
602 debug(UnitTest) { |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
603 unittest { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
604 @@ -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
|
605 * Bugs: |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
606 * 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
|
607 */ |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
608 +version(LLVMDC) |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
609 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
610 + 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
|
611 + 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
|
612 + version(X86) |
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 + 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
|
615 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
616 + else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
617 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
618 + 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
|
619 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
620 + 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
|
621 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
622 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
623 +} |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
624 +else |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
625 +{ |
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 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
|
627 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
629 @@ -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
|
630 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
|
631 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
632 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
633 +} |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
634 |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
635 debug(UnitTest) { |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
636 unittest { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
637 @@ -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
|
638 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
640 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
|
641 - } 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
|
642 + } |
44f08170f4ef
Removed tango from the repository and instead added a 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 + 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
|
644 + 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
|
645 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
646 + 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
|
647 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
|
648 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
649 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
|
650 @@ -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
|
651 * <tr> <td> +∞ <td> +∞ <td> no |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
652 * ) |
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 */ |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
654 +version(LLVMDC) |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
655 +{ |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
656 + 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
|
657 + 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
|
658 + 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
|
659 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
660 + 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
|
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 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
664 + 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
|
665 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
666 + 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
|
667 + } |
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
|
668 + } |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
669 +} |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
670 +else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
671 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
672 + |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
673 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
|
674 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
675 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
|
676 @@ -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
|
677 } |
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
|
678 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
679 |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
680 +} |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
681 + |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
682 /** ditto */ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
683 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
|
684 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
685 @@ -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
|
686 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
687 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
688 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
689 - 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
|
690 + 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
|
691 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
692 + 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
|
693 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
694 + 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
|
695 + { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
696 + 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
|
697 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
698 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
699 |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
700 debug(UnitTest) { |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
701 Index: tango/math/internal/BignumX86.d |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
702 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
703 --- tango/math/internal/BignumX86.d (revision 3939) |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
704 +++ tango/math/internal/BignumX86.d (working copy) |
608
52ab8f3130d9
Removed dmdintrinsic.d from the runtime, we already have llvmdc.bitmanip.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
540
diff
changeset
|
705 @@ -49,6 +49,8 @@ |
531
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
706 private: |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
707 version(GNU) { |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
708 // GDC is a filthy liar. It can't actually do inline asm. |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
709 +} else version(LLVMDC) { |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
710 + // I guess the same goes for llvmdc to some extent :( |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
711 } else version(D_InlineAsm_X86) { |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
712 /* Duplicate string s, with n times, substituting index for '@'. |
f775ea9d09d3
Updated the tango patch, removed some now unnecessarily complex inline asm.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
529
diff
changeset
|
713 * |
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
|
714 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
|
715 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
716 --- tango/stdc/stdlib.d (revision 3939) |
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
|
717 +++ 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
|
718 @@ -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
|
719 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
720 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
|
721 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
722 +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
|
723 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
724 + 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
|
725 + 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
|
726 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
727 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
|
728 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
729 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
|
730 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
|
731 =================================================================== |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
732 --- tango/stdc/stdarg.d (revision 3939) |
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
|
733 +++ 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
|
734 @@ -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
|
735 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
736 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
|
737 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
738 +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
|
739 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
740 + 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
|
741 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
742 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
|
743 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
744 alias void* va_list; |