annotate run/a/asm_ffree_01_A.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 03c97933de98
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
990
15b0469145fb inline ASM review
thomask
parents:
diff changeset
1 // $HeadURL$
15b0469145fb inline ASM review
thomask
parents:
diff changeset
2 // $Date$
15b0469145fb inline ASM review
thomask
parents:
diff changeset
3 // $Author$
1044
03c97933de98 inline ASM review
thomask
parents: 990
diff changeset
4
990
15b0469145fb inline ASM review
thomask
parents:
diff changeset
5 module dstress.run.a.asm_ffree_01_A;
15b0469145fb inline ASM review
thomask
parents:
diff changeset
6
15b0469145fb inline ASM review
thomask
parents:
diff changeset
7 version(D_InlineAsm_X86){
15b0469145fb inline ASM review
thomask
parents:
diff changeset
8 version = doTest;
15b0469145fb inline ASM review
thomask
parents:
diff changeset
9 }else version(D_InlineAsm_X86_64){
15b0469145fb inline ASM review
thomask
parents:
diff changeset
10 version = doTest;
15b0469145fb inline ASM review
thomask
parents:
diff changeset
11 }
15b0469145fb inline ASM review
thomask
parents:
diff changeset
12
15b0469145fb inline ASM review
thomask
parents:
diff changeset
13 version(doTest){
15b0469145fb inline ASM review
thomask
parents:
diff changeset
14 import addon.cpuinfo;
1044
03c97933de98 inline ASM review
thomask
parents: 990
diff changeset
15
990
15b0469145fb inline ASM review
thomask
parents:
diff changeset
16 int main(){
15b0469145fb inline ASM review
thomask
parents:
diff changeset
17 haveFPU!()();
15b0469145fb inline ASM review
thomask
parents:
diff changeset
18
15b0469145fb inline ASM review
thomask
parents:
diff changeset
19 asm{
15b0469145fb inline ASM review
thomask
parents:
diff changeset
20 finit;
15b0469145fb inline ASM review
thomask
parents:
diff changeset
21 ffree ST(1);
15b0469145fb inline ASM review
thomask
parents:
diff changeset
22 }
15b0469145fb inline ASM review
thomask
parents:
diff changeset
23
15b0469145fb inline ASM review
thomask
parents:
diff changeset
24 return 0;
15b0469145fb inline ASM review
thomask
parents:
diff changeset
25 }
15b0469145fb inline ASM review
thomask
parents:
diff changeset
26 }else{
15b0469145fb inline ASM review
thomask
parents:
diff changeset
27 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
15b0469145fb inline ASM review
thomask
parents:
diff changeset
28 static assert(0);
15b0469145fb inline ASM review
thomask
parents:
diff changeset
29 }