The Free register can't be compared to the value in REGBLOCK_MEMTOP
authorChris Hanson <org/chris-hanson/cph>
Thu, 5 Oct 1995 03:27:42 +0000 (03:27 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 5 Oct 1995 03:27:42 +0000 (03:27 +0000)
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
v8/src/microcode/cmpint.c

index 080fc87612f62b40e6abf03f0e58ef66ae32e564..894563ea7560fe49a2dd51a0d662c8c71b790a6a 100644 (file)
@@ -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);
index 0be347e8d685218d26b5e81eac44c59e69e8201e..1df64fa8eea8c9522f91e2446ec0ca34902c8054 100644 (file)
@@ -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));