diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-23 20:43:15 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-23 20:43:15 +0000 |
commit | f67f9bdcbebd8011c5ee832ca3af6c94154c26dd (patch) | |
tree | b6d07970e9e9d995f5c147ac9f6b23591e92d4f9 | |
parent | 6f70d068ad2e89df507848d1912f1350dffd06de (diff) |
dunno where to place it :(
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3093 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | memset.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/memset.c b/memset.c new file mode 100644 index 0000000000..e034dbeae5 --- /dev/null +++ b/memset.c @@ -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 |