Mercurial > projects > dstress
comparison run/a/asm_pcmpeqw_01_A.d @ 1285:229e630d4b1a
partuial inline asm review
author | thomask |
---|---|
date | Tue, 26 Dec 2006 14:21:37 +0000 |
parents | 6e5d377573e1 |
children |
comparison
equal
deleted
inserted
replaced
1284:96e7be832c35 | 1285:229e630d4b1a |
---|---|
14 import addon.cpuinfo; | 14 import addon.cpuinfo; |
15 | 15 |
16 int main(){ | 16 int main(){ |
17 haveSSE2!()(); | 17 haveSSE2!()(); |
18 | 18 |
19 short* a = [cast(short)1, 2, 3, 4, 5, 6, 7, 8]; | 19 short[] A = [cast(short)1, 2, 3, 4, 5, 6, 7, 8]; |
20 short* b = [cast(short)1, 0, byte.min, -5, -4, -3, -2, 8]; | 20 short* a = A.ptr; |
21 ushort* c = new ushort[8]; | 21 |
22 short[] B = [cast(short)1, 0, byte.min, -5, -4, -3, -2, 8]; | |
23 short* b = B.ptr; | |
24 | |
25 ushort* c = (new ushort[8]).ptr; | |
22 | 26 |
23 static if(size_t.sizeof == 4){ | 27 static if(size_t.sizeof == 4){ |
24 asm{ | 28 asm{ |
25 mov EAX, a; | 29 mov EAX, a; |
26 movdqu XMM0, [EAX]; | 30 movdqu XMM0, [EAX]; |