Simplify (and robustify) regular PACKing
[sbcl.git] / src / runtime / mips-arch.h
index eba16e4..cedd280 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _MIPS_ARCH_H
 #define _MIPS_ARCH_H
 
+#define ALIEN_STACK_GROWS_DOWNWARD
 
 static inline void
 get_spinlock(volatile lispobj *word, long value)
@@ -41,7 +42,23 @@ get_spinlock(volatile lispobj *word, long value)
 static inline void
 release_spinlock(volatile lispobj *word)
 {
+#ifdef LISP_FEATURE_SB_THREAD
+    __asm__ __volatile__ (
+        "       .set push\n"
+        "       .set mips2\n"
+        "       .set noreorder\n"
+        "       sw      $0,%[__mem]\n"
+        "       sync\n"
+        "       .set pop"
+        :
+        : [__mem] "R" (*word)
+        : "memory");
+#else /* LISP_FEATURE_SB_THREAD */
     *word=0;
+#endif
 }
 
+unsigned int arch_get_fp_control(void);
+void arch_set_fp_control(unsigned int fp);
+
 #endif /* _MIPS_ARCH_H */