5 #define UAP_STACK_POINTER(ucontext) \
6 ((ucontext_t*)ucontext)->uc_mcontext.uc_regs->gregs[1]
7 #define UAP_PROGRAM_COUNTER(ucontext) \
8 (((ucontext_t*)ucontext)->uc_mcontext.uc_regs->gregs[32])
9 #define UAP_SET_TOC_POINTER(uap, ptr) (void)0
11 #define CODE_TO_FUNCTION_POINTER(code) (void)0
12 #define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void)0
13 #define FUNCTION_CODE_POINTER(ptr) ptr
14 #define FUNCTION_TOC_POINTER(ptr) ptr
16 inline static unsigned int uap_fpu_status(void* uap) {
19 unsigned int as_uint[2];
21 tmp.as_double = ((ucontext_t*)uap)->uc_mcontext.uc_regs->fpregs.fpscr;
22 return tmp.as_uint[1];
25 inline static void uap_clear_fpu_status(void* uap) {
28 unsigned int as_uint[2];
30 tmp.as_double = ((ucontext_t*)uap)->uc_mcontext.uc_regs->fpregs.fpscr;
31 tmp.as_uint[1] &= 0x0007f8ff;
32 ((ucontext_t*)uap)->uc_mcontext.uc_regs->fpregs.fpscr = tmp.as_double;