Mercurial > projects > dstress
comparison run/a/asm_pmaxsw_01_A.d @ 1290:e3d0dea394ab
partial inline asm review
author | thomask |
---|---|
date | Wed, 27 Dec 2006 11:59:48 +0000 |
parents | 6e5d377573e1 |
children |
comparison
equal
deleted
inserted
replaced
1289:ad4d84aba69b | 1290:e3d0dea394ab |
---|---|
15 import addon.cpuinfo; | 15 import addon.cpuinfo; |
16 | 16 |
17 int main(){ | 17 int main(){ |
18 haveSSE!()(); | 18 haveSSE!()(); |
19 | 19 |
20 short* a = [cast(short)1, 2, 3, 4, 5, 6, 16, 2]; | 20 short[] A = [cast(short)1, 2, 3, 4, 5, 6, 16, 2]; |
21 short* b = [cast(short)-9, 10, -11, -12, 13, 14, 0xFFF, 1]; | 21 short* a = A.ptr; |
22 short* c = new short[8]; | 22 |
23 short[] B = [cast(short)-9, 10, -11, -12, 13, 14, 0xFFF, 1]; | |
24 short* b = B.ptr; | |
25 | |
26 short* c = (new short[8]).ptr; | |
23 | 27 |
24 static if(size_t.sizeof == 4){ | 28 static if(size_t.sizeof == 4){ |
25 asm{ | 29 asm{ |
26 mov EAX, a; | 30 mov EAX, a; |
27 movdqu XMM0, [EAX]; | 31 movdqu XMM0, [EAX]; |