annotate run/a/asm_03_C.d @ 1494:f39a9d671323

[Issue 1173] Inline assembler: cannot use global scope operator Matti Niemenmaa <deewiant@gmail.com> 2007-04-21 http://d.puremagic.com/issues/show_bug.cgi?id=1173
author thomask
date Mon, 23 Apr 2007 17:54:08 +0000
parents
children 2ab1093d9008
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
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
10 module dstress.run.a.asm_03_C;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
11
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
12 version(D_InlineAsm_X86){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
13 version = runTest;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
14 }else version(D_InlineAsm_X86_64){
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{
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
17 static assert(0, "DSTRESS{XFAIL}: no inline ASM support");
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
18 }
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
19
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
20 version(runTest){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
21 int x = 0x12AB_89EF;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
22
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
23 int main(){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
24 alias .x X;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
25 int y = 0xCAFFEE;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
26
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
27 asm{
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
28 mov EAX, X;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
29 mov y, EAX;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
30 }
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 if(y != 0x12AB_89EF){
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
33 assert(0);
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
34 }
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 return 0;
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
37 }
f39a9d671323 [Issue 1173] Inline assembler: cannot use global scope operator
thomask
parents:
diff changeset
38 }