/*
* The x86 Linux incarnation of arch-dependent OS-dependent routines.
- * See also linux-os.c
+ * See also "linux-os.c".
*/
-
-/* header files lifted wholesale from linux-os.c, some may be redundant */
+/*
+ * This software is part of the SBCL system. See the README file for
+ * more information.
+ *
+ * This software is derived from the CMU CL system, which was
+ * written at Carnegie Mellon University and released into the
+ * public domain. The software is in the public domain and is
+ * provided with absolutely no warranty. See the COPYING and CREDITS
+ * files for more information.
+ */
#include <stdio.h>
#include <sys/param.h>
* 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) {
}
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)
{