Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
776:6aa2b350c8cc | 777:961e249eb2aa |
---|---|
1 Index: object.di | 1 Index: object.di |
2 =================================================================== | 2 =================================================================== |
3 --- object.di (revision 4097) | 3 --- object.di (revision 4110) |
4 +++ object.di (working copy) | 4 +++ object.di (working copy) |
5 @@ -150,6 +150,9 @@ | 5 @@ -150,6 +150,9 @@ |
6 void function() dtor; | 6 void function() dtor; |
7 void function() unitTest; | 7 void function() unitTest; |
8 | 8 |
12 static int opApply( int delegate( inout ModuleInfo ) ); | 12 static int opApply( int delegate( inout ModuleInfo ) ); |
13 } | 13 } |
14 | 14 |
15 Index: lib/unittest.sh | 15 Index: lib/unittest.sh |
16 =================================================================== | 16 =================================================================== |
17 --- lib/unittest.sh (revision 4097) | 17 --- lib/unittest.sh (revision 4110) |
18 +++ lib/unittest.sh (working copy) | 18 +++ lib/unittest.sh (working copy) |
19 @@ -18,8 +18,9 @@ | 19 @@ -18,8 +18,9 @@ |
20 --help: This message | 20 --help: This message |
21 --run-all: Reports result instead of breaking. Do not use this if you want to | 21 --run-all: Reports result instead of breaking. Do not use this if you want to |
22 run unittest runner through a debugger. | 22 run unittest runner through a debugger. |
69 +then | 69 +then |
70 + compile ldc runUnitTest_ldc | 70 + compile ldc runUnitTest_ldc |
71 +fi | 71 +fi |
72 Index: lib/common/tango/core/BitManip.d | 72 Index: lib/common/tango/core/BitManip.d |
73 =================================================================== | 73 =================================================================== |
74 --- lib/common/tango/core/BitManip.d (revision 4097) | 74 --- lib/common/tango/core/BitManip.d (revision 4110) |
75 +++ lib/common/tango/core/BitManip.d (working copy) | 75 +++ lib/common/tango/core/BitManip.d (working copy) |
76 @@ -171,6 +171,10 @@ | 76 @@ -171,6 +171,10 @@ |
77 */ | 77 */ |
78 uint outpl( uint port_address, uint value ); | 78 uint outpl( uint port_address, uint value ); |
79 } | 79 } |
84 else | 84 else |
85 { | 85 { |
86 public import std.intrinsic; | 86 public import std.intrinsic; |
87 Index: lib/common/tango/core/Thread.d | 87 Index: lib/common/tango/core/Thread.d |
88 =================================================================== | 88 =================================================================== |
89 --- lib/common/tango/core/Thread.d (revision 4097) | 89 --- lib/common/tango/core/Thread.d (revision 4110) |
90 +++ lib/common/tango/core/Thread.d (working copy) | 90 +++ lib/common/tango/core/Thread.d (working copy) |
91 @@ -273,8 +273,50 @@ | 91 @@ -273,8 +273,50 @@ |
92 } | 92 } |
93 body | 93 body |
94 { | 94 { |
152 + else version( D_InlineAsm_X86 ) | 152 + else version( D_InlineAsm_X86 ) |
153 + { | 153 + { |
154 asm | 154 asm |
155 { | 155 { |
156 popad; | 156 popad; |
157 @@ -2357,6 +2403,10 @@ | 157 @@ -2347,6 +2393,18 @@ |
158 version( Posix ) | |
159 version = AsmPPC_Posix; | |
160 } | |
161 + version( LLVM_InlineAsm_X86 ) | |
162 + { | |
163 + version( Win32 ) | |
164 + version = LLVM_AsmX86_Win32; | |
165 + else version( Posix ) | |
166 + version = LLVM_AsmX86_Posix; | |
167 + } | |
168 + else version( LLVM_InlineAsm_X86_64 ) | |
169 + { | |
170 + version( Posix ) | |
171 + version = LLVM_AsmX86_64_Posix; | |
172 + } | |
173 | |
174 version( Posix ) | |
175 { | |
176 @@ -2357,6 +2415,10 @@ | |
158 version( AsmX86_Win32 ) {} else | 177 version( AsmX86_Win32 ) {} else |
159 version( AsmX86_Posix ) {} else | 178 version( AsmX86_Posix ) {} else |
160 version( AsmPPC_Posix ) {} else | 179 version( AsmPPC_Posix ) {} else |
161 + version( LLVM_AsmX86_Win32 ) {} else | 180 + version( LLVM_AsmX86_Win32 ) {} else |
162 + version( LLVM_AsmX86_Posix ) {} else | 181 + version( LLVM_AsmX86_Posix ) {} else |
163 +//TODO: Enable when x86-64 Posix supports fibers | 182 +//TODO: Enable when x86-64 Posix supports fibers |
164 +// version( LLVM_AsmX86_64_Posix ) {} else | 183 +// version( LLVM_AsmX86_64_Posix ) {} else |
165 { | 184 { |
166 // NOTE: The ucontext implementation requires architecture specific | 185 // NOTE: The ucontext implementation requires architecture specific |
167 // data definitions to operate so testing for it must be done | 186 // data definitions to operate so testing for it must be done |
168 @@ -2367,9 +2417,11 @@ | 187 @@ -2367,9 +2429,11 @@ |
169 import tango.stdc.posix.ucontext; | 188 import tango.stdc.posix.ucontext; |
170 } | 189 } |
171 } | 190 } |
172 - const size_t PAGESIZE; | 191 - const size_t PAGESIZE; |
173 } | 192 } |
176 +const size_t PAGESIZE; | 195 +const size_t PAGESIZE; |
177 + | 196 + |
178 static this() | 197 static this() |
179 { | 198 { |
180 static if( is( typeof( GetSystemInfo ) ) ) | 199 static if( is( typeof( GetSystemInfo ) ) ) |
181 @@ -2522,7 +2574,7 @@ | 200 @@ -2522,7 +2586,7 @@ |
182 } | 201 } |
183 } | 202 } |
184 | 203 |
185 - | 204 - |
186 +extern(C) int printf(char*, ...); | 205 +extern(C) int printf(char*, ...); |
187 //////////////////////////////////////////////////////////////////////////////// | 206 //////////////////////////////////////////////////////////////////////////////// |
188 // Fiber | 207 // Fiber |
189 //////////////////////////////////////////////////////////////////////////////// | 208 //////////////////////////////////////////////////////////////////////////////// |
190 @@ -3204,6 +3256,28 @@ | 209 @@ -3177,6 +3241,22 @@ |
210 push( 0x00000000 ); // ESI | |
211 push( 0x00000000 ); // EDI | |
212 } | |
213 + else version( LLVM_AsmX86_Posix ) | |
214 + { | |
215 + push( cast(size_t) &fiber_entryPoint ); // EIP | |
216 + push( 0x00000000 ); // newp | |
217 + push( 0x00000000 ); // oldp | |
218 + push( 0x00000000 ); // EBP | |
219 + push( 0x00000000 ); // EBX | |
220 + push( 0x00000000 ); // ESI | |
221 + push( 0x00000000 ); // EDI | |
222 + } | |
223 +//TODO: Implement x86-64 fibers | |
224 +/+ | |
225 + else version( LLVM_AsmX86_Posix ) | |
226 + { | |
227 + } | |
228 ++/ | |
229 else version( AsmPPC_Posix ) | |
230 { | |
231 version( StackGrowsDown ) | |
232 @@ -3204,6 +3284,28 @@ | |
191 | 233 |
192 assert( cast(uint) pstack & 0x0f == 0 ); | 234 assert( cast(uint) pstack & 0x0f == 0 ); |
193 } | 235 } |
194 + else version( LLVM_AsmX86_Posix ) | 236 + else version( LLVM_AsmX86_Posix ) |
195 + { | 237 + { |
216 else static if( is( ucontext_t ) ) | 258 else static if( is( ucontext_t ) ) |
217 { | 259 { |
218 getcontext( &m_utxt ); | 260 getcontext( &m_utxt ); |
219 Index: lib/gc/basic/gcx.d | 261 Index: lib/gc/basic/gcx.d |
220 =================================================================== | 262 =================================================================== |
221 --- lib/gc/basic/gcx.d (revision 4097) | 263 --- lib/gc/basic/gcx.d (revision 4110) |
222 +++ lib/gc/basic/gcx.d (working copy) | 264 +++ lib/gc/basic/gcx.d (working copy) |
223 @@ -65,6 +65,13 @@ | 265 @@ -65,6 +65,13 @@ |
224 } | 266 } |
225 | 267 |
226 | 268 |
309 else | 351 else |
310 { | 352 { |
311 asm | 353 asm |
312 Index: lib/gc/basic/gcbits.d | 354 Index: lib/gc/basic/gcbits.d |
313 =================================================================== | 355 =================================================================== |
314 --- lib/gc/basic/gcbits.d (revision 4097) | 356 --- lib/gc/basic/gcbits.d (revision 4110) |
315 +++ lib/gc/basic/gcbits.d (working copy) | 357 +++ lib/gc/basic/gcbits.d (working copy) |
316 @@ -39,6 +39,10 @@ | 358 @@ -39,6 +39,10 @@ |
317 { | 359 { |
318 // use the unoptimized version | 360 // use the unoptimized version |
319 } | 361 } |
324 else version (D_InlineAsm_X86) | 366 else version (D_InlineAsm_X86) |
325 { | 367 { |
326 version = Asm86; | 368 version = Asm86; |
327 Index: lib/build-tango.sh | 369 Index: lib/build-tango.sh |
328 =================================================================== | 370 =================================================================== |
329 --- lib/build-tango.sh (revision 4097) | 371 --- lib/build-tango.sh (revision 4110) |
330 +++ lib/build-tango.sh (working copy) | 372 +++ lib/build-tango.sh (working copy) |
331 @@ -23,7 +23,7 @@ | 373 @@ -23,7 +23,7 @@ |
332 --debug: Will enable debug info | 374 --debug: Will enable debug info |
333 --warn: Will enable warnings | 375 --warn: Will enable warnings |
334 --verbose: Increase verbosity | 376 --verbose: Increase verbosity |
356 mac) | 398 mac) |
357 # build Universal Binary version of the Tango library | 399 # build Universal Binary version of the Tango library |
358 build powerpc-apple-darwin8-gdmd libgtango.a.ppc libgphobos.a.ppc | 400 build powerpc-apple-darwin8-gdmd libgtango.a.ppc libgphobos.a.ppc |
359 Index: tango/text/convert/Layout.d | 401 Index: tango/text/convert/Layout.d |
360 =================================================================== | 402 =================================================================== |
361 --- tango/text/convert/Layout.d (revision 4097) | 403 --- tango/text/convert/Layout.d (revision 4110) |
362 +++ tango/text/convert/Layout.d (working copy) | 404 +++ tango/text/convert/Layout.d (working copy) |
363 @@ -47,6 +47,12 @@ | 405 @@ -47,6 +47,12 @@ |
364 alias void* Arg; | 406 alias void* Arg; |
365 alias va_list ArgList; | 407 alias va_list ArgList; |
366 } | 408 } |
382 } | 424 } |
383 } | 425 } |
384 return parse (formatStr, arguments, arglist, sink); | 426 return parse (formatStr, arguments, arglist, sink); |
385 Index: tango/net/cluster/CacheInvalidator.d | 427 Index: tango/net/cluster/CacheInvalidator.d |
386 =================================================================== | 428 =================================================================== |
387 --- tango/net/cluster/CacheInvalidator.d (revision 4097) | 429 --- tango/net/cluster/CacheInvalidator.d (revision 4110) |
388 +++ tango/net/cluster/CacheInvalidator.d (working copy) | 430 +++ tango/net/cluster/CacheInvalidator.d (working copy) |
389 @@ -79,7 +79,7 @@ | 431 @@ -79,7 +79,7 @@ |
390 | 432 |
391 *******************************************************************************/ | 433 *******************************************************************************/ |
392 | 434 |
395 { | 437 { |
396 private char[] key_; | 438 private char[] key_; |
397 | 439 |
398 Index: tango/core/Vararg.d | 440 Index: tango/core/Vararg.d |
399 =================================================================== | 441 =================================================================== |
400 --- tango/core/Vararg.d (revision 4097) | 442 --- tango/core/Vararg.d (revision 4110) |
401 +++ tango/core/Vararg.d (working copy) | 443 +++ tango/core/Vararg.d (working copy) |
402 @@ -15,6 +15,10 @@ | 444 @@ -15,6 +15,10 @@ |
403 { | 445 { |
404 public import std.stdarg; | 446 public import std.stdarg; |
405 } | 447 } |
410 else | 452 else |
411 { | 453 { |
412 /** | 454 /** |
413 Index: tango/core/sync/Semaphore.d | 455 Index: tango/core/sync/Semaphore.d |
414 =================================================================== | 456 =================================================================== |
415 --- tango/core/sync/Semaphore.d (revision 4097) | 457 --- tango/core/sync/Semaphore.d (revision 4110) |
416 +++ tango/core/sync/Semaphore.d (working copy) | 458 +++ tango/core/sync/Semaphore.d (working copy) |
417 @@ -376,7 +376,8 @@ | 459 @@ -376,7 +376,8 @@ |
418 { | 460 { |
419 synchronized( synComplete ) | 461 synchronized( synComplete ) |
420 { | 462 { |
446 + testWaitTimeout();} | 488 + testWaitTimeout();} |
447 } | 489 } |
448 } | 490 } |
449 Index: tango/core/sync/Condition.d | 491 Index: tango/core/sync/Condition.d |
450 =================================================================== | 492 =================================================================== |
451 --- tango/core/sync/Condition.d (revision 4097) | 493 --- tango/core/sync/Condition.d (revision 4110) |
452 +++ tango/core/sync/Condition.d (working copy) | 494 +++ tango/core/sync/Condition.d (working copy) |
453 @@ -553,8 +553,11 @@ | 495 @@ -553,8 +553,11 @@ |
454 | 496 |
455 unittest | 497 unittest |
456 { | 498 { |
462 + } | 504 + } |
463 } | 505 } |
464 } | 506 } |
465 Index: tango/core/Atomic.d | 507 Index: tango/core/Atomic.d |
466 =================================================================== | 508 =================================================================== |
467 --- tango/core/Atomic.d (revision 4097) | 509 --- tango/core/Atomic.d (revision 4110) |
468 +++ tango/core/Atomic.d (working copy) | 510 +++ tango/core/Atomic.d (working copy) |
469 @@ -270,6 +270,167 @@ | 511 @@ -270,6 +270,167 @@ |
470 | 512 |
471 | 513 |
472 //////////////////////////////////////////////////////////////////////////////// | 514 //////////////////////////////////////////////////////////////////////////////// |
646 } | 688 } |
647 version( X86_64 ) | 689 version( X86_64 ) |
648 { | 690 { |
649 Index: tango/math/IEEE.d | 691 Index: tango/math/IEEE.d |
650 =================================================================== | 692 =================================================================== |
651 --- tango/math/IEEE.d (revision 4097) | 693 --- tango/math/IEEE.d (revision 4110) |
652 +++ tango/math/IEEE.d (working copy) | 694 +++ tango/math/IEEE.d (working copy) |
653 @@ -1543,7 +1543,12 @@ | 695 @@ -1554,7 +1554,12 @@ |
654 else return 0; | 696 return (bitsdiff == 0 && !((pa[F.EXPPOS_SHORT] ^ pb[F.EXPPOS_SHORT])& F.EXPMASK)) ? 1 : 0; |
655 } | 697 } |
656 } else { | 698 } else { |
657 - assert(0, "Unsupported"); | 699 - assert(0, "Unsupported"); |
658 + static if (is(X==real)){ | 700 + static if (is(X==real)){ |
659 + static assert(0, X.stringof~" unsupported by feqrel"); | 701 + static assert(0, X.stringof~" unsupported by feqrel"); |
660 + } else { | 702 + } else { |
664 } | 706 } |
665 } | 707 } |
666 | 708 |
667 Index: tango/math/Math.d | 709 Index: tango/math/Math.d |
668 =================================================================== | 710 =================================================================== |
669 --- tango/math/Math.d (revision 4097) | 711 --- tango/math/Math.d (revision 4110) |
670 +++ tango/math/Math.d (working copy) | 712 +++ tango/math/Math.d (working copy) |
671 @@ -76,6 +76,14 @@ | 713 @@ -76,6 +76,14 @@ |
672 version = DigitalMars_D_InlineAsm_X86; | 714 version = DigitalMars_D_InlineAsm_X86; |
673 } | 715 } |
674 } | 716 } |
813 } | 855 } |
814 | 856 |
815 debug(UnitTest) { | 857 debug(UnitTest) { |
816 Index: tango/stdc/posix/sys/types.d | 858 Index: tango/stdc/posix/sys/types.d |
817 =================================================================== | 859 =================================================================== |
818 --- tango/stdc/posix/sys/types.d (revision 4097) | 860 --- tango/stdc/posix/sys/types.d (revision 4110) |
819 +++ tango/stdc/posix/sys/types.d (working copy) | 861 +++ tango/stdc/posix/sys/types.d (working copy) |
820 @@ -422,7 +422,11 @@ | 862 @@ -422,7 +422,11 @@ |
821 } | 863 } |
822 else version( darwin ) | 864 else version( darwin ) |
823 { | 865 { |
830 } | 872 } |
831 else version( freebsd ) | 873 else version( freebsd ) |
832 { | 874 { |
833 Index: tango/stdc/stdlib.d | 875 Index: tango/stdc/stdlib.d |
834 =================================================================== | 876 =================================================================== |
835 --- tango/stdc/stdlib.d (revision 4097) | 877 --- tango/stdc/stdlib.d (revision 4110) |
836 +++ tango/stdc/stdlib.d (working copy) | 878 +++ tango/stdc/stdlib.d (working copy) |
837 @@ -94,6 +94,11 @@ | 879 @@ -94,6 +94,11 @@ |
838 { | 880 { |
839 void* alloca(size_t size); | 881 void* alloca(size_t size); |
840 } | 882 } |
846 else version( GNU ) | 888 else version( GNU ) |
847 { | 889 { |
848 private import gcc.builtins; | 890 private import gcc.builtins; |
849 Index: tango/stdc/stdarg.d | 891 Index: tango/stdc/stdarg.d |
850 =================================================================== | 892 =================================================================== |
851 --- tango/stdc/stdarg.d (revision 4097) | 893 --- tango/stdc/stdarg.d (revision 4110) |
852 +++ tango/stdc/stdarg.d (working copy) | 894 +++ tango/stdc/stdarg.d (working copy) |
853 @@ -13,6 +13,10 @@ | 895 @@ -13,6 +13,10 @@ |
854 { | 896 { |
855 public import std.c.stdarg; | 897 public import std.c.stdarg; |
856 } | 898 } |