annotate memset.c @ 3192:d84317675d4e

few new Q/As
author gabucino
date Wed, 28 Nov 2001 23:06:23 +0000
parents c442c6565922
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3092
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
1 #include "config.h"
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
2
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
3 #ifdef USE_FASTMEMSET
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
4 #if defined(HAVE_SSE) || defined(HAVE_SSE2)
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
5 /* (C) 2001 Csabai Csaba <csibi@diablo.ovinet.hu> */
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
6 inline void *fast_memset(void *ptr, long val, long num)
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
7 {
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
8 __asm__ __volatile__(
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
9 "cmpxchg8 (%2)"
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
10 : "=a" (val), "=d" (num)
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
11 : "r" (ptr), "0" (val), "1" (num)
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
12 :"memory");
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
13
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
14 return(ptr);
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
15 }
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
16 #endif
c442c6565922 dunno where to place it :(
alex
parents:
diff changeset
17 #endif