* src/vm/jit/powerpc/linux/md-os.c: Simplified signal handlers.
[cacao.git] / src / vm / jit / powerpc / md-trap.h
index fc9807d081ee0e4e60e4495c940ca469694082dd..45e1a6ab97a864c06910c216be165b83b6261c62 100644 (file)
@@ -62,6 +62,17 @@ enum {
        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 */