Mercurial > projects > dstress
comparison run/a/asm_dl_02_A.d @ 1337:0839eb936902
[Issue 697] No const folding on asm db,dw, etc
Don Clugston <clugdbug@yahoo.com.au>
2006-12-18
http://d.puremagic.com/issues/show_bug.cgi?id=697
author | thomask |
---|---|
date | Tue, 23 Jan 2007 12:03:51 +0000 |
parents | |
children | bebc7472a832 |
comparison
equal
deleted
inserted
replaced
1336:986983b8cf7a | 1337:0839eb936902 |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Don Clugston <clugdbug@yahoo.com.au> | |
6 // @date@ 2006-12-18 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=697 | |
8 // @desc@ [Issue 697] No const folding on asm db,dw, etc | |
9 | |
10 module dstress.run.a.asm_dl_02_A; | |
11 | |
12 version(D_InlineAsm_X86){ | |
13 version = runTest; | |
14 }else version(D_InlineAsm_X86_64){ | |
15 version = runTest; | |
16 } | |
17 | |
18 version(runTest){ | |
19 int main(){ | |
20 int i = 3; | |
21 long x = 0x4040_4040_4040_4040; | |
22 asm{ | |
23 mov EAX, i; | |
24 dl x; | |
25 mov i, EAX; | |
26 } | |
27 | |
28 assert(i == 11); | |
29 | |
30 return 0; | |
31 } | |
32 }else{ | |
33 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support"); | |
34 static assert(0); | |
35 } |