Mercurial > projects > ldc
comparison runtime/llvmdc.diff @ 608:52ab8f3130d9
Removed dmdintrinsic.d from the runtime, we already have llvmdc.bitmanip.
Updated tango patch to import tango.core.BitManip instead of std.intrinsic.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 18 Sep 2008 21:14:37 +0200 |
parents | 9312024a7053 |
children | 2cf4359d344f |
comparison
equal
deleted
inserted
replaced
607:9526b29ae342 | 608:52ab8f3130d9 |
---|---|
1 Index: object.di | 1 Index: object.di |
2 =================================================================== | 2 =================================================================== |
3 --- object.di (revision 3899) | 3 --- object.di (revision 3936) |
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 3899) | 17 --- lib/unittest.sh (revision 3936) |
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 llvmdc runUnitTest_llvmdc | 70 + compile llvmdc runUnitTest_llvmdc |
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 3899) | 74 --- lib/common/tango/core/BitManip.d (revision 3936) |
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 3899) | 89 --- lib/common/tango/core/Thread.d (revision 3936) |
90 +++ lib/common/tango/core/Thread.d (working copy) | 90 +++ lib/common/tango/core/Thread.d (working copy) |
91 @@ -244,8 +244,29 @@ | 91 @@ -244,8 +244,29 @@ |
92 } | 92 } |
93 body | 93 body |
94 { | 94 { |
133 asm | 133 asm |
134 { | 134 { |
135 popad; | 135 popad; |
136 Index: lib/gc/basic/gcx.d | 136 Index: lib/gc/basic/gcx.d |
137 =================================================================== | 137 =================================================================== |
138 --- lib/gc/basic/gcx.d (revision 3899) | 138 --- lib/gc/basic/gcx.d (revision 3936) |
139 +++ lib/gc/basic/gcx.d (working copy) | 139 +++ lib/gc/basic/gcx.d (working copy) |
140 @@ -2178,6 +2178,28 @@ | 140 @@ -2178,6 +2178,28 @@ |
141 __builtin_unwind_init(); | 141 __builtin_unwind_init(); |
142 sp = & sp; | 142 sp = & sp; |
143 } | 143 } |
177 else | 177 else |
178 { | 178 { |
179 asm | 179 asm |
180 Index: lib/gc/basic/gcbits.d | 180 Index: lib/gc/basic/gcbits.d |
181 =================================================================== | 181 =================================================================== |
182 --- lib/gc/basic/gcbits.d (revision 3899) | 182 --- lib/gc/basic/gcbits.d (revision 3936) |
183 +++ lib/gc/basic/gcbits.d (working copy) | 183 +++ lib/gc/basic/gcbits.d (working copy) |
184 @@ -39,6 +39,10 @@ | 184 @@ -39,6 +39,10 @@ |
185 { | 185 { |
186 // use the unoptimized version | 186 // use the unoptimized version |
187 } | 187 } |
192 else version (D_InlineAsm_X86) | 192 else version (D_InlineAsm_X86) |
193 { | 193 { |
194 version = Asm86; | 194 version = Asm86; |
195 Index: tango/text/convert/Layout.d | 195 Index: tango/text/convert/Layout.d |
196 =================================================================== | 196 =================================================================== |
197 --- tango/text/convert/Layout.d (revision 3899) | 197 --- tango/text/convert/Layout.d (revision 3936) |
198 +++ tango/text/convert/Layout.d (working copy) | 198 +++ tango/text/convert/Layout.d (working copy) |
199 @@ -47,6 +47,12 @@ | 199 @@ -47,6 +47,12 @@ |
200 alias void* Arg; | 200 alias void* Arg; |
201 alias va_list ArgList; | 201 alias va_list ArgList; |
202 } | 202 } |
229 int[64] intargs = void; | 229 int[64] intargs = void; |
230 byte[64] byteargs = void; | 230 byte[64] byteargs = void; |
231 long[64] longargs = void; | 231 long[64] longargs = void; |
232 Index: tango/core/Vararg.d | 232 Index: tango/core/Vararg.d |
233 =================================================================== | 233 =================================================================== |
234 --- tango/core/Vararg.d (revision 3899) | 234 --- tango/core/Vararg.d (revision 3936) |
235 +++ tango/core/Vararg.d (working copy) | 235 +++ tango/core/Vararg.d (working copy) |
236 @@ -15,6 +15,10 @@ | 236 @@ -15,6 +15,10 @@ |
237 { | 237 { |
238 public import std.stdarg; | 238 public import std.stdarg; |
239 } | 239 } |
244 else | 244 else |
245 { | 245 { |
246 /** | 246 /** |
247 Index: tango/core/Atomic.d | 247 Index: tango/core/Atomic.d |
248 =================================================================== | 248 =================================================================== |
249 --- tango/core/Atomic.d (revision 3899) | 249 --- tango/core/Atomic.d (revision 3936) |
250 +++ tango/core/Atomic.d (working copy) | 250 +++ tango/core/Atomic.d (working copy) |
251 @@ -270,6 +270,161 @@ | 251 @@ -270,6 +270,161 @@ |
252 | 252 |
253 | 253 |
254 //////////////////////////////////////////////////////////////////////////////// | 254 //////////////////////////////////////////////////////////////////////////////// |
410 // x86 Atomic Function Implementation | 410 // x86 Atomic Function Implementation |
411 //////////////////////////////////////////////////////////////////////////////// | 411 //////////////////////////////////////////////////////////////////////////////// |
412 | 412 |
413 Index: tango/math/Math.d | 413 Index: tango/math/Math.d |
414 =================================================================== | 414 =================================================================== |
415 --- tango/math/Math.d (revision 3899) | 415 --- tango/math/Math.d (revision 3936) |
416 +++ tango/math/Math.d (working copy) | 416 +++ tango/math/Math.d (working copy) |
417 @@ -76,6 +76,14 @@ | 417 @@ -76,6 +76,14 @@ |
418 version = DigitalMars_D_InlineAsm_X86; | 418 version = DigitalMars_D_InlineAsm_X86; |
419 } | 419 } |
420 } | 420 } |
559 } | 559 } |
560 | 560 |
561 debug(UnitTest) { | 561 debug(UnitTest) { |
562 Index: tango/math/internal/BignumX86.d | 562 Index: tango/math/internal/BignumX86.d |
563 =================================================================== | 563 =================================================================== |
564 --- tango/math/internal/BignumX86.d (revision 3899) | 564 --- tango/math/internal/BignumX86.d (revision 3936) |
565 +++ tango/math/internal/BignumX86.d (working copy) | 565 +++ tango/math/internal/BignumX86.d (working copy) |
566 @@ -50,6 +50,8 @@ | 566 @@ -49,6 +49,8 @@ |
567 private: | 567 private: |
568 version(GNU) { | 568 version(GNU) { |
569 // GDC is a filthy liar. It can't actually do inline asm. | 569 // GDC is a filthy liar. It can't actually do inline asm. |
570 +} else version(LLVMDC) { | 570 +} else version(LLVMDC) { |
571 + // I guess the same goes for llvmdc to some extent :( | 571 + // I guess the same goes for llvmdc to some extent :( |
572 } else version(D_InlineAsm_X86) { | 572 } else version(D_InlineAsm_X86) { |
573 /* Duplicate string s, with n times, substituting index for '@'. | 573 /* Duplicate string s, with n times, substituting index for '@'. |
574 * | 574 * |
575 Index: tango/math/internal/BiguintCore.d | 575 Index: tango/math/internal/BiguintCore.d |
576 =================================================================== | 576 =================================================================== |
577 --- tango/math/internal/BiguintCore.d (revision 3899) | 577 --- tango/math/internal/BiguintCore.d (revision 3936) |
578 +++ tango/math/internal/BiguintCore.d (working copy) | 578 +++ tango/math/internal/BiguintCore.d (working copy) |
579 @@ -12,7 +12,10 @@ | 579 @@ -859,7 +859,7 @@ |
580 } else version(GNU) { | 580 result[half..$].simpleAddAssign(mid); |
581 // GDC lies about its X86 support | 581 } |
582 private import tango.math.internal.BignumNoAsm; | 582 |
583 -} else version(D_InlineAsm_X86) { | 583 -import std.intrinsic; |
584 +} else version(LLVMDC) { | 584 +import tango.core.BitManip; |
585 + // I guess llvmdc does too :( | 585 |
586 +private import tango.math.internal.BignumNoAsm; | 586 |
587 +} else version(D_InlineAsm_X86) { | 587 /* Knuth's Algorithm D, as presented in "Hacker's Delight" |
588 private import tango.math.internal.BignumX86; | |
589 } else { | |
590 private import tango.math.internal.BignumNoAsm; | |
591 Index: tango/stdc/stdlib.d | 588 Index: tango/stdc/stdlib.d |
592 =================================================================== | 589 =================================================================== |
593 --- tango/stdc/stdlib.d (revision 3899) | 590 --- tango/stdc/stdlib.d (revision 3936) |
594 +++ tango/stdc/stdlib.d (working copy) | 591 +++ tango/stdc/stdlib.d (working copy) |
595 @@ -94,6 +94,11 @@ | 592 @@ -94,6 +94,11 @@ |
596 { | 593 { |
597 void* alloca(size_t size); | 594 void* alloca(size_t size); |
598 } | 595 } |
604 else version( GNU ) | 601 else version( GNU ) |
605 { | 602 { |
606 private import gcc.builtins; | 603 private import gcc.builtins; |
607 Index: tango/stdc/stdarg.d | 604 Index: tango/stdc/stdarg.d |
608 =================================================================== | 605 =================================================================== |
609 --- tango/stdc/stdarg.d (revision 3899) | 606 --- tango/stdc/stdarg.d (revision 3936) |
610 +++ tango/stdc/stdarg.d (working copy) | 607 +++ tango/stdc/stdarg.d (working copy) |
611 @@ -13,6 +13,10 @@ | 608 @@ -13,6 +13,10 @@ |
612 { | 609 { |
613 public import std.c.stdarg; | 610 public import std.c.stdarg; |
614 } | 611 } |