annotate run/a/asm_setne_01.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 251a3e0d98f7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
856
7b2c5a101190 meta data maintenance
thomask
parents: 705
diff changeset
1 // $HeadURL$
7b2c5a101190 meta data maintenance
thomask
parents: 705
diff changeset
2 // $Date$
7b2c5a101190 meta data maintenance
thomask
parents: 705
diff changeset
3 // $Author$
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
4
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
5 module dstress.run.a.asm_setne_01;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
6
1395
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
7 version(D_InlineAsm_X86){
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
8 version = test;
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
9 }else version(D_Inline_Asm_X86_64){
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
10 version = test;
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
11 }else{
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
12 static assert(0, "DSTRESS{XFAIL}: no inline x86 asm support");
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
13 }
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
14
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
15 version(test){
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
16 int main(){
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
17 ubyte a;
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
18
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
19 a = a.max;
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
20
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
21 asm{
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
22 mov EAX, 3;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
23 cmp EAX, 4;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
24 setne a;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
25 }
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
26
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
27 assert(a == 1);
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
28
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
29 a = a.max;
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
30
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
31 asm{
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
32 mov EAX, 4;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
33 cmp EAX, 3;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
34 setne a;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
35 }
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
36
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
37 assert(a == 1);
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
38
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
39 a = a.max;
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
40
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
41 asm{
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
42 mov EAX, 4;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
43 cmp EAX, 4;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
44 setne a;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
45 }
1044
03c97933de98 inline ASM review
thomask
parents: 856
diff changeset
46
705
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
47 assert(a == 0);
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
48
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
49 return 0;
2aa02c15c639 some more integer iasm tests
thomask
parents:
diff changeset
50 }
1395
251a3e0d98f7 div. inline asm fixes
thomask
parents: 1386
diff changeset
51 }