]> gitweb.factorcode.org Git - factor.git/blob - vm/os-linux-ppc.hpp
merge project-euler.factor
[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
8 inline static void *ucontext_stack_pointer(void *uap)
9 {
10         ucontext_t *ucontext = (ucontext_t *)uap;
11         return (void *)ucontext->uc_mcontext.uc_regs->gregs[PT_R1];
12 }
13
14 #define UAP_PROGRAM_COUNTER(ucontext) \
15         (((ucontext_t *)(ucontext))->uc_mcontext.uc_regs->gregs[PT_NIP])
16
17 }