changeset 3092:c442c6565922

dunno where to place it :(
author alex
date Fri, 23 Nov 2001 20:43:15 +0000
parents a98d486508db
children fb4cee33d3c6
files memset.c
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/memset.c	Fri Nov 23 20:43:15 2001 +0000
@@ -0,0 +1,17 @@
+#include "config.h"
+
+#ifdef USE_FASTMEMSET
+#if defined(HAVE_SSE) || defined(HAVE_SSE2)
+/* (C) 2001 Csabai Csaba <csibi@diablo.ovinet.hu> */
+inline void *fast_memset(void *ptr, long val, long num) 
+{
+    __asm__ __volatile__(
+	"cmpxchg8 (%2)"
+	: "=a" (val), "=d" (num)
+	: "r" (ptr), "0" (val), "1" (num)
+	:"memory");
+
+    return(ptr);
+}
+#endif
+#endif