annotate tests/mini/asm3.d @ 1651:cb960b882ca3 default tip

bindings were moved to dsource.org/projects/bindings/
author Moritz Warning <moritzwarning@web.de>
date Thu, 20 May 2010 20:05:03 +0200
parents 4c524d80e6e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
228
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
1 module tangotests.asm3;
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
2
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
3 extern(C) int printf(char*, ...);
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
4
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
5 void main()
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
6 {
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
7 char* fmt = "Hello D World\n";
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
8 printf(fmt);
1035
4c524d80e6e1 Move more tests to D_InlineAsm
Christian Kamm <kamm incasoftware de>
parents: 945
diff changeset
9 version (D_InlineAsm_X86)
228
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
10 {
945
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
11 asm
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
12 {
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
13 push fmt;
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
14 call printf;
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
15 pop EAX;
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
16 }
228
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
17 }
1035
4c524d80e6e1 Move more tests to D_InlineAsm
Christian Kamm <kamm incasoftware de>
parents: 945
diff changeset
18 else version(D_InlineAsm_X86_64)
741
4ac97ec7c18e Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents: 341
diff changeset
19 {
4ac97ec7c18e Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents: 341
diff changeset
20 asm
4ac97ec7c18e Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents: 341
diff changeset
21 {
945
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
22 movq RDI, fmt;
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
23 xor AL, AL;
03d7c4aac654 SWITCHED TO LLVM 2.5 !
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 744
diff changeset
24 call printf;
741
4ac97ec7c18e Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents: 341
diff changeset
25 }
4ac97ec7c18e Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents: 341
diff changeset
26 }
228
52d1e9d27dc6 [svn r244] added another asm test.
lindquist
parents:
diff changeset
27 }