comparison tests/mini/asm1.d @ 1035:4c524d80e6e1

Move more tests to D_InlineAsm
author Christian Kamm <kamm incasoftware de>
date Tue, 03 Mar 2009 19:03:27 +0100
parents a58784e0f035
children
comparison
equal deleted inserted replaced
1034:12b423e17860 1035:4c524d80e6e1
2 2
3 extern(C) int printf(char*, ...); 3 extern(C) int printf(char*, ...);
4 4
5 void main() 5 void main()
6 { 6 {
7 version(LLVM_InlineAsm_X86) 7 version(D_InlineAsm_X86)
8 { 8 {
9 int x; 9 int x;
10 asm 10 asm
11 { 11 {
12 mov EAX, 42; 12 mov EAX, 42;
13 mov x, EAX; 13 mov x, EAX;
14 } 14 }
15 printf("x = %d\n", x); 15 printf("x = %d\n", x);
16 } 16 }
17 else version(LLVM_InlineAsm_X86_64) 17 else version(D_InlineAsm_X86_64)
18 { 18 {
19 long x; 19 long x;
20 asm 20 asm
21 { 21 {
22 movq RAX, 42L; 22 movq RAX, 42L;