]> gitweb.factorcode.org Git - factor.git/blob - vm/os-linux-ppc.hpp
Fix bugs in unix ffi usage
[factor.git] / vm / os-linux-ppc.hpp
1 #include <ucontext.h>
2
3 namespace factor
4 {
5
6 #define FRAME_RETURN_ADDRESS(frame,vm) *((void **)(vm->frame_successor(frame) + 1) + 1)
7 #define UAP_STACK_POINTER(ucontext) ((ucontext_t *)ucontext)->uc_mcontext.uc_regs->gregs[PT_R1]
8 #define UAP_PROGRAM_COUNTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.uc_regs->gregs[PT_NIP])
9
10 }