Implement SET-INTERRUPT-ENABLES! hook.
authorChris Hanson <org/chris-hanson/cph>
Fri, 19 Feb 1993 17:49:44 +0000 (17:49 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 19 Feb 1993 17:49:44 +0000 (17:49 +0000)
v7/src/microcode/cmpauxmd/mc68k.m4
v7/src/microcode/cmpintmd/mc68k.h
v7/src/microcode/version.h
v8/src/microcode/version.h

index 001b164be20c75053cf4f0a657a306313846eda0..4b6ff8afe5ddddeb61808842cb5e29a4958f36dc 100644 (file)
@@ -1,8 +1,8 @@
 ### -*-Midas-*-
 ###
-###    $Id: mc68k.m4,v 1.23 1992/09/25 01:19:13 cph Exp $
+###    $Id: mc68k.m4,v 1.24 1993/02/19 17:47:46 cph Exp $
 ###
-###    Copyright (c) 1989-92 Massachusetts Institute of Technology
+###    Copyright (c) 1989-93 Massachusetts Institute of Technology
 ###
 ###    This material was developed by the Scheme project at the
 ###    Massachusetts Institute of Technology, Department of
@@ -697,3 +697,41 @@ stack_and_interrupt_check_2:
        mov.l   (%sp),%d0
        addq.l  &8,%sp
        rts
+\f
+### Assembly-language implementation of SET-INTERRUPT-ENABLES!
+### primitive.  Argument appears at top of stack, return address below
+### that.
+
+define_c_label(asm_set_interrupt_enables)
+define_debugging_label(set_interrupt_enables)
+       # Return value is previous contents of mask register.
+       mov.l   regblock_int_mask(regs),rval
+       or.l    &TYPE_CODE_TO_OBJECT(tc_fixnum),rval
+       mov.l   (%sp)+,%d0              # get new interrupt mask
+       and.l   rmask,%d0               # strip fixnum type
+       mov.l   %d0,regblock_int_mask(regs) # store it in mask register
+       # Setup compiled memtop register: -1 if pending interrupt,
+       # Memtop if GC enabled, else Heap_Top.
+       movq    &-1,%d1
+       mov.l   regblock_int_code(regs),%d2
+       and.l   %d0,%d2
+       bne.b   set_interrupt_enables_1
+       mov.l   extern_c_label(MemTop),%d1
+       btst    &2,%d0
+       bne.b   set_interrupt_enables_1
+       mov.l   extern_c_label(Heap_Top),%d1
+set_interrupt_enables_1:
+       mov.l   %d1,regblock_memtop(regs)
+       # Setup compiled stack_guard register: Stack_Guard if
+       # stack-overflow enabled, else Absolute_Stack_Base (alias for
+       # Constant_Top).
+       mov.l   extern_c_label(Stack_Guard),%d1
+       btst    &0,%d0
+       bne.b   set_interrupt_enables_2
+       mov.l   extern_c_label(Constant_Top),%d1
+set_interrupt_enables_2:
+       mov.l   %d1,regblock_stack_guard(regs)
+       mov.l   (%sp)+,%d0
+       and.l   rmask,%d0
+       mov.l   %d0,%a0
+       jmp     (%a0)
index 65d147b636a196fc0f101befa7b4aef4c4c1b9b2..87823678eabec30a5ef8b097eeb73e240032440a 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Id: mc68k.h,v 1.33 1992/11/18 05:00:41 gjr Exp $
+$Id: mc68k.h,v 1.34 1993/02/19 17:47:36 cph Exp $
 
-Copyright (c) 1989-1992 Massachusetts Institute of Technology
+Copyright (c) 1989-1993 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -602,6 +602,7 @@ DEFUN_VOID (mc68k_reset_hook)
   SETUP_REGISTER (asm_stack_and_interrupt_check_18);   /* 43 */
   SETUP_REGISTER (asm_stack_and_interrupt_check_22);   /* 44 */
   SETUP_REGISTER (asm_stack_and_interrupt_check_24);   /* 45 */
+  SETUP_REGISTER (asm_set_interrupt_enables);          /* 46 */
 
   FLUSH_CACHE_INITIALIZE ();
   FLUSH_I_CACHE_REGION (&Registers[COMPILER_REGBLOCK_START_HOOKS],
index ee6b9cd5a7ef97cde8a253e369b02abe0e5d36d1..073ff34ac0796353fb07724eb7746e20ef60b40c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.127 1993/01/12 19:49:50 gjr Exp $
+$Id: version.h,v 11.128 1993/02/19 17:49:44 cph Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     127
+#define SUBVERSION     128
 #endif
index ee6b9cd5a7ef97cde8a253e369b02abe0e5d36d1..073ff34ac0796353fb07724eb7746e20ef60b40c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.127 1993/01/12 19:49:50 gjr Exp $
+$Id: version.h,v 11.128 1993/02/19 17:49:44 cph Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     127
+#define SUBVERSION     128
 #endif