# HG changeset patch # User arpi_esp # Date 987889768 0 # Node ID e7c7a386a0c04f8ee3ea9f28e90beace71b4e907 # Parent 0375ced94bd73d49117aa98bc3108bfa36251e70 16-byte align fix for SSE diff -r 0375ced94bd7 -r e7c7a386a0c0 libvo/fastmemcpy.h --- a/libvo/fastmemcpy.h Sat Apr 21 21:06:37 2001 +0000 +++ b/libvo/fastmemcpy.h Sat Apr 21 21:49:28 2001 +0000 @@ -29,6 +29,25 @@ void *p; int i; + +#ifdef HAVE_SSE /* Only P3 (may be Cyrix3) */ +// printf("fastmemcpy_pre(0x%X,0x%X,0x%X)\n",to,from,len); + // Align dest to 16-byte boundary: + if((unsigned int)to&15){ + int len2=16-((unsigned int)to&15); + if(len>len2){ + len-=len2; + __asm__ __volatile__( + "rep ; movsb\n" + :"=D" (to), "=S" (from) + : "D" (to), "S" (from),"c" (len2) + : "memory"); + } + } +// printf("fastmemcpy(0x%X,0x%X,0x%X)\n",to,from,len); +#endif + + if(len >= 0x200) /* 512-byte blocks */ { p = to;