comparison tango/lib/compiler/llvmdc/lifetime.d @ 237:a168a2c3ea48 trunk

[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed. Tried adding a stack trace print when compiler crashes, not sure it's working though. Changed data layouts to match that of llvm-gcc. Fixed casting function pointers. Added support checks in AsmStatement.
author lindquist
date Sun, 08 Jun 2008 19:09:24 +0200
parents 4c2689d57ba4
children 23d0d9855cad
comparison
equal deleted inserted replaced
236:df1abfe27be6 237:a168a2c3ea48
26 */ 26 */
27 module lifetime; 27 module lifetime;
28 28
29 //debug=PRINTF; 29 //debug=PRINTF;
30 //debug=PRINTF2; 30 //debug=PRINTF2;
31
32 // we're not allowed to jump out of asm blocks
33 //version(D_InlineAsm_X86) version = Asm86;
31 34
32 private 35 private
33 { 36 {
34 import tango.stdc.stdlib; 37 import tango.stdc.stdlib;
35 import tango.stdc.string; 38 import tango.stdc.string;
208 211
209 debug(PRINTF) printf("_d_newarrayT(length = %u, size = %d)\n", length, size); 212 debug(PRINTF) printf("_d_newarrayT(length = %u, size = %d)\n", length, size);
210 if (length == 0 || size == 0) 213 if (length == 0 || size == 0)
211 return null; 214 return null;
212 215
213 version (D_InlineAsm_X86) 216 version (Asm86)
214 { 217 {
215 asm 218 asm
216 { 219 {
217 mov EAX,size ; 220 mov EAX,size ;
218 mul EAX,length ; 221 mul EAX,length ;
247 else 250 else
248 { 251 {
249 auto initializer = ti.next.init(); 252 auto initializer = ti.next.init();
250 auto isize = initializer.length; 253 auto isize = initializer.length;
251 auto q = initializer.ptr; 254 auto q = initializer.ptr;
252 version (D_InlineAsm_X86) 255 version (Asm86)
253 { 256 {
254 asm 257 asm
255 { 258 {
256 mov EAX,size ; 259 mov EAX,size ;
257 mul EAX,length ; 260 mul EAX,length ;
518 printf("\tp.data = %p, p.length = %d\n", pdata, plength); 521 printf("\tp.data = %p, p.length = %d\n", pdata, plength);
519 } 522 }
520 523
521 if (newlength) 524 if (newlength)
522 { 525 {
523 version (D_InlineAsm_X86) 526 version (Asm86)
524 { 527 {
525 size_t newsize = void; 528 size_t newsize = void;
526 529
527 asm 530 asm
528 { 531 {
617 printf("\tp.data = %p, p.length = %d\n", pdata, plength); 620 printf("\tp.data = %p, p.length = %d\n", pdata, plength);
618 } 621 }
619 622
620 if (newlength) 623 if (newlength)
621 { 624 {
622 version (D_InlineAsm_X86) 625 version (Asm86)
623 { 626 {
624 size_t newsize = void; 627 size_t newsize = void;
625 628
626 asm 629 asm
627 { 630 {