Date: Wed, 31 Mar 2004 09:15:57 -0600
authorSam Lantinga <slouken@libsdl.org>
Thu, 08 Apr 2004 21:13:14 +0000
changeset 8792bacec7930b1
parent 878 c7ca0f3cbca2
child 880 9ef41050100c
Date: Wed, 31 Mar 2004 09:15:57 -0600
From: Tyler Montbriand
Subject: [SDL] Opteron MMX patches for SDL_RLEaccel.c

The inline MMX assembly in SDL_RLEaccel.c compiles unmodified if the typedefs
are adjusted to accept __x86_64__. The diff from SDL-1.2.7 is attached.
src/video/SDL_RLEaccel.c
     1.1 --- a/src/video/SDL_RLEaccel.c	Thu Apr 08 21:06:10 2004 +0000
     1.2 +++ b/src/video/SDL_RLEaccel.c	Thu Apr 08 21:13:14 2004 +0000
     1.3 @@ -102,7 +102,11 @@
     1.4  #include "SDL_memops.h"
     1.5  #include "SDL_RLEaccel_c.h"
     1.6  
     1.7 -#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
     1.8 +#if defined(i386) || defined(__x86_64__)
     1.9 +#define MMX_CAPABLE
    1.10 +#endif
    1.11 +
    1.12 +#if defined(MMX_CAPABLE) && defined(__GNUC__) && defined(USE_ASMBLIT)
    1.13  #include "mmx.h"
    1.14  #include "SDL_cpuinfo.h"
    1.15  #endif
    1.16 @@ -130,7 +134,7 @@
    1.17  #define OPAQUE_BLIT(to, from, length, bpp, alpha)	\
    1.18      PIXEL_COPY(to, from, length, bpp)
    1.19  
    1.20 -#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
    1.21 +#if defined(MMX_CAPABLE) && defined(__GNUC__) && defined(USE_ASMBLIT)
    1.22  
    1.23  #define ALPHA_BLIT32_888MMX(to, from, length, bpp, alpha)	\
    1.24      do {							\
    1.25 @@ -511,7 +515,7 @@
    1.26  	}								\
    1.27      } while(0)
    1.28  
    1.29 -#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
    1.30 +#if defined(MMX_CAPABLE) && defined(__GNUC__) && defined(USE_ASMBLIT)
    1.31  
    1.32  #define ALPHA_BLIT32_888_50MMX(to, from, length, bpp, alpha)		\
    1.33      do {								\
    1.34 @@ -624,7 +628,7 @@
    1.35  #define ALPHA_BLIT16_555_50(to, from, length, bpp, alpha)	\
    1.36      ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbde)
    1.37  
    1.38 -#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
    1.39 +#if defined(MMX_CAPABLE) && defined(__GNUC__) && defined(USE_ASMBLIT)
    1.40  
    1.41  #define CHOOSE_BLIT(blitter, alpha, fmt)				\
    1.42      do {								\