فهرست منبع

video: Remove MMX codepath from SDL_BlitCopy.

It was only used if SSE wasn't supported (available since the Pentium III in
1999), or the data was aligned to 8 bytes but not aligned to 16 bytes.

The likelihood of ever hitting this codepath seems extremely low.
Ryan C. Gordon 1 سال پیش
والد
کامیت
78a36830f8
1فایلهای تغییر یافته به همراه0 افزوده شده و 54 حذف شده
  1. 0 54
      src/video/SDL_blit_copy.c

+ 0 - 54
src/video/SDL_blit_copy.c

@@ -50,53 +50,6 @@ static SDL_INLINE void SDL_TARGETING("sse") SDL_memcpySSE(Uint8 *dst, const Uint
 }
 #endif /* SDL_SSE_INTRINSICS */
 
-#ifdef SDL_MMX_INTRINSICS
-#ifdef _MSC_VER
-#pragma warning(disable : 4799)
-#endif
-static SDL_INLINE void SDL_TARGETING("mmx") SDL_memcpyMMX(Uint8 *dst, const Uint8 *src, int len)
-{
-    int remain = len & 63;
-    int i;
-
-    __m64 *d64 = (__m64 *)dst;
-    __m64 *s64 = (__m64 *)src;
-
-    for (i = len / 64; i--;) {
-        d64[0] = s64[0];
-        d64[1] = s64[1];
-        d64[2] = s64[2];
-        d64[3] = s64[3];
-        d64[4] = s64[4];
-        d64[5] = s64[5];
-        d64[6] = s64[6];
-        d64[7] = s64[7];
-
-        d64 += 8;
-        s64 += 8;
-    }
-
-    if (remain) {
-        const int skip = len - remain;
-        dst += skip;
-        src += skip;
-        while (remain--) {
-            *dst++ = *src++;
-        }
-    }
-}
-
-static SDL_INLINE void SDL_TARGETING("mmx") SDL_BlitCopyMMX(Uint8 *dst, const Uint8 *src, const int dstskip, const int srcskip, const int w, int h)
-{
-    while (h--) {
-        SDL_memcpyMMX(dst, src, w);
-        src += srcskip;
-        dst += dstskip;
-    }
-    _mm_empty();
-}
-#endif /* SDL_MMX_INTRINSICS */
-
 void SDL_BlitCopy(SDL_BlitInfo *info)
 {
     SDL_bool overlap;
@@ -149,13 +102,6 @@ void SDL_BlitCopy(SDL_BlitInfo *info)
     }
 #endif
 
-#ifdef SDL_MMX_INTRINSICS
-    if (SDL_HasMMX() && !(srcskip & 7) && !(dstskip & 7)) {
-        SDL_BlitCopyMMX(dst, src, dstskip, srcskip, w, h);
-        return;
-    }
-#endif
-
     while (h--) {
         SDL_memcpy(dst, src, w);
         src += srcskip;