annotate run/a/asm_03_D.d @ 1521:2ab1093d9008

fixed -fPIC issue
author thomask
date Fri, 27 Apr 2007 17:24:40 +0000
parents f39a9d671323
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1494
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
1 // $HeadURL$
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
2 // $Date$
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
3 // $Author$
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
4
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
5 // @author@ Matti Niemenmaa <deewiant@gmail.com>
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
6 // @date@ 2007-04-21
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1173
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
8 // @desc@ [Issue 1173] Inline assembler: cannot use global scope operator
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
9
1521
2ab1093d9008 fixed -fPIC issue
thomask
parents: 1494
diff changeset
10 // __DSTRESS_TORTURE_BLOCK__ -fPIC
2ab1093d9008 fixed -fPIC issue
thomask
parents: 1494
diff changeset
11
1494
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
12 module dstress.run.a.asm_03_D;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
13
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
14 version(D_InlineAsm_X86){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
15 version = runTest;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
16 }else version(D_InlineAsm_X86_64){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
17 version = runTest;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
18 }else{
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
19 static assert(0, "DSTRESS{XFAIL}: no inline ASM support");
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
20 }
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
21
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
22 version(runTest){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
23 int x = 0x12AB_89EF;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
24
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
25 int main(){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
26 int x = 0xCAFFEE;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
27
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
28 asm{
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
29 mov EAX, .x;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
30 mov x, EAX;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
31 }
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
32
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
33 if(x != 0x12AB_89EF){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
34 assert(0);
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
35 }
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
36
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
37 return 0;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
38 }
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
39 }