Skip to content

Commit

Permalink
1.0.2.11:
Browse files Browse the repository at this point in the history
	NetBSD/PPC support (from Aymeric Vincent sbcl-devel 2007-01-18).
  • Loading branch information
csrhodes committed Feb 5, 2007
1 parent 9ae9ab3 commit 1071bf1
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS
@@ -1,5 +1,6 @@
;;;; -*- coding: utf-8; -*- ;;;; -*- coding: utf-8; -*-
changes in sbcl-1.0.3 relative to sbcl-1.0.2: changes in sbcl-1.0.3 relative to sbcl-1.0.2:
* new platform: NetBSD/PPC. (thanks to Aymeric Vincent)
* optimization: calls of the form (AREF FOO (+ INDEX <constant>)) now * optimization: calls of the form (AREF FOO (+ INDEX <constant>)) now
produce more efficient code on the x86 if the compiler can determine produce more efficient code on the x86 if the compiler can determine
that (+ INDEX <constant>) does not require a bounds check and FOO that (+ INDEX <constant>) does not require a bounds check and FOO
Expand Down
4 changes: 3 additions & 1 deletion make-config.sh
Expand Up @@ -106,7 +106,7 @@ case `uname -m` in
[Aa]lpha) guessed_sbcl_arch=alpha ;; [Aa]lpha) guessed_sbcl_arch=alpha ;;
sparc*) guessed_sbcl_arch=sparc ;; sparc*) guessed_sbcl_arch=sparc ;;
sun*) guessed_sbcl_arch=sparc ;; sun*) guessed_sbcl_arch=sparc ;;
ppc) guessed_sbcl_arch=ppc ;; *ppc) guessed_sbcl_arch=ppc ;;
ppc64) guessed_sbcl_arch=ppc ;; ppc64) guessed_sbcl_arch=ppc ;;
Power*Macintosh) guessed_sbcl_arch=ppc ;; Power*Macintosh) guessed_sbcl_arch=ppc ;;
parisc) guessed_sbcl_arch=hppa ;; parisc) guessed_sbcl_arch=hppa ;;
Expand Down Expand Up @@ -313,6 +313,8 @@ elif [ "$sbcl_arch" = "ppc" -a "$sbcl_os" = "darwin" ]; then
echo "See the limit(1) or ulimit(1) commands and the README file." echo "See the limit(1) or ulimit(1) commands and the README file."
exit 1 exit 1
fi fi
elif [ "$sbcl_arch" = "ppc" -a "$sbcl_os" = "netbsd" ]; then
printf ' :gencgc :stack-allocatable-closures :linkage-table' >> $ltf
elif [ "$sbcl_arch" = "sparc" ]; then elif [ "$sbcl_arch" = "sparc" ]; then
# Test the compiler in order to see if we are building on Sun # Test the compiler in order to see if we are building on Sun
# toolchain as opposed to GNU binutils, and write the appropriate # toolchain as opposed to GNU binutils, and write the appropriate
Expand Down
5 changes: 3 additions & 2 deletions src/code/ppc-vm.lisp
Expand Up @@ -120,8 +120,9 @@
;;; Given a signal context, return the floating point modes word in ;;; Given a signal context, return the floating point modes word in
;;; the same format as returned by FLOATING-POINT-MODES. ;;; the same format as returned by FLOATING-POINT-MODES.
;;; ;;;
;;; FIXME: surely this must be accessible somewhere under Darwin? ;;; FIXME: surely this must be accessible somewhere under Darwin? Or
#!-darwin ;;; under NetBSD?
#!+linux
(define-alien-routine ("os_context_fp_control" context-floating-point-modes) (define-alien-routine ("os_context_fp_control" context-floating-point-modes)
(sb!alien:unsigned 32) (sb!alien:unsigned 32)
(context (* os-context-t))) (context (* os-context-t)))
Expand Down
17 changes: 17 additions & 0 deletions src/compiler/ppc/parms.lisp
Expand Up @@ -110,6 +110,23 @@
(def!constant linkage-table-space-end #x0b000000) (def!constant linkage-table-space-end #x0b000000)
(def!constant linkage-table-entry-size 16)) (def!constant linkage-table-entry-size 16))


#!+netbsd
(progn
#!+gencgc
(progn
(def!constant dynamic-space-start #x4f000000)
(def!constant dynamic-space-end #x7efff000))
#!-gencgc
(progn
(def!constant dynamic-0-space-start #x4f000000)
(def!constant dynamic-0-space-end #x66fff000)
(def!constant dynamic-1-space-start #x67000000)
(def!constant dynamic-1-space-end #x7efff000))

(def!constant linkage-table-space-start #x0a000000)
(def!constant linkage-table-space-end #x0b000000)
(def!constant linkage-table-entry-size 16))

#!+darwin #!+darwin
(progn (progn
#!+gencgc #!+gencgc
Expand Down
6 changes: 6 additions & 0 deletions src/runtime/ppc-arch.c
Expand Up @@ -27,13 +27,15 @@
Caveat callers. */ Caveat callers. */


#if defined (LISP_FEATURE_DARWIN) || defined(LISP_FEATURE_LINUX)
#ifndef PT_DAR #ifndef PT_DAR
#define PT_DAR 41 #define PT_DAR 41
#endif #endif


#ifndef PT_DSISR #ifndef PT_DSISR
#define PT_DSISR 42 #define PT_DSISR 42
#endif #endif
#endif


void arch_init() { void arch_init() {
} }
Expand All @@ -44,7 +46,11 @@ arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *context)
unsigned long pc = (unsigned long)(*os_context_pc_addr(context)); unsigned long pc = (unsigned long)(*os_context_pc_addr(context));
os_vm_address_t addr; os_vm_address_t addr;


#if defined(LISP_FEATURE_NETBSD)
addr = (os_vm_address_t) (code->si_addr);
#else
addr = (os_vm_address_t) (*os_context_register_addr(context,PT_DAR)); addr = (os_vm_address_t) (*os_context_register_addr(context,PT_DAR));
#endif
return addr; return addr;
} }


Expand Down
2 changes: 2 additions & 0 deletions tests/.cvsignore
Expand Up @@ -4,3 +4,5 @@ stack-alignment-offset
test-status.lisp-expr test-status.lisp-expr
run-program-ed-test.tmp run-program-ed-test.tmp
threads-foreign.c threads-foreign.c
read-sequence.data
write-sequence.data
2 changes: 1 addition & 1 deletion tools-for-build/ldso-stubs.lisp
Expand Up @@ -85,7 +85,7 @@ ldso_stub__ ## fct: ; \\
.L ## fct ## e1: ; \\ .L ## fct ## e1: ; \\
.size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;" .size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;"


#!+(and linux ppc) " #!+(and (not darwin) ppc) "
#define LDSO_STUBIFY(fct) \\ #define LDSO_STUBIFY(fct) \\
.globl ldso_stub__ ## fct ; \\ .globl ldso_stub__ ## fct ; \\
.type ldso_stub__ ## fct,@function ; \\ .type ldso_stub__ ## fct,@function ; \\
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal ;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS ;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"1.0.2.10" "1.0.2.11"

0 comments on commit 1071bf1

Please sign in to comment.