2 * This is the Compaq/Digital Alpha Linux incarnation of
3 * arch-dependent OS-dependent routines. See also "linux-os.c". */
6 * This software is part of the SBCL system. See the README file for
9 * This software is derived from the CMU CL system, which was
10 * written at Carnegie Mellon University and released into the
11 * public domain. The software is in the public domain and is
12 * provided with absolutely no warranty. See the COPYING and CREDITS
13 * files for more information.
16 /* These header files were lifted wholesale from linux-os.c, some may
17 * be redundant. -- Dan Barlow ca. 2001-05-01 */
19 #include <sys/param.h>
25 #include "interrupt.h"
29 #include <sys/socket.h>
30 #include <sys/utsname.h>
32 #include <sys/types.h>
40 size_t os_vm_page_size;
43 os_context_register_t *
44 os_context_register_addr(os_context_t *context, int offset)
46 return &context->uc_mcontext.sc_regs[offset];
49 os_context_register_t *
50 os_context_float_register_addr(os_context_t *context, int offset)
52 return &context->uc_mcontext.sc_fpregs[offset];
55 os_context_register_t *
56 os_context_pc_addr(os_context_t *context)
58 return &((context->uc_mcontext).sc_pc);
62 os_context_sigmask_addr(os_context_t *context)
64 return &context->uc_sigmask;
68 os_context_fp_control(os_context_t *context)
70 return ieee_fpcr_to_swcr((context->uc_mcontext).sc_fpcr);
74 os_restore_fp_control(os_context_t *context)
76 /* FIXME (in two parts):
77 Firstly, what happens in alpha linux inside the signal handler?
78 Does the floating point control state get cleared as in other
81 Secondly, how do we put it back if so? It will probably involve
84 context->uc_mcontext.sc_fpcr
86 (maybe a simple assembly statement will be enough)
90 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
92 asm volatile ("imb" : : : "memory" );