comparison tests/mini/asm3.d @ 945:03d7c4aac654

SWITCHED TO LLVM 2.5 ! Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel. Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple. Fixed return calling convention for complex numbers, ST and ST(1) were switched around. Added some testcases. I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 08 Feb 2009 05:26:54 +0100
parents ef5f75ae6895
children 4c524d80e6e1
comparison
equal deleted inserted replaced
944:eb310635d80e 945:03d7c4aac654
6 { 6 {
7 char* fmt = "Hello D World\n"; 7 char* fmt = "Hello D World\n";
8 printf(fmt); 8 printf(fmt);
9 version (LLVM_InlineAsm_X86) 9 version (LLVM_InlineAsm_X86)
10 { 10 {
11 asm 11 asm
12 { 12 {
13 push fmt; 13 push fmt;
14 call printf; 14 call printf;
15 pop EAX; 15 pop EAX;
16 } 16 }
17 } 17 }
18 else version(LLVM_InlineAsm_X86_64) 18 else version(LLVM_InlineAsm_X86_64)
19 { 19 {
20 asm 20 asm
21 { 21 {
22 movq RDI, fmt; 22 movq RDI, fmt;
23 xor AL, AL; 23 xor AL, AL;
24 call printf; 24 call printf;
25 } 25 }
26 } 26 }
27
28 } 27 }