Mercurial > projects > ldc
annotate runtime/ldc.diff @ 823:794c8af186ce
Fixed non-static struct initializers.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 03 Dec 2008 01:40:28 +0100 |
parents | 43178a913a28 |
children | e66c627c177e |
rev | line source |
---|---|
775 | 1 Index: lib/common/tango/core/BitManip.d |
2 =================================================================== | |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
3 --- lib/common/tango/core/BitManip.d (revision 4145) |
775 | 4 +++ lib/common/tango/core/BitManip.d (working copy) |
5 @@ -171,6 +171,10 @@ | |
6 */ | |
7 uint outpl( uint port_address, uint value ); | |
8 } | |
9 +else version( LDC ) | |
10 +{ | |
11 + public import ldc.bitmanip; | |
12 +} | |
13 else | |
14 { | |
15 public import std.intrinsic; | |
16 Index: lib/common/tango/core/Thread.d | |
17 =================================================================== | |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
18 --- lib/common/tango/core/Thread.d (revision 4145) |
775 | 19 +++ lib/common/tango/core/Thread.d (working copy) |
20 @@ -273,8 +273,50 @@ | |
21 } | |
22 body | |
23 { | |
24 - version( D_InlineAsm_X86 ) | |
25 + version( LDC) | |
26 { | |
27 + version(X86) | |
28 + { | |
29 + uint eax,ecx,edx,ebx,ebp,esi,edi; | |
30 + asm | |
31 + { | |
32 + mov eax[EBP], EAX ; | |
33 + mov ecx[EBP], ECX ; | |
34 + mov edx[EBP], EDX ; | |
35 + mov ebx[EBP], EBX ; | |
36 + mov ebp[EBP], EBP ; | |
37 + mov esi[EBP], ESI ; | |
38 + mov edi[EBP], EDI ; | |
39 + } | |
40 + } | |
41 + else version (X86_64) | |
42 + { | |
43 + ulong rax,rbx,rcx,rdx,rbp,rsi,rdi,rsp,r10,r11,r12,r13,r14,r15; | |
44 + asm | |
45 + { | |
46 + movq rax[RBP], RAX ; | |
47 + movq rbx[RBP], RBX ; | |
48 + movq rcx[RBP], RCX ; | |
49 + movq rdx[RBP], RDX ; | |
50 + movq rbp[RBP], RBP ; | |
51 + movq rsi[RBP], RSI ; | |
52 + movq rdi[RBP], RDI ; | |
53 + movq rsp[RBP], RSP ; | |
54 + movq r10[RBP], R10 ; | |
55 + movq r11[RBP], R11 ; | |
56 + movq r12[RBP], R12 ; | |
57 + movq r13[RBP], R13 ; | |
58 + movq r14[RBP], R14 ; | |
59 + movq r15[RBP], R15 ; | |
60 + } | |
61 + } | |
62 + else | |
63 + { | |
64 + static assert( false, "Architecture not supported." ); | |
65 + } | |
66 + } | |
67 + else version( D_InlineAsm_X86 ) | |
68 + { | |
69 asm | |
70 { | |
71 pushad; | |
72 @@ -330,8 +372,12 @@ | |
73 } | |
74 } | |
75 | |
76 - version( D_InlineAsm_X86 ) | |
77 + version( LDC) | |
78 { | |
79 + // nothing to pop | |
80 + } | |
81 + else version( D_InlineAsm_X86 ) | |
82 + { | |
83 asm | |
84 { | |
85 popad; | |
777
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
86 @@ -2347,6 +2393,18 @@ |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
87 version( Posix ) |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
88 version = AsmPPC_Posix; |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
89 } |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
90 + version( LLVM_InlineAsm_X86 ) |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
91 + { |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
92 + version( Win32 ) |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
93 + version = LLVM_AsmX86_Win32; |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
94 + else version( Posix ) |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
95 + version = LLVM_AsmX86_Posix; |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
96 + } |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
97 + else version( LLVM_InlineAsm_X86_64 ) |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
98 + { |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
99 + version( Posix ) |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
100 + version = LLVM_AsmX86_64_Posix; |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
101 + } |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
102 |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
103 version( Posix ) |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
104 { |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
105 @@ -2357,6 +2415,10 @@ |
775 | 106 version( AsmX86_Win32 ) {} else |
107 version( AsmX86_Posix ) {} else | |
108 version( AsmPPC_Posix ) {} else | |
109 + version( LLVM_AsmX86_Win32 ) {} else | |
110 + version( LLVM_AsmX86_Posix ) {} else | |
111 +//TODO: Enable when x86-64 Posix supports fibers | |
112 +// version( LLVM_AsmX86_64_Posix ) {} else | |
113 { | |
114 // NOTE: The ucontext implementation requires architecture specific | |
115 // data definitions to operate so testing for it must be done | |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
116 @@ -2510,6 +2572,28 @@ |
818
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
117 ret; |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
118 } |
775 | 119 } |
120 + else version( LLVM_AsmX86_Posix ) | |
121 + { | |
122 + asm | |
123 + { | |
124 + // clobber registers to save | |
125 + inc EBX; | |
126 + inc ESI; | |
127 + inc EDI; | |
128 + | |
129 + // store oldp again with more accurate address | |
130 + mov EAX, oldp; | |
131 + mov [EAX], ESP; | |
132 + // load newp to begin context switch | |
133 + mov ESP, newp; | |
134 + } | |
135 + } | |
136 +/+ | |
137 + version( LLVM_AsmX86_64_Posix ) | |
138 + { | |
139 + //TODO: Fiber implementation here | |
140 + } | |
141 ++/ | |
142 else static if( is( ucontext_t ) ) | |
143 { | |
818
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
144 Fiber cfib = Fiber.getThis(); |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
145 @@ -2522,7 +2606,7 @@ |
818
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
146 } |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
147 } |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
148 |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
149 - |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
150 +extern(C) int printf(char*, ...); |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
151 //////////////////////////////////////////////////////////////////////////////// |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
152 // Fiber |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
153 //////////////////////////////////////////////////////////////////////////////// |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
154 @@ -3177,6 +3261,22 @@ |
818
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
155 push( 0x00000000 ); // ESI |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
156 push( 0x00000000 ); // EDI |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
157 } |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
158 + else version( LLVM_AsmX86_Posix ) |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
159 + { |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
160 + push( cast(size_t) &fiber_entryPoint ); // EIP |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
161 + push( 0x00000000 ); // newp |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
162 + push( 0x00000000 ); // oldp |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
163 + push( 0x00000000 ); // EBP |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
164 + push( 0x00000000 ); // EBX |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
165 + push( 0x00000000 ); // ESI |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
166 + push( 0x00000000 ); // EDI |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
167 + } |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
168 +//TODO: Implement x86-64 fibers |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
169 +/+ |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
170 + else version( LLVM_AsmX86_Posix ) |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
171 + { |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
172 + } |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
173 ++/ |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
174 else version( AsmPPC_Posix ) |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
175 { |
e8f8cafcaa62
Fix fibers in tango patch
Christian Kamm <kamm incasoftware de>
parents:
795
diff
changeset
|
176 version( StackGrowsDown ) |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
177 Index: lib/unittest.sh |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
178 =================================================================== |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
179 --- lib/unittest.sh (revision 4145) |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
180 +++ lib/unittest.sh (working copy) |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
181 @@ -18,8 +18,9 @@ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
182 --help: This message |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
183 --run-all: Reports result instead of breaking. Do not use this if you want to |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
184 run unittest runner through a debugger. |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
185 - dmd: Builds unittests for dmd |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
186 - gdc: Builds unittests for gdc |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
187 + dmd: Builds unittests for dmd |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
188 + gdc: Builds unittests for gdc |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
189 + ldc: Builds unittests for ldc |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
190 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
191 <none>: Builds unittests for all known compilers.' |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
192 exit 0 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
193 @@ -86,7 +87,7 @@ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
194 void main() {} |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
195 EOF |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
196 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
197 - rebuild -w -d -g -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
198 + rebuild -w -d -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
199 -version=UnitTest $EXE.d tango/core/*.d tango/core/sync/*.d tango/io/digest/*.d \ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
200 tango/io/model/*.d tango/io/protocol/*.d tango/io/selector/*.d tango/io/*.d \ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
201 tango/io/vfs/*.d tango/io/vfs/model/*.d \ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
202 @@ -125,6 +126,9 @@ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
203 gdc) |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
204 GDC=1 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
205 ;; |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
206 + ldc) |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
207 + LDC=1 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
208 + ;; |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
209 *) |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
210 usage |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
211 ;; |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
212 @@ -132,10 +136,11 @@ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
213 shift |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
214 done |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
215 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
216 -if [ ! "$DMD" -a ! "$GDC" ] |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
217 +if [ ! "$DMD" -a ! "$GDC" -a ! "$LDC" ] |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
218 then |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
219 DMD=1 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
220 GDC=1 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
221 + LDC=1 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
222 fi |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
223 |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
224 if [ "$DMD" = "1" ] |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
225 @@ -146,4 +151,7 @@ |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
226 then |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
227 compile gdc runUnitTest_gdc |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
228 fi |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
229 - |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
230 +if [ "$LDC" = "1" ] |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
231 +then |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
232 + compile ldc runUnitTest_ldc |
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
233 +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
|
234 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
|
235 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
236 --- lib/gc/basic/gcx.d (revision 4145) |
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
|
237 +++ 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
|
238 @@ -65,6 +65,13 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
239 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
240 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
241 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
242 +struct BlkInfo |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
243 +{ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
244 + void* base; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
245 + size_t size; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
246 + uint attr; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
247 +} |
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 private |
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 enum BlkAttr : uint |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
252 @@ -75,13 +82,6 @@ |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
253 ALL_BITS = 0b1111_1111 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
254 } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
255 |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
256 - struct BlkInfo |
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 - void* base; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
259 - size_t size; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
260 - uint attr; |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
261 - } |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
262 - |
79cbe5034fec
Tango patch: xml document fixes and symbol visibility in gc
Christian Kamm <kamm incasoftware de>
parents:
615
diff
changeset
|
263 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
|
264 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
|
265 |
755
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
266 @@ -2178,6 +2178,49 @@ |
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
|
267 __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
|
268 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
|
269 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
270 + else version(LDC) |
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
|
271 + { |
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
|
272 + 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
|
273 + { |
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
|
274 + 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
|
275 + 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
|
276 + { |
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
|
277 + 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
|
278 + 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
|
279 + 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
|
280 + 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
|
281 + 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
|
282 + 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
|
283 + 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
|
284 + 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
|
285 + } |
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
|
286 + } |
755
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
287 + else version (X86_64) |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
288 + { |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
289 + ulong rax,rbx,rcx,rdx,rbp,rsi,rdi,rsp,r10,r11,r12,r13,r14,r15; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
290 + asm |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
291 + { |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
292 + movq rax[RBP], RAX ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
293 + movq rbx[RBP], RBX ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
294 + movq rcx[RBP], RCX ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
295 + movq rdx[RBP], RDX ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
296 + movq rbp[RBP], RBP ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
297 + movq rsi[RBP], RSI ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
298 + movq rdi[RBP], RDI ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
299 + movq rsp[RBP], RSP ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
300 + movq r10[RBP], R10 ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
301 + movq r11[RBP], R11 ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
302 + movq r12[RBP], R12 ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
303 + movq r13[RBP], R13 ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
304 + movq r14[RBP], R14 ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
305 + movq r15[RBP], R15 ; |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
306 + } |
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
307 + } |
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
|
308 + 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
|
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 + 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
|
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 + } |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
314 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 asm |
755
61c7a96f28c3
Merge in most of x86-64 tango patch.
Christian Kamm <kamm incasoftware de>
parents:
754
diff
changeset
|
316 @@ -2191,6 +2234,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
|
317 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 // 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
|
319 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
320 + else version(LDC) |
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
|
321 + { |
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
|
322 + // 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
|
323 + } |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
325 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
327 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
|
328 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
329 --- lib/gc/basic/gcbits.d (revision 4145) |
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
|
330 +++ 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
|
331 @@ -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
|
332 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 // 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
|
334 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
335 +else version(LDC) |
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
|
336 +{ |
44f08170f4ef
Removed tango from the repository and instead added a 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 + // 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
|
338 +} |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
340 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 version = Asm86; |
685
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
342 Index: lib/build-tango.sh |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
343 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
344 --- lib/build-tango.sh (revision 4145) |
685
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
345 +++ lib/build-tango.sh (working copy) |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
346 @@ -23,7 +23,7 @@ |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
347 --debug: Will enable debug info |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
348 --warn: Will enable warnings |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
349 --verbose: Increase verbosity |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
350 - <identifier> is one of {dmd, gdc, mac} and will build libtango.a, |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
351 + <identifier> is one of {dmd, gdc, ldc, mac} and will build libtango.a, |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
352 libgtango.a or universal Mac binaries respectively |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
353 |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
354 The script must be called from within lib/ and the resulting |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
355 @@ -105,7 +105,7 @@ |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
356 if filter $OBJNAME |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
357 then |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
358 if [ $VERBOSE == 1 ]; then echo "[$DC] $FILENAME"; fi |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
359 - $DC $WARN -c $INLINE $DEBUG $RELEASE -version=Posix -version=Tango -of$OBJNAME $FILENAME |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
360 + $DC $WARN -c $INLINE $DEBUG $RELEASE -version=Tango -of$OBJNAME $FILENAME |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
361 if [ "$?" != 0 ] |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
362 then |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
363 return 1; |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
364 @@ -189,6 +189,9 @@ |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
365 gdc) |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
366 build gdmd libgtango.a libgphobos.a |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
367 ;; |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
368 + ldc) |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
369 + build ldc libtango-user-ldc.a build-tango.sh |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
370 + ;; |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
371 mac) |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
372 # build Universal Binary version of the Tango library |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
373 build powerpc-apple-darwin8-gdmd libgtango.a.ppc libgphobos.a.ppc |
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
|
374 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
|
375 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
376 --- tango/text/convert/Layout.d (revision 4145) |
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
|
377 +++ 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
|
378 @@ -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
|
379 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
|
380 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
|
381 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
382 +else version(LDC) |
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 + { |
44f08170f4ef
Removed tango from the repository and instead added a 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 + 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
|
385 + 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
|
386 + 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
|
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 |
44f08170f4ef
Removed tango from the repository and instead added a 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 alias void* Arg; |
754
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
391 @@ -295,7 +301,7 @@ |
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
392 foreach (i, arg; arguments) |
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
393 { |
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
394 arglist[i] = args; |
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
395 - args += (arg.tsize + int.sizeof - 1) & ~ (int.sizeof - 1); |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
396 + args += (arg.tsize + size_t.sizeof - 1) & ~ (size_t.sizeof - 1); |
754
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
397 } |
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
398 } |
f34b552619fd
Update tango patch to latest tango revision.
Christian Kamm <kamm incasoftware de>
parents:
698
diff
changeset
|
399 return parse (formatStr, arguments, arglist, sink); |
685
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
400 Index: tango/net/cluster/CacheInvalidator.d |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
401 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
402 --- tango/net/cluster/CacheInvalidator.d (revision 4145) |
685
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
403 +++ tango/net/cluster/CacheInvalidator.d (working copy) |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
404 @@ -79,7 +79,7 @@ |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
405 |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
406 *******************************************************************************/ |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
407 |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
408 -private class InvalidatorPayload : NetworkMessage |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
409 +package class InvalidatorPayload : NetworkMessage |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
410 { |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
411 private char[] key_; |
8d7e58801c82
Adjust build-tango.sh for ldc.
Christian Kamm <kamm incasoftware de>
parents:
665
diff
changeset
|
412 |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
413 Index: tango/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
|
414 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
415 --- tango/core/Vararg.d (revision 4145) |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
416 +++ tango/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
|
417 @@ -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
|
418 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
419 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
|
420 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
421 +else version( LDC ) |
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
|
422 +{ |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
423 + public import ldc.vararg; |
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
|
424 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
425 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
|
426 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
427 /** |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
428 Index: tango/core/sync/Semaphore.d |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
429 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
430 --- tango/core/sync/Semaphore.d (revision 4145) |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
431 +++ tango/core/sync/Semaphore.d (working copy) |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
432 @@ -384,7 +384,8 @@ |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
433 { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
434 synchronized( synComplete ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
435 { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
436 - if( numComplete == numConsumers ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
437 + // if( numComplete == numConsumers ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
438 + if( numComplete == numToProduce ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
439 break; |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
440 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
441 Thread.yield(); |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
442 @@ -392,9 +393,9 @@ |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
443 |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
444 synchronized( synComplete ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
445 { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
446 - assert( numComplete == numConsumers ); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
447 + assert( numComplete == numToProduce ); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
448 + // assert( numComplete == numConsumers ); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
449 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
450 - |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
451 synchronized( synConsumed ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
452 { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
453 assert( numConsumed == numToProduce ); |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
454 @@ -455,7 +456,8 @@ |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
455 |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
456 unittest |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
457 { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
458 + version(darwin){}else{ |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
459 testWait(); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
460 - testWaitTimeout(); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
461 + testWaitTimeout();} |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
462 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
463 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
464 Index: tango/core/sync/Condition.d |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
465 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
466 --- tango/core/sync/Condition.d (revision 4145) |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
467 +++ tango/core/sync/Condition.d (working copy) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
468 @@ -553,8 +553,11 @@ |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
469 |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
470 unittest |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
471 { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
472 + version(darwin){} |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
473 + else{ |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
474 testNotify(); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
475 testNotifyAll(); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
476 testWaitTimeout(); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
477 + } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
478 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
479 } |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
480 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
|
481 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
482 --- tango/core/Atomic.d (revision 4145) |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
483 +++ tango/core/Atomic.d (working copy) |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
484 @@ -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
|
485 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
486 |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
487 //////////////////////////////////////////////////////////////////////////////// |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
488 +// LDC Atomics Implementation |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
489 +//////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
490 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
491 + |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
492 +else version( LDC ) |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
493 +{ |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
494 + import ldc.intrinsics; |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
495 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
496 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
497 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
498 + // 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
|
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 + |
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 + 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
|
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 + 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
|
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 + 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
|
507 + 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
|
508 + 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
|
509 + 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
|
510 + 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
|
511 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
512 + 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
|
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 + 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
|
515 + } |
613
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
516 + else static if (is(T == bool)) |
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
517 + { |
19cbc612380a
Add bool-special cases in tango.core.Atomic.
Christian Kamm <kamm incasoftware de>
parents:
609
diff
changeset
|
518 + 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
|
519 + } |
529
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
520 + else |
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 + 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
|
523 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
524 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
525 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
526 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
527 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
528 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
529 + // 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
|
530 + //////////////////////////////////////////////////////////////////////////// |
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 + 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
|
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 + 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
|
536 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
537 + 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
|
538 + 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
|
539 + 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
|
540 + 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
|
541 + 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
|
542 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
543 + 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
|
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 + 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
|
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 + 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
|
548 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
549 + 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
|
550 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
551 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
552 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
553 + 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
|
554 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
555 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
556 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
557 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
558 + |
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 + // 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
|
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 + 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
|
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 + 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
|
567 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
568 + 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
|
569 + 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
|
570 + 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
|
571 + 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
|
572 + 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
|
573 + false); |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
574 + 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
|
575 + 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
|
576 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
577 + 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
|
578 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
579 + 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
|
580 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
581 + 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
|
582 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
583 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
584 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
585 + 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
|
586 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
587 + 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
|
588 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
589 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
590 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
591 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
592 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
593 + // 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
|
594 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
595 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
596 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
597 + 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
|
598 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
599 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
600 + // 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
|
601 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
602 + 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
|
603 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
604 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
605 + 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
|
606 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
607 + 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
|
608 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
609 + 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
|
610 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
611 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
612 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
613 + 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
|
614 + } |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
615 + 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
|
616 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
617 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
618 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
619 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
620 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
621 + // 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
|
622 + //////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
623 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
624 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
625 + 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
|
626 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
627 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
628 + // 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
|
629 + // |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
630 + 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
|
631 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
632 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
633 + 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
|
634 + { |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
635 + 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
|
636 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
637 + 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
|
638 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
639 + else |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
640 + { |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
641 + 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
|
642 + } |
615
c60e122f4ada
Fix atomicIncr and atomicDecr. Probably.
Christian Kamm <kamm incasoftware de>
parents:
613
diff
changeset
|
643 + 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
|
644 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
645 + } |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
646 +} |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
647 + |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
648 +//////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
649 // 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
|
650 //////////////////////////////////////////////////////////////////////////////// |
cef0cbcf7d22
Updated tango patch, with rewrittten Atomics using llvm atomic intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
454
diff
changeset
|
651 |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
652 Index: tango/math/IEEE.d |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
653 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
654 --- tango/math/IEEE.d (revision 4145) |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
655 +++ tango/math/IEEE.d (working copy) |
777
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
656 @@ -1554,7 +1554,12 @@ |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
657 return (bitsdiff == 0 && !((pa[F.EXPPOS_SHORT] ^ pb[F.EXPPOS_SHORT])& F.EXPMASK)) ? 1 : 0; |
961e249eb2aa
Include x86-32 fiber fixes in tango patch again.
Christian Kamm <kamm incasoftware de>
parents:
776
diff
changeset
|
658 } |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
659 } else { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
660 - assert(0, "Unsupported"); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
661 + static if (is(X==real)){ |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
662 + static assert(0, X.stringof~" unsupported by feqrel"); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
663 + } else { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
664 + int res=feqrel(cast(real)x,cast(real)y); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
665 + return ((res>X.mant_dig)?X.mant_dig:res); |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
666 + } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
667 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
668 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
669 |
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
|
670 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
|
671 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
672 --- tango/math/Math.d (revision 4145) |
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
|
673 +++ 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
|
674 @@ -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
|
675 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
|
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 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
678 +else version(LDC) |
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
|
679 +{ |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
680 + import ldc.intrinsics; |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
681 + 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
|
682 + { |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
683 + version = LDC_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
|
684 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
685 +} |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
686 |
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
|
687 /* |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
688 * Constants |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
689 @@ -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
|
690 * Bugs: |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
691 * 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
|
692 */ |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
693 +version(LDC) |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
694 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
695 + 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
|
696 + 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
|
697 + version(X86) |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
698 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
699 + 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
|
700 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
701 + else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
702 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
703 + 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
|
704 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
705 + 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
|
706 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
707 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
708 +} |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
709 +else |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
710 +{ |
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
|
711 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
|
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 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
|
714 @@ -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
|
715 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
|
716 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
717 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
718 +} |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
719 |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
720 debug(UnitTest) { |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
721 unittest { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
722 @@ -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
|
723 * Bugs: |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
724 * 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
|
725 */ |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
726 +version(LDC) |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
727 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
728 + 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
|
729 + 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
|
730 + version(X86) |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
731 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
732 + 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
|
733 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
734 + else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
735 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
736 + 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
|
737 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
738 + 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
|
739 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
740 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
741 +} |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
742 +else |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
743 +{ |
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
|
744 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
|
745 { |
44f08170f4ef
Removed tango from the repository and instead added a 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 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
|
747 @@ -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
|
748 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
|
749 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
750 } |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
751 +} |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
752 |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
753 debug(UnitTest) { |
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
754 unittest { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
755 @@ -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
|
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 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
|
758 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
|
759 - } 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
|
760 + } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
761 + else version(LDC) { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
762 + 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
|
763 + } |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
764 + 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
|
765 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
|
766 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
767 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
|
768 @@ -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
|
769 * <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
|
770 * ) |
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
|
771 */ |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
772 +version(LDC) |
444
f2b5f86348ef
Updated tango patch. tango.math.Math was incorrect.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
443
diff
changeset
|
773 +{ |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
774 + 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
|
775 + 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
|
776 + 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
|
777 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
778 + 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
|
779 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
780 + 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
|
781 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
782 + 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
|
783 + { |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
784 + 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
|
785 + } |
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
|
786 + } |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
787 +} |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
788 +else |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
789 +{ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
790 + |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
791 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
|
792 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
793 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
|
794 @@ -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
|
795 } |
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
|
796 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
797 |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
798 +} |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
799 + |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
800 /** ditto */ |
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
801 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
|
802 { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
803 @@ -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
|
804 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
805 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
806 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
807 - return tango.stdc.math.powl(x, y); |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
808 + version(LDC_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
|
809 + { |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
444
diff
changeset
|
810 + 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
|
811 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
812 + 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
|
813 + { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
814 + 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
|
815 + } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
816 } |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
817 |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
818 debug(UnitTest) { |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
819 Index: tango/stdc/posix/sys/types.d |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
820 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
821 --- tango/stdc/posix/sys/types.d (revision 4145) |
698
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
822 +++ tango/stdc/posix/sys/types.d (working copy) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
823 @@ -422,7 +422,11 @@ |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
824 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
825 else version( darwin ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
826 { |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
827 - struct pthread_spinlock_t; |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
828 + version (LDC) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
829 + alias void* pthread_spinlock_t; |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
830 + |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
831 + else |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
832 + struct pthread_spinlock_t; |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
833 } |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
834 else version( freebsd ) |
f0ba5d37dd86
Merge darwin patch for Tango.
Christian Kamm <kamm incasoftware de>
parents:
685
diff
changeset
|
835 { |
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
|
836 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
|
837 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
838 --- tango/stdc/stdlib.d (revision 4145) |
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
|
839 +++ 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
|
840 @@ -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
|
841 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
842 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
|
843 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
844 +else version( LDC ) |
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
|
845 +{ |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
846 + 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
|
847 + 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
|
848 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
849 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
|
850 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
851 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
|
852 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
|
853 =================================================================== |
822
43178a913a28
Removed PAGESIZE part of Tango patch, it works for me when the check is removed.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
818
diff
changeset
|
854 --- tango/stdc/stdarg.d (revision 4145) |
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
|
855 +++ 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
|
856 @@ -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
|
857 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
858 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
|
859 } |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
860 +else version( LDC ) |
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
|
861 +{ |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
647
diff
changeset
|
862 + public import ldc.cstdarg; |
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
|
863 +} |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
864 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
|
865 { |
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff
changeset
|
866 alias void* va_list; |