annotate run/a/asm_or_02_E.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
1010
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
1 // $HeadURL$
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
2 // $Date$
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
3 // $Author$
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
4
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
5 module dstress.run.a.asm_or_02_E;
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
6
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
7 version(D_InlineAsm_X86){
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
8 version = runTest;
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
9 }else version(D_InlineAsm_X86_64){
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
10 version = runTest;
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
11 }
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
12
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
13 version(runTest){
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
14 int main(){
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
15 ushort b = 0b1111_1110__0111_1111;
1044
03c97933de98 inline ASM review
thomask
parents: 1010
diff changeset
16
1010
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
17 asm{
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
18 or b, 0b1100_0011__0011_1111;
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
19 }
1044
03c97933de98 inline ASM review
thomask
parents: 1010
diff changeset
20
1010
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
21 if(b != 0b1111_1111__0111_1111){
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
22 assert(0);
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
23 }
1044
03c97933de98 inline ASM review
thomask
parents: 1010
diff changeset
24
1010
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
25 return 0;
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
26 }
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
27 }else{
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
28 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
29 static assert(0);
731f93c13ad6 inline ASM review
thomask
parents:
diff changeset
30 }