1.0.2.18:
authorChristophe Rhodes <csr21@cantab.net>
Tue, 6 Feb 2007 15:51:14 +0000 (15:51 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Tue, 6 Feb 2007 15:51:14 +0000 (15:51 +0000)
Whoops.  Add the new files for the PPC/NetBSD port, from
Aymeric Vincent.

src/runtime/Config.ppc-netbsd [new file with mode: 0644]
src/runtime/ppc-bsd-os.c [new file with mode: 0644]
src/runtime/ppc-bsd-os.h [new file with mode: 0644]
version.lisp-expr

diff --git a/src/runtime/Config.ppc-netbsd b/src/runtime/Config.ppc-netbsd
new file mode 100644 (file)
index 0000000..07f668e
--- /dev/null
@@ -0,0 +1,25 @@
+# -*- 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:
diff --git a/src/runtime/ppc-bsd-os.c b/src/runtime/ppc-bsd-os.c
new file mode 100644 (file)
index 0000000..e77590c
--- /dev/null
@@ -0,0 +1,63 @@
+#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 */
+}
diff --git a/src/runtime/ppc-bsd-os.h b/src/runtime/ppc-bsd-os.h
new file mode 100644 (file)
index 0000000..5c8dde0
--- /dev/null
@@ -0,0 +1,10 @@
+#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 */
index f189318..df6b983 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.2.17"
+"1.0.2.18"