comparison run/a/asm_paddsw_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, short.min, 3, 4, 5, 6, 7, 8]; 19 short[] A = [1, short.min, 3, 4, 5, 6, 7, 8];
20 short* b = [cast(short)short.max, -8, -7, -6, -5, -4, -3, -2]; 20 short* a = A.ptr;
21 short* c = new short[8]; 21
22 short[] B = [short.max, -8, -7, -6, -5, -4, -3, -2];
23 short* b = B.ptr;
24
25 short* c = (new short[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];