mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-18 15:27:16 +00:00
SDL_blit_copy: Don't call potentially FPU using SDL_memcpy in SDL_memcpyMMX
This commit is contained in:
parent
51c10bef0b
commit
cd64e0b6e3
|
@ -530,11 +530,9 @@ if(USE_INTELCC)
|
||||||
# warning #39: division by zero
|
# warning #39: division by zero
|
||||||
# warning #239: floating point underflow
|
# warning #239: floating point underflow
|
||||||
# warning #264: floating-point value does not fit in required floating-point type
|
# warning #264: floating-point value does not fit in required floating-point type
|
||||||
# warning #13203: No EMMS instruction before call to function
|
|
||||||
set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_exp.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd239 -wd264")
|
set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_exp.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd239 -wd264")
|
||||||
set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_log.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd39")
|
set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_log.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd39")
|
||||||
set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_log10.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd39")
|
set_property(SOURCE "${SDL2_SOURCE_DIR}/src/libm/e_log10.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd39")
|
||||||
set_property(SOURCE "${SDL2_SOURCE_DIR}/src/video/SDL_blit_copy.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -wd13203")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ static SDL_INLINE void SDL_memcpySSE(Uint8 *dst, const Uint8 *src, int len)
|
||||||
#endif
|
#endif
|
||||||
static SDL_INLINE void SDL_memcpyMMX(Uint8 *dst, const Uint8 *src, int len)
|
static SDL_INLINE void SDL_memcpyMMX(Uint8 *dst, const Uint8 *src, int len)
|
||||||
{
|
{
|
||||||
const int remain = (len & 63);
|
int remain = len & 63;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
__m64 *d64 = (__m64 *)dst;
|
__m64 *d64 = (__m64 *)dst;
|
||||||
|
@ -79,7 +79,11 @@ static SDL_INLINE void SDL_memcpyMMX(Uint8 *dst, const Uint8 *src, int len)
|
||||||
|
|
||||||
if (remain) {
|
if (remain) {
|
||||||
const int skip = len - remain;
|
const int skip = len - remain;
|
||||||
SDL_memcpy(dst + skip, src + skip, remain);
|
dst += skip;
|
||||||
|
src += skip;
|
||||||
|
while (remain--) {
|
||||||
|
*dst++ = *src++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* __MMX__ */
|
#endif /* __MMX__ */
|
||||||
|
|
Loading…
Reference in a new issue