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