annotate memset.c @ 3187:ad286d1b7705
MP1E support needed by DXR3 stuff (Patch by D. Holm)
author |
atmos4 |
date |
Wed, 28 Nov 2001 15:34:31 +0000 |
parents |
c442c6565922 |
children |
|
rev |
line source |
3092
|
1 #include "config.h"
|
|
2
|
|
3 #ifdef USE_FASTMEMSET
|
|
4 #if defined(HAVE_SSE) || defined(HAVE_SSE2)
|
|
5 /* (C) 2001 Csabai Csaba <csibi@diablo.ovinet.hu> */
|
|
6 inline void *fast_memset(void *ptr, long val, long num)
|
|
7 {
|
|
8 __asm__ __volatile__(
|
|
9 "cmpxchg8 (%2)"
|
|
10 : "=a" (val), "=d" (num)
|
|
11 : "r" (ptr), "0" (val), "1" (num)
|
|
12 :"memory");
|
|
13
|
|
14 return(ptr);
|
|
15 }
|
|
16 #endif
|
|
17 #endif
|