Add STACK_RESET macro for machines/OSs in which we have hardware stack
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 18 Sep 1992 05:53:31 +0000 (05:53 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 18 Sep 1992 05:53:31 +0000 (05:53 +0000)
protection.

v7/src/microcode/hooks.c
v7/src/microcode/stack.h

index 3370797be256e8db3f547628f48e4547ef45b4e5..61cc7a69fb85cb1629c658cc61899a52c6481710 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/hooks.c,v 9.44 1992/02/08 14:54:04 cph Exp $
+$Id: hooks.c,v 9.45 1992/09/18 05:53:31 jinx Exp $
 
-Copyright (c) 1988-92 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -203,6 +203,7 @@ DEFINE_PRIMITIVE ("APPLY", Prim_apply, 2, 2, 0)
   }                                                                    \
   if (Consistency_Check && (Stack_Pointer != Stack_Top))               \
     Microcode_Termination (TERM_BAD_STACK);                            \
+  STACK_RESET ();                                                      \
  Will_Push (CONTINUATION_SIZE);                                                \
   Store_Return (RC_JOIN_STACKLETS);                                    \
   Store_Expression (target);                                           \
index 2a474d4f4a2714ddfacba4f42a0263cd752f0d5f..bc09f44eb0ea8b4813a138c92c96f6f9bb998ddd 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/stack.h,v 9.31 1992/07/29 19:54:55 cph Exp $
+$Id: stack.h,v 9.32 1992/09/18 05:53:14 jinx Exp $
 
-Copyright (c) 1987-92 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -34,6 +34,19 @@ MIT in each case. */
 
 /* This file contains macros for manipulating stacks and stacklets. */
 \f
+#ifdef DOS386
+
+extern void EXFUN (dos386_stack_reset, (void));
+#define STACK_RESET() dos386_stack_reset()
+
+#else
+
+#define STACK_RESET() do                                               \
+{                                                                      \
+} while (0)
+
+#endif
+
 #ifdef USE_STACKLETS
 
 /*
@@ -390,6 +403,7 @@ do                                                                  \
       Microcode_Termination (TERM_BAD_STACK);                          \
     }                                                                  \
   }                                                                    \
+  STACK_RESET ();                                                      \
   if (!(From_Pop_Return))                                              \
   {                                                                    \
     Prev_Restore_History_Stacklet = NULL;                              \