Mercurial > projects > dstress
comparison run/a/asm_offset_01_B.d @ 1427:596115f20776
fixed #1042
author | thomask |
---|---|
date | Mon, 12 Mar 2007 05:30:13 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1426:3204340ec93b | 1427:596115f20776 |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <lugaidster@gmail.com> | |
6 // @date@ 2006-04-28 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=116 | |
8 | |
9 // __DSTRESS_TORTURE_BLOCK__ -fPIC | |
10 | |
11 module dstress.run.a.asm_offset_01_B; | |
12 | |
13 version(D_InlineAsm_X86){ | |
14 version = runTest; | |
15 }else version(D_InlineAsm_X86_64){ | |
16 version = runTest; | |
17 }else{ | |
18 static assert(0, "DSTRESS{XFAIL}: no inline x86 asm support"); | |
19 } | |
20 | |
21 version(runTest){ | |
22 byte b; | |
23 | |
24 void main(){ | |
25 static if(size_t.sizeof == 4){ | |
26 asm{ | |
27 mov EAX, offsetof b; | |
28 } | |
29 }else static if(size_t.sizeof == 8){ | |
30 asm{ | |
31 mov RAX, offsetof b; | |
32 } | |
33 }else{ | |
34 pragma(msg, "DSTRESS{ERROR}: unsupported pointer size"); | |
35 static assert(0); | |
36 } | |
37 } | |
38 } |