Mercurial > projects > dstress
annotate run/a/asm_offset_01_A.d @ 1545:111a9895f863
[Issue 1334] Missing closing bracket in asm_offset_01_A, line 37
Russ Lewis <webmaster@villagersonline.com>
2007-07-11
author | thomask |
---|---|
date | Mon, 23 Jul 2007 18:36:35 +0000 |
parents | 596115f20776 |
children |
rev | line source |
---|---|
1024 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <lugaidster@gmail.com> | |
6 // @date@ 2006-04-28 | |
1319
81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1265
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=116 |
1024 | 8 |
1427 | 9 // __DSTRESS_TORTURE_BLOCK__ -fPIC |
10 | |
1024 | 11 module dstress.run.a.asm_offset_01_A; |
12 | |
13 version(D_InlineAsm_X86){ | |
14 version = runTest; | |
15 }else version(D_InlineAsm_X86_64){ | |
16 version = runTest; | |
1427 | 17 }else{ |
18 static assert(0, "DSTRESS{XFAIL}: no inline x86 asm support"); | |
1024 | 19 } |
20 | |
21 version(runTest){ | |
22 byte b; | |
23 | |
24 int main(){ | |
25 void* x = &b; | |
26 void* y; | |
1044 | 27 |
1024 | 28 static if(size_t.sizeof == 4){ |
29 asm{ | |
1265 | 30 mov EAX, offset b; |
1024 | 31 mov y, EAX; |
32 } | |
1427 | 33 }else static if(size_t.sizeof == 8){ |
34 asm{ | |
35 mov RAX, offset b; | |
36 mov y, RAX; | |
1545
111a9895f863
[Issue 1334] Missing closing bracket in asm_offset_01_A, line 37
thomask
parents:
1427
diff
changeset
|
37 } |
1024 | 38 }else{ |
39 pragma(msg, "DSTRESS{ERROR}: unsupported pointer size"); | |
40 static assert(0); | |
41 } | |
42 | |
43 if(x != y){ | |
44 assert(0); | |
45 } | |
46 | |
47 return 0; | |
48 } | |
49 } |