X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-linux-os.c;h=560babb9fc1c7795e8d8b33fbe8ae0534058c796;hb=7f0f521aa3f6b45259c5dfd5f7f11adcd1a7cac6;hp=ba3b0e830514daf2f4978f0b3d1cc3a8f12a4837;hpb=63fcb94b875a97e468d9add229e220ecceec2352;p=sbcl.git diff --git a/src/runtime/x86-linux-os.c b/src/runtime/x86-linux-os.c index ba3b0e8..560babb 100644 --- a/src/runtime/x86-linux-os.c +++ b/src/runtime/x86-linux-os.c @@ -47,7 +47,7 @@ size_t os_vm_page_size; * gregs[], but it's conditional on __USE_GNU and not defined, so * we need to do this nasty absolute index magic number thing * instead. */ -register_t * +os_context_register_t * os_context_register_addr(os_context_t *context, int offset) { switch(offset) { @@ -63,17 +63,36 @@ os_context_register_addr(os_context_t *context, int offset) } return &context->uc_mcontext.gregs[offset]; } -register_t * + +os_context_register_t * os_context_pc_addr(os_context_t *context) { return &context->uc_mcontext.gregs[14]; } -register_t * + +os_context_register_t * os_context_sp_addr(os_context_t *context) { return &context->uc_mcontext.gregs[17]; } +unsigned long +os_context_fp_control(os_context_t *context) +{ + /* probably the code snippet + * #ifdef __linux__ + * SET_FPU_CONTROL_WORD(context->__fpregs_mem.cw); + * #endif + * is relevant to implementing this correctly */ + + /* Note that currently this is not called, as there is an analogous + * stub in lisp-land (x86-vm.lisp), also returning 0, with the old + * lisp fp-control code. This is here more as a signpost of a possible + * way of restoring functionality, and if it is the way to go would + * need to be included for other architectures as well. */ + return 0; +} + sigset_t * os_context_sigmask_addr(os_context_t *context) {