Update of /cvsroot/sbcl/sbcl/src/runtime
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31571/src/runtime
Added Files:
Config.ppc-netbsd ppc-bsd-os.c ppc-bsd-os.h
Log Message:
1.0.2.18:
Whoops. Add the new files for the PPC/NetBSD port, from
Aymeric Vincent.
--- NEW FILE: Config.ppc-netbsd ---
# -*- makefile -*- for the C-level run-time support for SBCL
# 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.
LINKFLAGS += -dynamic -export-dynamic
CFLAGS = -g -Wall -O2
ASSEM_SRC = ppc-assem.S ldso-stubs.S
ARCH_SRC = ppc-arch.c
OS_SRC = bsd-os.c undefineds.c ppc-bsd-os.c
OS_LIBS = # -ldl
GC_SRC = gencgc.c
# Nothing to do for after-grovel-headers.
.PHONY: after-grovel-headers
after-grovel-headers:
--- NEW FILE: ppc-bsd-os.c ---
#include <signal.h>
#include <machine/cpu.h>
#include "sbcl.h"
#include "runtime.h"
#include "thread.h"
int *
os_context_register_addr(os_context_t *context, int offset)
{
return &context->uc_mcontext.__gregs[offset];
}
int *
os_context_sp_addr(os_context_t *context)
{
return &(_UC_MACHINE_SP(context));
}
int *
os_context_pc_addr(os_context_t *context)
{
return &(_UC_MACHINE_PC(context));
}
int *
os_context_lr_addr(os_context_t *context)
{
return &context->uc_mcontext.__gregs[_REG_LR];
}
/* FIXME: If this can be a no-op on BSD/x86, then it
* deserves a more precise name.
*
* (Perhaps os_prepare_data_area_to_be_executed()?) */
void
os_flush_icache(os_vm_address_t address, os_vm_size_t length)
{
ppc_flush_icache(address, length);
}
int arch_os_thread_init(struct thread *thread) {
#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
stack_t sigstack;
/* Signal handlers are run on the control stack, so if it is exhausted
* we had better use an alternate stack for whatever signal tells us
* we've exhausted it */
sigstack.ss_sp=((void *) thread)+dynamic_values_bytes;
sigstack.ss_flags=0;
sigstack.ss_size = 32*SIGSTKSZ;
sigaltstack(&sigstack,0);
#endif
return 1; /* success */
}
int arch_os_thread_cleanup(struct thread *thread) {
return 1; /* success */
}
--- NEW FILE: ppc-bsd-os.h ---
#ifndef _PPC_BSD_OS_H
#define _PPC_BSD_OS_H
typedef int os_context_register_t;
static inline os_context_t *arch_os_get_context(void **void_context) {
return (os_context_t *) *void_context;
}
#endif /* _PPC_BSD_OS_H */
|