Mercurial > projects > ldc
annotate runtime/llvmdc.diff @ 642:307ae566885f
Make default argument protection check not error for undefined protection.
Fix symbol visibility issues in Tango.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 03 Oct 2008 17:31:16 +0200 |
parents | d9927f20758b |
children | 669a2c84f4e4 |
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 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
3 --- object.di (revision 3954) |
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 |
642
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
15 Index: lib/common/tango/core/Exception.d |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
16 =================================================================== |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
17 --- lib/common/tango/core/Exception.d (revision 3954) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
18 +++ lib/common/tango/core/Exception.d (working copy) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
19 @@ -223,7 +223,7 @@ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
20 /** |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
21 * The basic exception thrown by the tango.io.vfs package. |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
22 */ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
23 -private class VfsException : IOException |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
24 +class VfsException : IOException |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
25 { |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
26 this( char[] msg ) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
27 { |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
28 @@ -234,7 +234,7 @@ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
29 /** |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
30 * The basic exception thrown by the tango.io.cluster package. |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
31 */ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
32 -private class ClusterException : IOException |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
33 +class ClusterException : IOException |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
34 { |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
35 this( char[] msg ) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
36 { |
636
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
37 Index: lib/common/tango/core/BitManip.d |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
38 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
39 --- lib/common/tango/core/BitManip.d (revision 3954) |
636
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
40 +++ lib/common/tango/core/BitManip.d (working copy) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
41 @@ -171,6 +171,10 @@ |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
42 */ |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
43 uint outpl( uint port_address, uint value ); |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
44 } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
45 +else version( LLVMDC ) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
46 +{ |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
47 + public import llvmdc.bitmanip; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
48 +} |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
49 else |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
50 { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
51 public import std.intrinsic; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
52 Index: lib/common/tango/core/Thread.d |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
53 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
54 --- lib/common/tango/core/Thread.d (revision 3954) |
636
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
55 +++ lib/common/tango/core/Thread.d (working copy) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
56 @@ -244,8 +244,29 @@ |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
57 } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
58 body |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
59 { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
60 - version( D_InlineAsm_X86 ) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
61 + version( LLVMDC) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
62 { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
63 + version(X86) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
64 + { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
65 + uint eax,ecx,edx,ebx,ebp,esi,edi; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
66 + asm |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
67 + { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
68 + mov eax[EBP], EAX ; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
69 + mov ecx[EBP], ECX ; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
70 + mov edx[EBP], EDX ; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
71 + mov ebx[EBP], EBX ; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
72 + mov ebp[EBP], EBP ; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
73 + mov esi[EBP], ESI ; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
74 + mov edi[EBP], EDI ; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
75 + } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
76 + } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
77 + else |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
78 + { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
79 + static assert( false, "Architecture not supported." ); |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
80 + } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
81 + } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
82 + else version( D_InlineAsm_X86 ) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
83 + { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
84 asm |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
85 { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
86 pushad; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
87 @@ -297,8 +318,12 @@ |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
88 } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
89 } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
90 |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
91 - version( D_InlineAsm_X86 ) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
92 + version( LLVMDC) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
93 { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
94 + // nothing to pop |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
95 + } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
96 + else version( D_InlineAsm_X86 ) |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
97 + { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
98 asm |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
99 { |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
100 popad; |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
101 @@ -2286,6 +2311,13 @@ |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
102 version = AsmPPC_Posix; |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
103 } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
104 |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
105 + version( LLVM_InlineAsm_X86 ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
106 + { |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
107 + version( Win32 ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
108 + version = LLVM_AsmX86_Win32; |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
109 + else version( Posix ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
110 + version = LLVM_AsmX86_Posix; |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
111 + } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
112 |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
113 version( Posix ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
114 { |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
115 @@ -2296,6 +2328,8 @@ |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
116 version( AsmX86_Win32 ) {} else |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
117 version( AsmX86_Posix ) {} else |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
118 version( AsmPPC_Posix ) {} else |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
119 + version( LLVM_AsmX86_Win32 ) {} else |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
120 + version( LLVM_AsmX86_Posix ) {} else |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
121 { |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
122 // NOTE: The ucontext implementation requires architecture specific |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
123 // data definitions to operate so testing for it must be done |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
124 @@ -2306,10 +2340,10 @@ |
636
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
125 import tango.stdc.posix.ucontext; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
126 } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
127 } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
128 - |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
129 - const size_t PAGESIZE; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
130 } |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
131 |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
132 +// this can't be private since it's used as default argument to a public function |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
133 +const size_t PAGESIZE; |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
134 |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
135 static this() |
9fb1f559d9e9
updated tango patch so it compiles again with the latests check for using privates as default args for public functions.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
627
diff
changeset
|
136 { |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
137 @@ -2336,7 +2370,7 @@ |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
138 } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
139 } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
140 |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
141 - |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
142 +extern(C) int printf(char*, ...); |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
143 //////////////////////////////////////////////////////////////////////////////// |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
144 // Fiber Entry Point and Context Switch |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
145 //////////////////////////////////////////////////////////////////////////////// |
641
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
146 @@ -2450,6 +2484,22 @@ |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
147 ret; |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
148 } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
149 } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
150 + else version( LLVM_AsmX86_Posix ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
151 + { |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
152 + asm |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
153 + { |
641
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
154 + // clobber registers to save |
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
155 + inc EBX; |
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
156 + inc ESI; |
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
157 + inc EDI; |
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
158 + |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
159 + // store oldp again with more accurate address |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
160 + mov EAX, oldp; |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
161 + mov [EAX], ESP; |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
162 + // load newp to begin context switch |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
163 + mov ESP, newp; |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
164 + } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
165 + } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
166 else static if( is( ucontext_t ) ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
167 { |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
168 Fiber cfib = Fiber.getThis(); |
641
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
169 @@ -3115,6 +3165,16 @@ |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
170 push( 0x00000000 ); // ESI |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
171 push( 0x00000000 ); // EDI |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
172 } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
173 + else version( LLVM_AsmX86_Posix ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
174 + { |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
175 + push( cast(size_t) &fiber_entryPoint ); // EIP |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
176 + push( 0x00000000 ); // newp |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
177 + push( 0x00000000 ); // oldp |
641
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
178 + push( 0x00000000 ); // EBP |
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
179 + push( 0x00000000 ); // EBX |
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
180 + push( 0x00000000 ); // ESI |
d9927f20758b
Fiber support: clobber the registers we want restored on a context switch.
Christian Kamm <kamm incasoftware de>
parents:
640
diff
changeset
|
181 + push( 0x00000000 ); // EDI |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
182 + } |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
183 else version( AsmPPC_Posix ) |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
184 { |
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
185 version( StackGrowsDown ) |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
186 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
|
187 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
188 --- lib/unittest.sh (revision 3954) |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
189 +++ 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
|
190 @@ -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
|
191 --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
|
192 --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
|
193 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
|
194 - 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
|
195 - 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
|
196 + 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
|
197 + 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
|
198 + 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
|
199 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
200 <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
|
201 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
|
202 @@ -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
|
203 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
|
204 EOF |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
205 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
206 - 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
|
207 + 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
|
208 -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
|
209 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
|
210 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
|
211 @@ -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
|
212 gdc) |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
213 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
|
214 ;; |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
215 + llvmdc) |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
216 + 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
|
217 + ;; |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
218 *) |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
219 usage |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
220 ;; |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
221 @@ -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
|
222 shift |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
223 done |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
224 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
225 -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
|
226 +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
|
227 then |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
228 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
|
229 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
|
230 + 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
|
231 fi |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
232 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
233 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
|
234 @@ -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
|
235 then |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
236 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
|
237 fi |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
238 - |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
239 +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
|
240 +then |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
241 + 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
|
242 +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
|
243 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
|
244 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
245 --- lib/gc/basic/gcx.d (revision 3954) |
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
|
246 +++ 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
|
247 @@ -65,6 +65,13 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
248 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
249 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
250 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
251 +struct BlkInfo |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
252 +{ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
253 + void* base; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
254 + size_t size; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
255 + uint attr; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
256 +} |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
257 + |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
258 private |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
259 { |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
260 enum BlkAttr : uint |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
261 @@ -75,13 +82,6 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
262 ALL_BITS = 0b1111_1111 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
263 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
264 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
265 - struct BlkInfo |
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 - void* base; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
268 - size_t size; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
269 - uint attr; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
270 - } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
271 - |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
272 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
|
273 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
|
274 |
540
9312024a7053
Gah, missed something still. I'll test properly next time ;)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
539
diff
changeset
|
275 @@ -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
|
276 __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
|
277 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
|
278 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
279 + 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
|
280 + { |
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
|
281 + 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
|
282 + { |
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
|
283 + 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
|
284 + 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
|
285 + { |
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
|
286 + 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
|
287 + 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
|
288 + 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
|
289 + 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
|
290 + 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
|
291 + 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
|
292 + 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
|
293 + 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
|
294 + } |
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
|
295 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
296 + 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
|
297 + { |
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
|
298 + 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
|
299 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
300 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
301 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
|
302 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
303 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
|
304 @@ -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
|
305 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
306 // 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
|
307 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
308 + 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
|
309 + { |
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
|
310 + // 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
|
311 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
312 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
|
313 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
314 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
|
315 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
|
316 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
317 --- lib/gc/basic/gcbits.d (revision 3954) |
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
|
318 +++ 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
|
319 @@ -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
|
320 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
321 // 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
|
322 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
323 +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
|
324 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
325 + // 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
|
326 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
327 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
|
328 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
329 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
|
330 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
|
331 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
332 --- tango/text/convert/Layout.d (revision 3954) |
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
|
333 +++ 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
|
334 @@ -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
|
335 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
|
336 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
|
337 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
338 +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
|
339 + { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
340 + 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
|
341 + 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
|
342 + 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
|
343 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
344 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
|
345 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
346 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
|
347 @@ -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
|
348 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
|
349 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
|
350 |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
351 - 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
|
352 + 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
|
353 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
354 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
|
355 + 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
|
356 + { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
357 + 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
|
358 + 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
|
359 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
360 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
361 + 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
|
362 + { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
363 + 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
|
364 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
|
365 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
|
366 long[64] longargs = void; |
642
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
367 Index: tango/io/vfs/model/Vfs.d |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
368 =================================================================== |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
369 --- tango/io/vfs/model/Vfs.d (revision 3954) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
370 +++ tango/io/vfs/model/Vfs.d (working copy) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
371 @@ -38,7 +38,7 @@ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
372 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
373 *******************************************************************************/ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
374 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
375 -private struct VfsStats |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
376 +struct VfsStats |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
377 { |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
378 ulong bytes; // byte count of files |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
379 uint files, // number of files |
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
|
380 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
|
381 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
382 --- tango/core/Vararg.d (revision 3954) |
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
|
383 +++ 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
|
384 @@ -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
|
385 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
386 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
|
387 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
388 +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
|
389 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
390 + 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
|
391 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
392 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
|
393 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
394 /** |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
395 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
|
396 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
397 --- tango/core/Atomic.d (revision 3954) |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
398 +++ tango/core/Atomic.d (working copy) |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
399 @@ -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
|
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 //////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
403 +// 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
|
404 +//////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
405 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
406 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
407 +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
|
408 +{ |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
409 + 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
|
410 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
411 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
412 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
413 + // 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
|
414 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
415 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
416 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
417 + 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
|
418 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
419 + 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
|
420 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
421 + 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
|
422 + 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
|
423 + 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
|
424 + 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
|
425 + 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
|
426 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
427 + 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
|
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 + 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
|
430 + } |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
431 + else static if (is(T == bool)) |
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
432 + { |
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
433 + 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
|
434 + } |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
435 + else |
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 + 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
|
438 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
439 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
440 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
441 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
442 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
443 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
444 + // 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
|
445 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
446 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
447 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
448 + 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
|
449 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
450 + 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
|
451 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
452 + 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
|
453 + 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
|
454 + 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
|
455 + 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
|
456 + 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
|
457 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
458 + 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
|
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 + 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
|
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 + 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
|
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 + 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
|
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 + else |
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_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
|
469 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
470 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
471 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
472 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
473 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
474 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
475 + // 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
|
476 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
477 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
478 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
479 + 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
|
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 + 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
|
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 + 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
|
484 + 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
|
485 + 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
|
486 + 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
|
487 + 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
|
488 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
489 + 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
|
490 + 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
|
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 + 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
|
493 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
494 + 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
|
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 + 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
|
497 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
498 + else |
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 + 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
|
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 + 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
|
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 + |
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 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
508 + // 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
|
509 + //////////////////////////////////////////////////////////////////////////// |
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 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
512 + 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
|
513 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
514 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
515 + // 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
|
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 + 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
|
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 + 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
|
521 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
522 + 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
|
523 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
524 + 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
|
525 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
526 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
527 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
528 + 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
|
529 + } |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
530 + 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
|
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 + |
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 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
536 + // 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
|
537 + //////////////////////////////////////////////////////////////////////////// |
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 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
540 + 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
|
541 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
542 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
543 + // 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
|
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 + 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
|
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 + 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
|
549 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
550 + 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
|
551 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
552 + 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
|
553 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
554 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
555 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
556 + 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
|
557 + } |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
558 + 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
|
559 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
560 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
561 +} |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
562 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
563 +//////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
564 // 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
|
565 //////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
566 |
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
|
567 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
|
568 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
569 --- tango/math/Math.d (revision 3954) |
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
|
570 +++ 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
|
571 @@ -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
|
572 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
|
573 } |
44f08170f4ef
Removed tango from the repository and instead added a 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 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
575 +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
|
576 +{ |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
577 + import llvmdc.intrinsics; |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
578 + 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
|
579 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
580 + 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
|
581 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
582 +} |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
583 |
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
|
584 /* |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
585 * Constants |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
586 @@ -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
|
587 * Bugs: |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
588 * 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
|
589 */ |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
590 +version(LLVMDC) |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
591 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
592 + 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
|
593 + 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
|
594 + version(X86) |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
595 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
596 + 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
|
597 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
598 + else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
599 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
600 + 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
|
601 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
602 + 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
|
603 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
604 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
605 +} |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
606 +else |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
607 +{ |
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
|
608 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
|
609 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
610 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
|
611 @@ -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
|
612 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
|
613 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
614 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
615 +} |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
616 |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
617 debug(UnitTest) { |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
618 unittest { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
619 @@ -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
|
620 * Bugs: |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
621 * 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
|
622 */ |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
623 +version(LLVMDC) |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
624 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
625 + 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
|
626 + 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
|
627 + version(X86) |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
628 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
629 + 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
|
630 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
631 + else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
632 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
633 + 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
|
634 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
635 + 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
|
636 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
637 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
638 +} |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
639 +else |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
640 +{ |
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
|
641 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
|
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 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
|
644 @@ -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
|
645 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
|
646 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
647 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
648 +} |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
649 |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
650 debug(UnitTest) { |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
651 unittest { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
652 @@ -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
|
653 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
654 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
|
655 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
|
656 - } 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
|
657 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
658 + else version(LLVMDC) { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
659 + 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
|
660 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
661 + 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
|
662 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
|
663 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
664 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
|
665 @@ -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
|
666 * <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
|
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 */ |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
669 +version(LLVMDC) |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
670 +{ |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
671 + 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
|
672 + 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
|
673 + 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
|
674 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
675 + 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
|
676 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
677 + 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
|
678 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
679 + 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
|
680 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
681 + 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
|
682 + } |
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
|
683 + } |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
684 +} |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
685 +else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
686 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
687 + |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
688 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
|
689 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
690 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
|
691 @@ -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
|
692 } |
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 |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
695 +} |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
696 + |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
697 /** ditto */ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
698 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
|
699 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
700 @@ -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
|
701 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
702 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
703 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
704 - 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
|
705 + 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
|
706 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
707 + 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
|
708 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
709 + 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
|
710 + { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
711 + 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
|
712 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
713 } |
44f08170f4ef
Removed tango from the repository and instead added a 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 |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
716 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
|
717 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
718 --- tango/math/internal/BignumX86.d (revision 3954) |
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
|
719 +++ tango/math/internal/BignumX86.d (working copy) |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
720 @@ -56,6 +56,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
|
721 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
|
722 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
|
723 // 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
|
724 +} 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
|
725 + // 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
|
726 } 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
|
727 /* 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
|
728 * |
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
|
729 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
|
730 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
731 --- tango/stdc/stdlib.d (revision 3954) |
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
|
732 +++ 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
|
733 @@ -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
|
734 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
736 } |
44f08170f4ef
Removed tango from the repository and instead added a 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 +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
|
738 +{ |
44f08170f4ef
Removed tango from the repository and instead added a 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 + 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
|
740 + 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
|
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 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
|
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 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
|
745 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
|
746 =================================================================== |
640
c2a342b5d8e5
Made Fibers work with LLVMDC on x86 Posix.
Christian Kamm <kamm incasoftware de>
parents:
636
diff
changeset
|
747 --- tango/stdc/stdarg.d (revision 3954) |
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
|
748 +++ 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
|
749 @@ -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
|
750 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
751 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
|
752 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
753 +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
|
754 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
755 + 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
|
756 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
757 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
|
758 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
759 alias void* va_list; |
642
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
760 Index: tango/util/log/Log.d |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
761 =================================================================== |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
762 --- tango/util/log/Log.d (revision 3954) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
763 +++ tango/util/log/Log.d (working copy) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
764 @@ -1275,7 +1275,7 @@ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
765 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
766 *******************************************************************************/ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
767 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
768 -private struct LogEvent |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
769 +struct LogEvent |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
770 { |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
771 private char[] msg_, |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
772 name_; |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
773 Index: tango/time/chrono/GregorianBased.d |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
774 =================================================================== |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
775 --- tango/time/chrono/GregorianBased.d (revision 3954) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
776 +++ tango/time/chrono/GregorianBased.d (working copy) |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
777 @@ -21,7 +21,7 @@ |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
778 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
779 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
780 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
781 -private class GregorianBased : Gregorian { |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
782 +class GregorianBased : Gregorian { |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
783 |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
784 private EraRange[] eraRanges_; |
307ae566885f
Make default argument protection check not error for undefined protection.
Christian Kamm <kamm incasoftware de>
parents:
641
diff
changeset
|
785 private int maxYear_, minYear_; |