diff src/video/SDL_memops.h @ 1:cf2af46e9e2a

Changes since SDL 1.2.0 release
author Sam Lantinga <slouken@lokigames.com>
date Thu, 26 Apr 2001 16:50:19 +0000
parents 74212992fb08
children e8157fcb3114
line wrap: on
line diff
--- a/src/video/SDL_memops.h	Thu Apr 26 16:45:43 2001 +0000
+++ b/src/video/SDL_memops.h	Thu Apr 26 16:50:19 2001 +0000
@@ -53,6 +53,17 @@
 		: "memory" );						  \
 } while(0)
 
+#define SDL_memcpy4(dst, src, len)				\
+do {								\
+	int ecx, edi, esi;					\
+	__asm__ __volatile__ (					\
+		"cld\n\t"					\
+		"rep ; movsl"					\
+		: "=&c" (ecx), "=&D" (edi), "=&S" (esi)		\
+		: "0" ((unsigned)(len)), "1" (dst), "2" (src)	\
+		: "memory" );					\
+} while(0)
+
 #define SDL_revcpy(dst, src, len)			\
 do {							\
 	int u0, u1, u2;					\
@@ -104,9 +115,15 @@
 #ifndef SDL_memcpy
 #define SDL_memcpy(dst, src, len)	memcpy(dst, src, len)
 #endif
+
+#ifndef SDL_memcpy4
+#define SDL_memcpy4(dst, src, len)	memcpy(dst, src, (len) << 2)
+#endif
+
 #ifndef SDL_revcpy
 #define SDL_revcpy(dst, src, len)	memmove(dst, src, len)
 #endif
+
 #ifndef SDL_memset4
 #define SDL_memset4(dst, val, len)		\
 do {						\