From 0d7cf672a32d544b6ba64f31692cf7b0a4fcddc8 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 5 Oct 1995 03:27:42 +0000 Subject: [PATCH] The Free register can't be compared to the value in REGBLOCK_MEMTOP unless it is translated from a "C" address to a "Scheme" address. This makes a difference on the i386 where we sometimes use the segment registers in a way that makes these two representations different. --- v7/src/microcode/cmpint.c | 10 ++++++---- v8/src/microcode/cmpint.c | 12 +++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/v7/src/microcode/cmpint.c b/v7/src/microcode/cmpint.c index 080fc8761..894563ea7 100644 --- a/v7/src/microcode/cmpint.c +++ b/v7/src/microcode/cmpint.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: cmpint.c,v 1.84 1994/11/28 04:03:58 cph Exp $ +$Id: cmpint.c,v 1.85 1995/10/05 03:27:29 cph Exp $ -Copyright (c) 1989-1994 Massachusetts Institute of Technology +Copyright (c) 1989-95 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -845,7 +845,8 @@ static utility_result #define INVOKE_RETURN_ADDRESS() do \ { \ - if (((long) Free) >= ((long) (Regs[REGBLOCK_MEMTOP]))) \ + if (((long) (ADDR_TO_SCHEME_ADDR (Free))) \ + >= ((long) (Regs[REGBLOCK_MEMTOP]))) \ return (compiler_interrupt_common (0, Val)); \ else \ RETURN_TO_SCHEME (OBJECT_ADDRESS (STACK_POP ())); \ @@ -3089,7 +3090,8 @@ DEFNX (comutil_reflect_to_interface, /* Attempt to process interrupts before really proceeding. */ - if (((long) Free) >= ((long) (Regs[REGBLOCK_MEMTOP]))) + if (((long) (ADDR_TO_SCHEME_ADDR (Free))) + >= ((long) (Regs[REGBLOCK_MEMTOP]))) { STACK_PUSH (FIXNUM_ZERO + REFLECT_CODE_CC_BKPT); STACK_PUSH (reflect_to_interface); diff --git a/v8/src/microcode/cmpint.c b/v8/src/microcode/cmpint.c index 0be347e8d..1df64fa8e 100644 --- a/v8/src/microcode/cmpint.c +++ b/v8/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.85 1995/07/26 19:08:48 adams Exp $ +$Id: cmpint.c,v 1.86 1995/10/05 03:27:42 cph Exp $ Copyright (c) 1989-1995 Massachusetts Institute of Technology @@ -790,15 +790,16 @@ static utility_result EXFUN (compiler_interrupt_common, (SCHEME_ADDR, SCHEME_OBJECT)); #define INVOKE_RETURN_ADDRESS(Value) do \ -{ if (((long) Free) >= ((long) (Regs[REGBLOCK_MEMTOP]))) \ +{ if (((long) (ADDR_TO_SCHEME_ADDR (Free))) \ + >= ((long) (Regs[REGBLOCK_MEMTOP]))) \ return (compiler_interrupt_common (0, Value)); \ else \ { SCHEME_OBJECT ret = STACK_POP(); \ - STACK_PUSH (SHARP_F); \ + STACK_PUSH (SHARP_F); \ STACK_PUSH (Value); \ STACK_PUSH (FIXNUM_ZERO + 1); \ RETURN_TO_SCHEME (OBJECT_ADDRESS (ret)); \ - } \ + } \ } while (0) #endif /* i386 */ @@ -3253,7 +3254,8 @@ DEFNX (comutil_reflect_to_interface, case REFLECT_CODE_CC_BKPT: { unsigned long value; /* Attempt to process interrupts before really proceeding. */ - if (((long) Free) >= ((long) (Regs[REGBLOCK_MEMTOP]))) + if (((long) (ADDR_TO_SCHEME_ADDR (Free))) + >= ((long) (Regs[REGBLOCK_MEMTOP]))) { STACK_PUSH (FIXNUM_ZERO + REFLECT_CODE_CC_BKPT); STACK_PUSH (reflect_to_interface); return (compiler_interrupt_common (0, SHARP_F)); -- 2.25.1