* src/vm/jit/powerpc/linux/md-os.c: Simplified signal handlers.
[cacao.git] / src / vm / jit / powerpc / md-trap.h
index 3e552352653de800010fc569fc75843638fe2f90..45e1a6ab97a864c06910c216be165b83b6261c62 100644 (file)
@@ -58,9 +58,21 @@ enum {
        /* Don't use 8 (could be a normal load offset). */
 
        TRAP_COMPILER                       = 9,
+       TRAP_COUNTDOWN                      = 10,
        TRAP_END
 };
 
+
+/**
+ * Macro to fixup a compiler stub. The XPC is the RA minus 4,
+ * because the RA points to the instruction after the call.
+ */
+#define MD_TRAP_COMPILER_FIXUP(xpc, ra, sp, pv) \
+       do { \
+               (xpc) = (void*) (((uintptr_t) (ra)) - 4); \
+       } while(0)
+
+
 #endif /* _MD_TRAP_H */