SDL_memcpyMMX(): Make sure srcskip and dstskip are 8-byte aligned.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 29 Oct 2011 01:03:50 -0400
changeset 60338788e295d3c8
parent 6032 aa31cad2451f
child 6034 e228e94fef7f
SDL_memcpyMMX(): Make sure srcskip and dstskip are 8-byte aligned.

Thanks to Patrick Baggett for the fix!
src/video/SDL_blit_copy.c
     1.1 --- a/src/video/SDL_blit_copy.c	Sat Oct 29 00:57:45 2011 -0400
     1.2 +++ b/src/video/SDL_blit_copy.c	Sat Oct 29 01:03:50 2011 -0400
     1.3 @@ -127,7 +127,7 @@
     1.4  #endif
     1.5  
     1.6  #ifdef __MMX__
     1.7 -    if (SDL_HasMMX()) {
     1.8 +    if (SDL_HasMMX() && !(srcskip & 7) && !(dstskip & 7)) {
     1.9          while (h--) {
    1.10              SDL_memcpyMMX(dst, src, w);
    1.11              src += srcskip;