From a025351ee4fbb55e279a66bb575223ee56a9bf60 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Fri, 18 Sep 1992 05:53:31 +0000 Subject: [PATCH] Add STACK_RESET macro for machines/OSs in which we have hardware stack protection. --- v7/src/microcode/hooks.c | 5 +++-- v7/src/microcode/stack.h | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/v7/src/microcode/hooks.c b/v7/src/microcode/hooks.c index 3370797be..61cc7a69f 100644 --- a/v7/src/microcode/hooks.c +++ b/v7/src/microcode/hooks.c @@ -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); \ diff --git a/v7/src/microcode/stack.h b/v7/src/microcode/stack.h index 2a474d4f4..bc09f44eb 100644 --- a/v7/src/microcode/stack.h +++ b/v7/src/microcode/stack.h @@ -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. */ +#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; \ -- 2.25.1