Skip to main content
GameDev.net gamedev.net
🔒 Locked

MMX memcpy

Started by neocron Sep 8, 2000 at 1:05 AM 1 replies 800+ views
Original Post
neocron
neocron
Does anyone have an optimized MMX memcpy/bcopy routine I could use? Or know of any place I can download one? Thanks! Karen
MButchers
MButchers
For a damsel in distress.

    

void __fastcall copy_mem_mmx_a(void *dest,void *src,long size)
{
__asm
{
mov esi,src
mov edi,dest
mov eax,size
L1:
movq mm0,[esi]
movq [edi],mm0

add esi,8
add edi,8

sub eax, 8
jnz L1

emms
}
}



Cheers

//Original code by gladiator
neocron
neocron

Thanks MButchers you''ve put me on the right track!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.