From f101ba1ab2a8e456c1b5f259b233d6d0e1d8a6b4 Mon Sep 17 00:00:00 2001
From: toy <toy>
Date: Fri, 30 May 2003 01:07:20 +0000
Subject: [PATCH] o Oops.  It's i386, not x86. o Remove the code in
 fake_foreign_function_call that was moved to   build_fake_control_stack_frame

---
 lisp/interrupt.c | 40 ++--------------------------------------
 lisp/os-common.c |  4 ++--
 2 files changed, 4 insertions(+), 40 deletions(-)

diff --git a/lisp/interrupt.c b/lisp/interrupt.c
index 2463a5377..0b001fa3d 100644
--- a/lisp/interrupt.c
+++ b/lisp/interrupt.c
@@ -1,4 +1,4 @@
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.28 2003/05/29 22:03:01 toy Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.29 2003/05/30 01:07:20 toy Exp $ */
 
 /* Interrupt handing magic. */
 
@@ -121,43 +121,7 @@ fake_foreign_function_call(struct sigcontext *context)
     current_binding_stack_pointer = (lispobj *)SC_REG(context, reg_BSP);
 #endif
     
-#if !defined(i386) && 0
-    /* Build a fake stack frame */
-    current_control_frame_pointer = (lispobj *)SC_REG(context, reg_CSP);
-    if ((lispobj *)SC_REG(context, reg_CFP)==current_control_frame_pointer) {
-        /* There is a small window during call where the callee's frame */
-        /* isn't built yet. */
-        if (LowtagOf(SC_REG(context, reg_CODE)) == type_FunctionPointer) {
-            /* We have called, but not built the new frame, so
-               build it for them. */
-            current_control_frame_pointer[0] = SC_REG(context, reg_OCFP);
-            current_control_frame_pointer[1] = SC_REG(context, reg_LRA);
-            current_control_frame_pointer += 8;
-            /* Build our frame on top of it. */
-            oldcont = (lispobj)SC_REG(context, reg_CFP);
-        }
-        else {
-            /* We haven't yet called, build our frame as if the
-               partial frame wasn't there. */
-            oldcont = (lispobj)SC_REG(context, reg_OCFP);
-        }
-    }
-    /* ### We can't tell if we are still in the caller if it had to
-       reg_ALLOCate the stack frame due to stack arguments. */
-    /* ### Can anything strange happen during return? */
-    else
-        /* Normal case. */
-        oldcont = (lispobj)SC_REG(context, reg_CFP);
-    
-    current_control_stack_pointer = current_control_frame_pointer + 8;
-
-    current_control_frame_pointer[0] = oldcont;
-    current_control_frame_pointer[1] = NIL;
-    current_control_frame_pointer[2] = (lispobj)SC_REG(context, reg_CODE);
-#else
     build_fake_control_stack_frame(context);
-#endif
-
     
     /* Do dynamic binding of the active interrupt context index
        and save the context in the context array. */
@@ -565,7 +529,7 @@ interrupt_install_low_level_handler (int signal, void handler (HANDLER_ARGS))
   /* But we only need this on x86 since the Lisp control stack and the
      C control stack are the same.  For others, they're separate so
      the C stack can still be used.  */
-#if defined(RED_ZONE_HIT) && defined(x86)
+#if defined(RED_ZONE_HIT) && defined(i386)
   if (signal == PROTECTION_VIOLATION_SIGNAL)
     {
       stack_t sigstack;
diff --git a/lisp/os-common.c b/lisp/os-common.c
index 2b362ae1b..8c67436b0 100644
--- a/lisp/os-common.c
+++ b/lisp/os-common.c
@@ -1,6 +1,6 @@
 /*
 
- $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.10 2003/05/29 22:03:01 toy Exp $
+ $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.11 2003/05/30 01:07:20 toy Exp $
 
  This code was written as part of the CMU Common Lisp project at
  Carnegie Mellon University, and has been placed in the public domain.
@@ -319,7 +319,7 @@ os_stack_grows_down (void)
 static void
 guard_zones (char **yellow_start, char **red_start)
 {
-#ifdef x86
+#ifdef i386
   if (os_stack_grows_down ())
     {
       char *end = (char *) CONTROL_STACK_START;
-- 
GitLab