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