comparison tests/mini/callingconv1.d @ 1447:a400b1dd657f

fix assembly code for mingw32 in minitests
author Kelly Wilson <wilsonk cpsc.ucalgary.ca>
date Sun, 31 May 2009 11:01:02 -0600
parents 12b423e17860
children e92e14690a4f
comparison
equal deleted inserted replaced
1446:fe151804995a 1447:a400b1dd657f
13 float b = 2.5; 13 float b = 2.5;
14 float c; 14 float c;
15 15
16 version(D_InlineAsm_X86) 16 version(D_InlineAsm_X86)
17 { 17 {
18 asm 18 version(mingw32)
19 { 19 {
20 mov EAX, [a]; 20 asm
21 push EAX; 21 {
22 mov EAX, [b]; 22 movss XMM0, [a];
23 push EAX; 23 movss XMM1, [b];
24 call foo; 24 movss [ESP], XMM1;
25 fstp c; 25 movss [ESP]+4, XMM0;
26 } 26 call foo;
27 fstp [c]-4;
28 movss XMM0, [c]-4;
29 movss [c], XMM0;
30 }
31 } else
32 {
33
34 asm
35 {
36 mov EAX, [a];
37 push EAX;
38 mov EAX, [b];
39 push EAX;
40 call foo;
41 fstp c;
42 }
43 }
27 } 44 }
28 else version(D_InlineAsm_X86_64) 45 else version(D_InlineAsm_X86_64)
29 { 46 {
30 asm 47 asm
31 { 48 {