0.8.18.14:
[sbcl.git] / src / runtime / x86-64-arch.h
1 /* FIXME: Aren't preprocessor symbols with underscore prefixes
2  * reserved for the system libraries? If so, it would be tidy to
3  * rename flags like _X86_ARCH_H so their names are in a part of the
4  * namespace that we control. */
5 #ifndef _X86_ARCH_H
6 #define _X86_ARCH_H
7
8 #define ARCH_HAS_STACK_POINTER
9
10 /* FIXME: Do we also want
11  *   #define ARCH_HAS_FLOAT_REGISTERS
12  * here? (The answer wasn't obvious to me when merging the
13  * architecture-abstracting patches for CSR's SPARC port. -- WHN 2002-02-15) */
14
15 static inline void 
16 get_spinlock(lispobj *word,int value)
17 {
18 #if 0
19     u32 eax=0;
20     do {
21         asm ("xor %0,%0\n\
22               lock cmpxchg %1,%2" 
23              : "=a" (eax)
24              : "r" (value), "m" (*word)
25              : "memory", "cc");
26     } while(eax!=0);
27 #else
28     *word=value;
29 #endif
30 }
31
32 static inline void
33 release_spinlock(lispobj *word)
34 {
35     *word=0;
36 }
37
38 #endif /* _X86_ARCH_H */