From: Chris Hanson Date: Thu, 11 Jul 1991 03:59:15 +0000 (+0000) Subject: Add initialization code that enables most of the IEEE floating-point X-Git-Tag: 20090517-FFI~10466 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f16a68056a52e3c448c1791a96143d59389724b8;p=mit-scheme.git Add initialization code that enables most of the IEEE floating-point exceptions. --- diff --git a/v7/src/microcode/cmpauxmd/hppa.m4 b/v7/src/microcode/cmpauxmd/hppa.m4 index 6fc0d5740..51f8ad794 100644 --- a/v7/src/microcode/cmpauxmd/hppa.m4 +++ b/v7/src/microcode/cmpauxmd/hppa.m4 @@ -1,8 +1,8 @@ changecom(`;');;; -*-Midas-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpauxmd/hppa.m4,v 1.15 1991/05/15 16:21:50 jinx Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpauxmd/hppa.m4,v 1.16 1991/07/11 03:58:59 cph Exp $ ;;; -;;; Copyright (c) 1989, 1990 Massachusetts Institute of Technology +;;; Copyright (c) 1989-91 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -727,6 +727,28 @@ interface_to_C LDWM -112(0,30),3 ; Restore last reg, pop frame .PROCEND ;in=26;out=28; +;;;; Procedure to initialize this interface. +;;; +;;; C signature: +;;; +;;; void initialize_interface (void); + +interface_initialize + .PROC + .CALLINFO CALLER,FRAME=0 + .ENTRY + LDO 4(30),30 + FSTWS 0,0(30) + LDW 0(30),22 + LDI 30,21 ; enable V, Z, O, U traps + OR 21,22,22 + STW 22,0(30) + FLDWS 0(30),0 + BV 0(2) + .EXIT + LDO -4(30),30 + .PROCEND + ;;;; Routine to flush some locations from the processor cache. ;;; ;;; Its C signature is @@ -951,6 +973,7 @@ interface_limit .SPACE $TEXT$ .SUBSPA $CODE$ .EXPORT C_to_interface,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR + .EXPORT interface_initialize,PRIV_LEV=3 .EXPORT interface_to_scheme,PRIV_LEV=3 .EXPORT interface_to_C,PRIV_LEV=3 .EXPORT scheme_to_interface_ble,PRIV_LEV=3 diff --git a/v7/src/microcode/cmpintmd/hppa.h b/v7/src/microcode/cmpintmd/hppa.h index 44900e956..99011d264 100644 --- a/v7/src/microcode/cmpintmd/hppa.h +++ b/v7/src/microcode/cmpintmd/hppa.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.21 1991/05/07 17:31:53 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpintmd/hppa.h,v 1.22 1991/07/11 03:59:15 cph Exp $ Copyright (c) 1989-1991 Massachusetts Institute of Technology @@ -676,10 +676,22 @@ do { \ #define SPLIT_CACHES +#ifdef IN_CMPINT_C + /* This loads the cache information structure for use by flush_i_cache. */ -#define ASM_RESET_HOOK() flush_i_cache_initialize () +#define ASM_RESET_HOOK hppa_reset_hook + +void +DEFUN_VOID (hppa_reset_hook) +{ + extern void interface_initialize (); + flush_i_cache_initialize (); + interface_initialize (); +} + +#endif /* IN_CMPINT_C */ /* Derived parameters and macros. diff --git a/v8/src/microcode/cmpauxmd/hppa.m4 b/v8/src/microcode/cmpauxmd/hppa.m4 index 1e40e269f..933191fa8 100644 --- a/v8/src/microcode/cmpauxmd/hppa.m4 +++ b/v8/src/microcode/cmpauxmd/hppa.m4 @@ -1,8 +1,8 @@ changecom(`;');;; -*-Midas-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpauxmd/hppa.m4,v 1.15 1991/05/15 16:21:50 jinx Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpauxmd/hppa.m4,v 1.16 1991/07/11 03:58:59 cph Exp $ ;;; -;;; Copyright (c) 1989, 1990 Massachusetts Institute of Technology +;;; Copyright (c) 1989-91 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -727,6 +727,28 @@ interface_to_C LDWM -112(0,30),3 ; Restore last reg, pop frame .PROCEND ;in=26;out=28; +;;;; Procedure to initialize this interface. +;;; +;;; C signature: +;;; +;;; void initialize_interface (void); + +interface_initialize + .PROC + .CALLINFO CALLER,FRAME=0 + .ENTRY + LDO 4(30),30 + FSTWS 0,0(30) + LDW 0(30),22 + LDI 30,21 ; enable V, Z, O, U traps + OR 21,22,22 + STW 22,0(30) + FLDWS 0(30),0 + BV 0(2) + .EXIT + LDO -4(30),30 + .PROCEND + ;;;; Routine to flush some locations from the processor cache. ;;; ;;; Its C signature is @@ -951,6 +973,7 @@ interface_limit .SPACE $TEXT$ .SUBSPA $CODE$ .EXPORT C_to_interface,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR + .EXPORT interface_initialize,PRIV_LEV=3 .EXPORT interface_to_scheme,PRIV_LEV=3 .EXPORT interface_to_C,PRIV_LEV=3 .EXPORT scheme_to_interface_ble,PRIV_LEV=3 diff --git a/v8/src/microcode/cmpintmd/hppa.h b/v8/src/microcode/cmpintmd/hppa.h index 03379d500..f58ae5dad 100644 --- a/v8/src/microcode/cmpintmd/hppa.h +++ b/v8/src/microcode/cmpintmd/hppa.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.21 1991/05/07 17:31:53 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpintmd/hppa.h,v 1.22 1991/07/11 03:59:15 cph Exp $ Copyright (c) 1989-1991 Massachusetts Institute of Technology @@ -676,10 +676,22 @@ do { \ #define SPLIT_CACHES +#ifdef IN_CMPINT_C + /* This loads the cache information structure for use by flush_i_cache. */ -#define ASM_RESET_HOOK() flush_i_cache_initialize () +#define ASM_RESET_HOOK hppa_reset_hook + +void +DEFUN_VOID (hppa_reset_hook) +{ + extern void interface_initialize (); + flush_i_cache_initialize (); + interface_initialize (); +} + +#endif /* IN_CMPINT_C */ /* Derived parameters and macros.