Update from jmiller.
authorChris Hanson <org/chris-hanson/cph>
Tue, 14 Aug 1990 18:22:54 +0000 (18:22 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 14 Aug 1990 18:22:54 +0000 (18:22 +0000)
v7/src/microcode/cmpauxmd/mips.m4
v7/src/microcode/s/ultrix.m4
v7/src/microcode/uxtrap.h

index c433f2f8578a99ebae2d20a0cc7a5436a460ab12..a45546423ca777abe5ea8c8242706e638ce310de 100644 (file)
@@ -1,6 +1,7 @@
+/* #define DEBUG_INTERFACE */
  ### -*-Midas-*-
  ###
- ###   $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpauxmd/mips.m4,v 1.2 1990/07/30 16:21:14 jinx Exp $
+ ###   $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpauxmd/mips.m4,v 1.3 1990/08/14 18:22:54 cph Rel $
  ###
  ###   Copyright (c) 1989, 1990 Massachusetts Institute of Technology
  ###
@@ -277,6 +278,11 @@ scheme_to_interface:
 Store_Pointer_Back:
        .set    at
        sw      $value,Debug_Buffer_Pointer
+       lw      $value,Debug_Call_Count
+       lw      $12,Debug_Call_Max
+       addi    $value,$value,1
+       sw      $value,Debug_Call_Count
+       beq     $value,$12,Debug_Tight_Loop
        .set    noat
 #endif
 after_overflow:
@@ -385,6 +391,14 @@ push_closure_entry:
 
        .end    push_closure_entry
 
+       .globl  Debug_Tight_Loop
+       .ent    Debug_Tight_Loop
+Debug_Tight_Loop:
+       beq     $12,$value,Debug_Tight_Loop
+       nop
+       j       after_overflow
+       .end    Debug_Tight_Loop
+
 #ifdef DEBUG_INTERFACE
        .data
        .globl  Debug_Buffer_Pointer
@@ -395,4 +409,10 @@ Debug_Buffer:
        .word   0:30
 Debug_Buffer_End:
        .word   0
+       .globl  Debug_Call_Count
+Debug_Call_Count:
+       .word   0
+       .globl  Debug_Call_Max
+Debug_Call_Max:
+       .word   0
 #endif
index 82600ddd6613cda04c92d493b0e6167244aca5c8..7e926e3b04d1c3e187ac9e5d99c157e18d7cf2ce 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/csh -f
-# $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/s/Attic/ultrix.m4,v 1.2 1989/08/02 00:53:42 cph Exp $
+# $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/s/Attic/ultrix.m4,v 1.3 1990/08/14 18:20:07 cph Rel $
 # Postprocessing to make m4 work correctly under Ultrix.
-m4 $* | sed -e 's/@/$/g' -e 's/^\f$//'
+cc -E $* | sed -e '/^#/D' | m4 | sed -e 's/@/$/g' -e 's/^\f$//'
index b5862da93db88cde33285b9bdbfb27f21bde45f5..546b3136c92cfe5def7f142fe574be633c3527f2 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxtrap.h,v 1.4 1990/08/09 19:39:26 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxtrap.h,v 1.5 1990/08/14 18:22:39 cph Exp $
 
 Copyright (c) 1990 Massachusetts Institute of Technology
 
@@ -200,11 +200,40 @@ struct full_sigcontext
 
 #ifdef mips
 
-/* For now, no trap handling support in compiled code.
-   This should be fixed.
- */
+/* Information on sigcontext structure in signal.h */
+
+#ifndef sc_sp
+#define sc_sp                          sc_regs[29]
+#endif
+
+#define sc_rfree                       sc_regs[9]
+#define sc_schsp                       sc_regs[3]
+
+#define HAVE_FULL_SIGCONTEXT
+#define FULL_SIGCONTEXT_RFREE(scp)     ((scp)->sc_rfree)
+#define FULL_SIGCONTEXT_SCHSP(scp)     ((scp)->sc_schsp)
+#define FULL_SIGCONTEXT_FIRST_REG(scp) (&((scp)->sc_regs[0]))
+#define FULL_SIGCONTEXT_NREGS          32
+#define PROCESSOR_NREGS                        32
 
-#define sc_sp sc_regs[29]
+#define DECLARE_UX_SIGNAL_CODES
+static struct ux_sig_code_desc ux_signal_codes[14] =
+{
+  { SIGFPE, (~ 0L), FPE_INTOVF_TRAP, "integer overflow trap" },
+  { SIGFPE, (~ 0L), FPE_INTDIV_TRAP, "integer divide by 0 trap" },
+  { SIGFPE, (~ 0L), FPE_FLTOVF_TRAP, "floating-point overflow trap"},
+  { SIGFPE, (~ 0L), FPE_FLTDIV_TRAP, "floating-point divide by 0 trap"},
+  { SIGFPE, (~ 0L), FPE_FLTUND_TRAP, "floating-point underflow trap"},
+  { SIGFPE, (~ 0L), FPE_DECOVF_TRAP, "decimal overflow trap"},
+  { SIGFPE, (~ 0L), FPE_SUBRNG_TRAP, "subscript-range trap"},
+  { SIGFPE, (~ 0L), FPE_FLTOVF_FAULT, "floating-point overflow fault"},
+  { SIGFPE, (~ 0L), FPE_FLTDIV_FAULT, "floating-point divide by 0 fault"},
+  { SIGFPE, (~ 0L), FPE_FLTUND_FAULT, "floating-point underflow fault"},
+  { SIGILL, (~ 0L), ILL_PRIVIN_FAULT, "reserved instruction trap" },
+  { SIGILL, (~ 0L), ILL_RESOP_FAULT, "reserved operand trap" },
+  { SIGILL, (~ 0L), ILL_RESAD_FAULT, "reserved addressing trap" },
+  { 0, 0, 0, ((char *) NULL) }
+}
 
 #endif /* mips */