boolean
arch_pseudo_atomic_atomic(os_context_t *context)
{
- /* FIXME: this foreign_function_call_active test is dubious at
- * best. If a foreign call is made in a pseudo atomic section
- * (?) or more likely a pseudo atomic section is in a foreign
- * call then an interrupt is executed immediately. Maybe it
- * has to do with C code not maintaining pseudo atomic
- * properly. MG - 2005-08-10
- *
- * The foreign_function_call_active used to live at each call-site
- * to arch_pseudo_atomic_atomic, but this seems clearer.
- * --NS 2007-05-15 */
- return (!foreign_function_call_active)
- && os_context_register(context, reg_ALLOC) & 1;
+ return os_context_register(context, reg_ALLOC) & 1;
}
void
{
os_context_t *context = arch_os_get_context(&void_context);
unsigned int code = (os_context_insn(context) >> 6) & 0xfffff;
+#ifdef LISP_FEATURE_LINUX
+ os_restore_fp_control(context);
+#endif
/* FIXME: This magic number is pseudo-atomic-trap from parms.lisp.
* Genesis should provide the proper #define, but it specialcases
* pseudo-atomic-trap to work around some oddity on SPARC.
unsigned int op, rs, rt, rd, funct, dest = 32;
int immed;
int result;
+#ifdef LISP_FEATURE_LINUX
+ os_restore_fp_control(context);
+#endif
op = (bad_inst >> 26) & 0x3f;
rs = (bad_inst >> 21) & 0x1f;
arch_skip_instruction(context);
}
+unsigned int
+arch_get_fp_control(void)
+{
+ register unsigned int ret asm("$2");
+
+ __asm__ __volatile__ ("cfc1 %0, $31" : "=r" (ret));
+
+ return ret;
+}
+
+void
+arch_set_fp_control(unsigned int fp)
+{
+ __asm__ __volatile__ ("ctc1 %0, $31" :: "r" (fp));
+}
+
void
arch_install_interrupt_handlers(void)
{