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>
39 #if defined GENCGC /* unlikely ... */
43 os_context_register_t *
44 os_context_register_addr(os_context_t *context, int offset)
50 } else if (offset < 16) {
51 return &context->uc_mcontext.gregs[offset+3];
52 } else if (offset < 32) {
53 /* FIXME: You know, this (int *) stuff looks decidedly
55 int *sp = (int*) context->uc_mcontext.gregs[REG_SP];
56 return &(sp[offset-16]);
62 os_context_register_t *
63 os_context_pc_addr(os_context_t *context)
65 return &(context->uc_mcontext.gregs[REG_PC]);
68 os_context_register_t *
69 os_context_npc_addr(os_context_t *context)
71 return &(context->uc_mcontext.gregs[REG_nPC]);
75 os_context_sigmask_addr(os_context_t *context)
77 return &(context->uc_sigmask);
80 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
82 /* see sparc-assem.S */
83 sparc_flush_icache(address, length);