annotate run/a/asm_pmovmskb_01_B.d @ 1290:e3d0dea394ab

partial inline asm review
author thomask
date Wed, 27 Dec 2006 11:59:48 +0000
parents 03c97933de98
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
973
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
1 // $HeadURL$
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
2 // $Date$
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
3 // $Author$
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
4
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
5 module dstress.run.a.asm_pmovmskb_01_B;
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
6
1290
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
7 version(D_InlineAsm_X86){
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
8 version = runTest;
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
9 }else version(D_InlineAsm_X86_64){
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
10 version = runTest;
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
11 }
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
12
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
13 version(runTest){
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
14 import addon.cpuinfo;
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
15
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
16 int main(){
973
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
17 ulong a = 0x0888_7FFF_FFFF_0000;
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
18 uint i;
1044
03c97933de98 inline ASM review
thomask
parents: 973
diff changeset
19
973
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
20 asm{
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
21 movq MM0, a;
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
22 mov EAX, 0xFF12_34BC;
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
23 pmovmskb EAX, MM0;
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
24 mov i, EAX;
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
25 }
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
26
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
27 if(i != 0b0101_1100){
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
28 assert(0);
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
29 }
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
30
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
31 return 0;
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
32 }
1290
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
33 }else{
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
34 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
e3d0dea394ab partial inline asm review
thomask
parents: 1044
diff changeset
35 static assert(0);
973
8c327aff56f3 extended asm tests
thomask
parents:
diff changeset
36 }