2 * This is the SPARC Linux incarnation of arch-dependent OS-dependent
3 * routines. See also "linux-os.c".
7 * This software is part of the SBCL system. See the README file for
10 * This software is derived from the CMU CL system, which was
11 * written at Carnegie Mellon University and released into the
12 * public domain. The software is in the public domain and is
13 * provided with absolutely no warranty. See the COPYING and CREDITS
14 * files for more information.
18 #include <sys/param.h>
24 #include "interrupt.h"
28 #include <sys/socket.h>
29 #include <sys/utsname.h>
31 #include <sys/types.h>
38 size_t os_vm_page_size;
40 #if defined GENCGC /* unlikely ... */
44 os_context_register_t *
45 os_context_register_addr(os_context_t *context, int offset)
51 } else if (offset < 16) {
52 return &context->si_regs.u_regs[offset];
53 } else if (offset < 32) {
54 int *sp = (int*) context->si_regs.u_regs[14]; /* Stack Pointer */
55 return &(sp[offset-16]);
60 os_context_register_t *
61 os_context_pc_addr(os_context_t *context)
63 return &(context->si_regs.pc);
66 os_context_register_t *
67 os_context_npc_addr(os_context_t *context)
69 return &(context->si_regs.npc);
73 os_context_sigmask_addr(os_context_t *context)
75 return &(context->si_mask);
78 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
80 /* This is the same for linux and solaris, so see sparc-assem.S */
81 sparc_flush_icache(address,length);