From 4dc385840aefd7140947c93f08f7a0d0c9b51a42 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 19 Feb 1993 17:49:44 +0000 Subject: [PATCH] Implement SET-INTERRUPT-ENABLES! hook. --- v7/src/microcode/cmpauxmd/mc68k.m4 | 42 ++++++++++++++++++++++++++++-- v7/src/microcode/cmpintmd/mc68k.h | 5 ++-- v7/src/microcode/version.h | 4 +-- v8/src/microcode/version.h | 4 +-- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/v7/src/microcode/cmpauxmd/mc68k.m4 b/v7/src/microcode/cmpauxmd/mc68k.m4 index 001b164be..4b6ff8afe 100644 --- a/v7/src/microcode/cmpauxmd/mc68k.m4 +++ b/v7/src/microcode/cmpauxmd/mc68k.m4 @@ -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 + +### 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) diff --git a/v7/src/microcode/cmpintmd/mc68k.h b/v7/src/microcode/cmpintmd/mc68k.h index 65d147b63..87823678e 100644 --- a/v7/src/microcode/cmpintmd/mc68k.h +++ b/v7/src/microcode/cmpintmd/mc68k.h @@ -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], diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index ee6b9cd5a..073ff34ac 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -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 diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index ee6b9cd5a..073ff34ac 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -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 -- 2.25.1