From b18979065255e4ed09bb81c6cd75b31b664694e7 Mon Sep 17 00:00:00 2001
From: ch <ch>
Date: Sat, 26 May 1990 01:21:53 +0000
Subject: [PATCH] Fixed the call out code to save CODE on the stack and restore
 it and the LRA from the stack.  This allows a GC to occur if an interrupt
 happens during call out.

---
 ldb/mips-assem.s | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ldb/mips-assem.s b/ldb/mips-assem.s
index 89569d389..db4ac09bc 100644
--- a/ldb/mips-assem.s
+++ b/ldb/mips-assem.s
@@ -1,4 +1,4 @@
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/mips-assem.s,v 1.5 1990/05/24 17:44:00 wlott Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/mips-assem.s,v 1.6 1990/05/26 01:21:53 ch Exp $ */
 #include <machine/regdef.h>
 
 #include "lisp.h"
@@ -193,6 +193,7 @@ call_into_c:
 	addu	CSP, CONT, 32
 	sw	OLDCONT, 0(CONT)
 	sw	LRA, 4(CONT)
+	sw	CODE, 8(CONT)
 
 	/* Note: the C stack is already set up. */
 
@@ -271,6 +272,10 @@ call_into_c:
 
 	.set	reorder
 
+	/* Restore LRA & CODE (they may have been GC'ed) */
+	lw	CODE, 8(CONT)
+	lw	LRA, 4(CONT)
+
 	/* Reset the lisp stack. */
 	/* Note: OLDCONT and CONT are in saved regs. */
 	move	CSP, CONT
-- 
GitLab