annotate run/a/asm_movq_02_B.d @ 1321:e6887749b811

cleaned up remaining puremagic @uri@s
author thomask
date Sun, 31 Dec 2006 20:00:02 +0000
parents 7360e428ad73
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1037
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
1 // $HeadURL$
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
2 // $Date$
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
3 // $Author$
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
4
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
5 // @author@ <thomas-dloop@kuehne.cn>
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
6 // @date@ 2006-05-26
1321
e6887749b811 cleaned up remaining puremagic @uri@s
thomask
parents: 1062
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=173
1037
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
8
1062
7360e428ad73 pre 0.162 review
thomask
parents: 1044
diff changeset
9 // __DSTRESS_TORTURE_BLOCK__ -fPIC
7360e428ad73 pre 0.162 review
thomask
parents: 1044
diff changeset
10
1037
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
11 module dstress.run.a.asm_movq_02_B;
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
12
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
13 version(D_InlineAsm_X86){
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
14 version = runTest;
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
15 }else version(D_InlineAsm_X86_64){
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
16 version = runTest;
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
17 }
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
18
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
19 version(runTest){
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
20 import addon.cpuinfo;
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
21
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
22 int main(){
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
23 haveSSE2!()();
1044
03c97933de98 inline ASM review
thomask
parents: 1042
diff changeset
24
1037
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
25 const byte[8] A = [3, 4, 9, 0, 1, 3, 7, 2];
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
26 byte[8] b;
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
27
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
28 asm{
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
29 movq MM0, A;
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
30 movq b, MM0;
1042
f34b7d4a2db7 added DMD-0.160 results
thomask
parents: 1037
diff changeset
31 emms;
1037
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
32 }
1044
03c97933de98 inline ASM review
thomask
parents: 1042
diff changeset
33
1037
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
34 for(size_t i = 0; i < A.length; i++){
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
35 if(A[i] != b[i]){
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
36 assert(0);
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
37 }
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
38 }
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
39
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
40 return 0;
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
41 }
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
42 }else{
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
43 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
44 static assert(0);
22f348c04a9b [Bug 173] New: incorrect size calculation for movq
thomask
parents:
diff changeset
45 }