Commit 2fc49454 authored by Christophe Rhodes's avatar Christophe Rhodes
Browse files

0.8.5.17:

	Possibly the least useful fix I shall ever make while working on
	SBCL:

	Implement ldso_stub__foo for MIPS/Linux, so that the system can
	be built to link dynamically, allowing linking of foreign code
	in
	... many thanks to Ralf Baechle for education about the MIPS ABI
	Now foreign.test.sh passes, and we build and pass tests for all
	13 contribs!  Woohoo!

	Is there a user in the house?
parent bbfa2aeb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2173,6 +2173,9 @@ changes in sbcl-0.8.6 relative to sbcl-0.8.5:
    that the various BOOLE-related constants have the same value in
    host and target lisps.  (noted by Paul Dietz' test suite on an
    SBCL binary built from CLISP)
  * the system can now be dynamically linked on the MIPS platform,
    which enables dynamic loading of foreign code from Lisp.  (thanks
    to Ralf Baechle for discussions on the MIPS ABI)
  * fixed a compiler bug: MV-LET convertion did not check references
    to the "max args" entry point.  (reported by Brian Downing)
  * tweaked disassembly notes to be less confident about proclaiming
+2 −3
Original line number Diff line number Diff line
@@ -12,11 +12,10 @@ LD = ld
LINKFLAGS = -v -g 
NM = nm -p

ASSEM_SRC = mips-assem.S #hppa-linux-stubs.S
ARCH_SRC = mips-arch.c undefineds.c
ASSEM_SRC = mips-assem.S ldso-stubs.S
ARCH_SRC = mips-arch.c #undefineds.c

OS_SRC = linux-os.c  mips-linux-os.c os-common.c 
LINKFLAGS+=-static
OS_LIBS= -ldl

GC_SRC= cheneygc.c
+27 −0
Original line number Diff line number Diff line
@@ -100,6 +100,33 @@ ldso_stub__ ## fct: ; \
.L ## fct ## e1: ;                              \
	.size	 ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;

#elif defined LISP_FEATURE_MIPS

/* KLUDGE: set up the vital fifth argument, passed on the 
   stack.  Do this unconditionally, even if the stub is for a
   function with few arguments: it can't hurt.  We only do this for
   the fifth argument, as the first four are passed in registers
   and we apparently don't ever need to pass six arguments to a
   libc function.  -- CSR, 2003-10-29 */

#define LDSO_STUBIFY(fct)                       \
.globl ldso_stub__ ## fct ;                     \
	.type	 ldso_stub__ ## fct,@function ; \
ldso_stub__ ## fct: ;                           \
	addiu $29,-48 		; \
	sw $28,40($29)		; \
	sw $31,44($29) 		; \
	lw $25,64($29)		; \
	sw $25,16($29)		; \
	la $25,	fct	;		\
	jalr $25	;				\
	lw $31,44($29) 		; \
	lw $28,40($29)		; \
	addiu $29,48  		; \
	jr $31 			; \
.L ## fct ## e1: ;                              \
	.size	 ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;
	
#else
#error unsupported CPU architecture
#endif
+1 −1
Original line number Diff line number Diff line
@@ -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".)
"0.8.5.16"
"0.8.5.17"