Mercurial > projects > dstress
annotate run/a/asm_xor_03_B.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 | 7a397590d6e0 |
children |
rev | line source |
---|---|
1044 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.a.asm_xor_03_B; | |
6 | |
7 version(D_InlineAsm_X86){ | |
8 version = runTest; | |
9 }else version(D_InlineAsm_X86_64){ | |
10 version = runTest; | |
11 } | |
12 | |
13 version(runTest){ | |
14 int main(){ | |
15 short b = 0x0150; | |
16 | |
17 asm{ | |
18 mov AX, b; | |
19 xor AX, 0x1534; | |
20 mov b, AX; | |
21 } | |
22 | |
23 if(b != (0x1534 ^ 0x0150)){ | |
24 assert(0); | |
25 } | |
26 | |
27 return 0; | |
28 } | |
29 }else{ | |
1386 | 30 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support"); |
1044 | 31 static assert(0); |
32 } |