Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / mini / exceptions-sparc.c
index 02cd7922ca5c0f399897754efbf9540fe1f783e7..58e8a90f9fd2eba00c662a4fe76dcfb625b45cf8 100644 (file)
 #include "mini.h"
 #include "mini-sparc.h"
 
+#ifndef REG_SP
+#define REG_SP REG_O6
+#endif
+
 /*
  * mono_arch_get_restore_context:
  *
@@ -371,7 +375,12 @@ mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only)
         * under documented under solaris. The code below seems to work under
         * Solaris 9.
         */
+#ifndef __linux__
        g_assert (!ctx->uc_mcontext.gwins);
+#else
+       /* better, but doesn't work all the time.  need to rethink! */
+       g_assert (!ctx->uc_mcontext.gregs);
+#endif
 
        mctx.ip = ctx->uc_mcontext.gregs [REG_PC];
        mctx.sp = ctx->uc_mcontext.gregs [REG_SP];