Add optional stack-overflow checks. By default this is disabled.
authorChris Hanson <org/chris-hanson/cph>
Wed, 29 Jul 1992 19:56:52 +0000 (19:56 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 29 Jul 1992 19:56:52 +0000 (19:56 +0000)
v7/src/compiler/base/make.scm
v7/src/compiler/base/switch.scm
v7/src/compiler/machines/spectrum/compiler.pkg
v7/src/compiler/machines/spectrum/lapgen.scm
v7/src/compiler/machines/spectrum/rules3.scm

index 944c3ec176cb9bc5e486dba09fc75a9321f9663d..1becebd77c1f9fbef06d0eb1f15e411ffacd57ed 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/make.scm,v 4.91 1992/06/12 01:43:36 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/make.scm,v 4.92 1992/07/29 19:56:21 cph Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -46,5 +46,5 @@ MIT in each case. |#
     (initialize-package! '(COMPILER DECLARATIONS)))
   (add-system!
    (make-system (string-append "Liar (" architecture-name ")")
-               4 91
+               4 92
                '())))
\ No newline at end of file
index 31ad280d4503e9aa4826e853de27adb66a86cf8a..8bffdfa6cd383c84863e8dab8c2427971a34493d 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/switch.scm,v 4.18 1992/06/12 01:43:29 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/switch.scm,v 4.19 1992/07/29 19:56:52 cph Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -60,6 +60,7 @@ MIT in each case. |#
 (define compiler:intersperse-rtl-in-lap? true)
 (define compiler:generate-range-checks? false)
 (define compiler:generate-type-checks? false)
+(define compiler:generate-stack-checks? false)
 (define compiler:open-code-flonum-checks? false)
 (define compiler:use-multiclosures? true)
 (define compiler:coalescing-constant-warnings? true)
index 530db5de9ff1a867a2a4ff7c6ea45f53fe2ff132..28af0bdfb9c8979b95b1d90ec55e82844a7981f7 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/compiler.pkg,v 1.36 1992/07/20 22:11:58 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/compiler.pkg,v 1.37 1992/07/29 19:56:08 cph Exp $
 $MC68020-Header: /scheme/compiler/bobcat/RCS/comp.pkg,v 1.32 1991/05/06 23:09:24 jinx Exp $
 
 Copyright (c) 1988-92 Massachusetts Institute of Technology
@@ -88,6 +88,7 @@ MIT in each case. |#
          compiler:generate-lap-files?
          compiler:generate-range-checks?
          compiler:generate-rtl-files?
+         compiler:generate-stack-checks?
          compiler:generate-type-checks?
          compiler:implicit-self-static?
          compiler:intersperse-rtl-in-lap?
index 6627d216d0f653fa1751314b846d3d727cca8df0..31a7160e004cd722a052d46c634040e6e9ecc730 100644 (file)
@@ -1,9 +1,9 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/lapgen.scm,v 4.38 1992/05/14 03:02:44 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/lapgen.scm,v 4.39 1992/07/29 19:56:09 cph Exp $
 $MC68020-Header: /scheme/compiler/bobcat/RCS/lapgen.scm,v 4.41 1991/05/06 23:05:51 jinx Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -499,6 +499,9 @@ MIT in each case. |#
 (define-integrable reg:lexpr-primitive-arity
   (INST-EA (OFFSET #x001C 0 ,regnum:regs-pointer)))
 
+(define-integrable reg:stack-guard
+  (INST-EA (OFFSET #x002C 0 ,regnum:regs-pointer)))
+
 (define (lap:make-label-statement label)
   (LAP (LABEL ,label)))
 
index 568a6714fbd191292f1232a829995e85e7b13844..38355c0f7adb24b1527e7e082f922dc539ea19a3 100644 (file)
@@ -1,9 +1,9 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/rules3.scm,v 4.31 1992/02/07 05:58:22 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/rules3.scm,v 4.32 1992/07/29 19:56:10 cph Exp $
 $MC68020-Header: /scheme/compiler/bobcat/RCS/rules3.scm,v 4.30 1991/05/07 13:45:31 jinx Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -431,7 +431,13 @@ MIT in each case. |#
 
 (define (interrupt-check gc-label)
   (LAP (COMB (>=) ,regnum:free-pointer ,regnum:memtop-pointer (@PCR ,gc-label))
-       (LDW () ,reg:memtop ,regnum:memtop-pointer)))
+       (LDW () ,reg:memtop ,regnum:memtop-pointer)
+       ,@(if compiler:generate-stack-checks?
+            (LAP (LDW () ,reg:stack-guard ,regnum:addil-result)
+                 (COMB (<=) ,regnum:stack-pointer ,regnum:addil-result
+                       (@PCR ,gc-label))
+                 (NOP ()))
+            (LAP))))
 
 (define-rule statement
   (CONTINUATION-ENTRY (? internal-label))