I am trying to find fast memory copy algo.I have found couple of them(including one posted on this board) and they have mmx opcodes in it.I have tried to assemble them but they give errorsFor example I have have this memcopy code


mem5 proc
mov edi,d;
mov esi,s;
mov ecx,size;
shr ecx,4;
lx:
movq mm0,[esi];
movq mm1,[esi+8];
lea esi,[esi+16];
movntq [edi],mm0;
movntq [edi+8],mm1;
lea edi,[edi+16];
dec ecx;
jnz lx;
mem5 endp

I have put
.586
.MMX
to top of my source code however it doesnt accept movntq instructions.I have also tried
.686
.XMM
I have Masm 6.14.84.44 which comes with mas32 packge
Thanks
Posted on 2001-08-03 17:11:47 by LaptoniC
.586p
.XMM

...did it for me, same version. Good Reading.
448.427564 mb/sec is my best memcpy. :)
Posted on 2001-08-03 17:55:40 by bitRAKE
Thanks.I made a silly error I forgot to remove .MMX directive ie
it was

.686
.XMM
.MMX

I dunno why I havent removed it.



:stupid:
Posted on 2001-08-04 05:07:29 by LaptoniC