X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fppc-linux-os.c;h=a2e72b4a2d26506f82042e6e3d1574c4021b0b94;hb=34b6835722544ff2b49b11e2c7e085ac9fb0e3d7;hp=eac15930853e0ca1d39c835855d4b71e588de4bb;hpb=cb427254703b615dc5d1e46a3dd8db7a8a9e6d55;p=sbcl.git diff --git a/src/runtime/ppc-linux-os.c b/src/runtime/ppc-linux-os.c index eac1593..a2e72b4 100644 --- a/src/runtime/ppc-linux-os.c +++ b/src/runtime/ppc-linux-os.c @@ -94,6 +94,34 @@ os_context_lr_addr(os_context_t *context) #endif } +os_context_register_t * +os_context_ctr_addr(os_context_t *context) +{ + /* Like os_context_fp_control() and os_context_lr_addr(), this + * uses an index beyond the declared end of the array in order to + * find the correct register value in the context. */ +#if defined(GLIBC231_STYLE_UCONTEXT) + /* FIXME: This probably should be ->ctr instead of ->gpr[PT_CTR]. */ + return &((context->uc_mcontext.regs)->gpr[PT_CTR]); +#elif defined(GLIBC232_STYLE_UCONTEXT) + return &((context->uc_mcontext.uc_regs)->gregs[PT_CTR]); +#endif +} + +os_context_register_t * +os_context_cr_addr(os_context_t *context) +{ + /* Like os_context_fp_control() and os_context_lr_addr(), this + * uses an index beyond the declared end of the array in order to + * find the correct register value in the context. */ +#if defined(GLIBC231_STYLE_UCONTEXT) + /* FIXME: This probably should be ->ccr instead of ->gpr[PT_CCR]. */ + return &((context->uc_mcontext.regs)->gpr[PT_CCR]); +#elif defined(GLIBC232_STYLE_UCONTEXT) + return &((context->uc_mcontext.uc_regs)->gregs[PT_CCR]); +#endif +} + sigset_t * os_context_sigmask_addr(os_context_t *context) {