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