* src/vm/jit/powerpc64/linux/md-os.c: Simplified signal handlers.
[cacao.git] / src / vm / jit / powerpc64 / md-trap.h
index 3830d1598ef9eb95c94cd248c7182f98105675bf..aeac454da69f5d1d18175c54861be78fc787ba8d 100644 (file)
@@ -64,6 +64,17 @@ enum {
        TRAP_PATCHER                        = 99 // A large number.
 };
 
+
+/**
+ * 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 */