annotate nocompile/a/asm_loop_02_D.d @ 1561:24fcb78d93f6

r8714@birke: tk | 2007-09-29 23:27:16 +0200 [Issue 1539] X86 inline assembler fails to recognize when the branch address outside range <grahamc001uk@yahoo.co.uk> 2007-09-28 http://d.puremagic.com/issues/show_bug.cgi?id=1539
author thomask
date Sun, 30 Sep 2007 09:43:24 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1561
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
1 // $HeadURL$
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
2 // $Date$
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
3 // $Author$
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
4
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
5 // @author@ <grahamc001uk@yahoo.co.uk>
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
6 // @date@ 2007-09-28
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1539
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
8 // @desc@ [Issue 1539] X86 inline assembler fails to recognize when the branch address outside range
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
9
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
10 module dstress.nocompile.a.asm_loop_02_D;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
11
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
12 version(D_InlineAsm_X86){
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
13 version = runTest;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
14 }else version(D_InlineAsm_X86_64){
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
15 version = runTest;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
16 }
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
17
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
18 version(runTest){
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
19 int main(){
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
20 int count = 0;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
21
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
22 asm{
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
23 mov EAX, 0;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
24 mov ECX, 2;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
25 Lstart:
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
26 loop Lnext;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
27 jmp Ldone;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
28 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
29 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
30 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
31 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
32 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
33 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
34 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
35 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
36 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
37 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
38 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
39 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
40 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
41 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
42 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
43 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
44 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
45 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
46 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
47 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
48 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
49 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
50 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
51 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
52 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
53 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
54 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
55 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
56 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
57 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
58 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
59 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
60 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
61 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
62 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
63 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
64 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
65 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
66 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
67 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
68 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
69 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
70 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
71 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
72 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
73 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
74 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
75 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
76 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
77 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
78 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
79 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
80 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
81 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
82 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
83 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
84 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
85 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
86 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
87 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
88 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
89 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
90 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
91 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
92 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
93 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
94 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
95 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
96 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
97 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
98 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
99 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
100 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
101 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
102 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
103 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
104 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
105 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
106 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
107 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
108 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
109 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
110 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
111 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
112 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
113 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
114 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
115 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
116 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
117 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
118 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
119 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
120 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
121 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
122 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
123 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
124 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
125 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
126 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
127 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
128 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
129 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
130 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
131 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
132 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
133 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
134 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
135 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
136 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
137 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
138 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
139 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
140 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
141 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
142 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
143 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
144 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
145 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
146 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
147 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
148 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
149 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
150 nop;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
151 Lnext:
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
152 inc EAX;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
153 jmp Lstart;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
154 Ldone:
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
155 mov count, EAX;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
156 }
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
157
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
158 if(1 != count){
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
159 assert(0);
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
160 }
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
161
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
162 return 0;
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
163 }
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
164 }else{
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
165 static assert(0, "DSTRESS{XFAIL}: no inline x86 ASM support");
24fcb78d93f6 r8714@birke: tk | 2007-09-29 23:27:16 +0200
thomask
parents:
diff changeset
166 }