From: Chris Hanson Date: Thu, 19 Mar 1987 00:56:02 +0000 (+0000) Subject: Reorganize code for new directory structure. Break some large useful X-Git-Tag: 20090517-FFI~13666 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=334f384441a4ffe8da2de6096a020c1c14174455;p=mit-scheme.git Reorganize code for new directory structure. Break some large useful files into smaller ones that can be compiled. Delete all `using-syntax' occurrences and `Edwin Variables'. --- diff --git a/v7/src/compiler/back/asmmac.scm b/v7/src/compiler/back/asmmac.scm index 779ebb53c..ef75dd962 100644 --- a/v7/src/compiler/back/asmmac.scm +++ b/v7/src/compiler/back/asmmac.scm @@ -1,44 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/asmmac.scm,v 1.2 1987/03/19 00:49:46 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; Assembler Syntax Macros (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (syntax-table-define assembler-syntax-table 'DEFINE-INSTRUCTION (macro (keyword . rules) @@ -106,13 +102,4 @@ ((null? (cdr components)) (car components)) (else - `(OPTIMIZE-GROUP ,@components))))))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; End: `(OPTIMIZE-GROUP ,@components))))))) \ No newline at end of file diff --git a/v7/src/compiler/back/lapgn1.scm b/v7/src/compiler/back/lapgn1.scm index e82d98bef..82c6691c6 100644 --- a/v7/src/compiler/back/lapgn1.scm +++ b/v7/src/compiler/back/lapgn1.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1987 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; LAP Code Generation +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/lapgn1.scm,v 1.26 1987/03/19 00:50:04 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/lapgn1.scm,v 1.25 1987/02/05 21:49:47 cph Exp $ +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; LAP Code Generation (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define *block-start-label*) (define *code-object-label*) @@ -304,14 +298,4 @@ (define-integrable (set-current-branches! consequent alternative) (set-rtl-pnode-consequent-lap-generator! *current-rnode* consequent) - (set-rtl-pnode-alternative-lap-generator! *current-rnode* alternative)) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-generator-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: pattern) \ No newline at end of file diff --git a/v7/src/compiler/back/regmap.scm b/v7/src/compiler/back/regmap.scm index 9e5583bf7..e413bde2c 100644 --- a/v7/src/compiler/back/regmap.scm +++ b/v7/src/compiler/back/regmap.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; Register Allocator +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/regmap.scm,v 1.87 1987/03/19 00:50:25 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/regmap.scm,v 1.86 1986/12/18 06:10:51 cph Exp $ +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; Register Allocator (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) #| @@ -537,14 +531,4 @@ REGISTER-RENUMBERs are equal. ) ;;; end REGISTER-ALLOCATOR-PACKAGE -)) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access register-allocator-package lap-generator-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: ) \ No newline at end of file diff --git a/v7/src/compiler/back/symtab.scm b/v7/src/compiler/back/symtab.scm index d72da3d85..d33c6277b 100644 --- a/v7/src/compiler/back/symtab.scm +++ b/v7/src/compiler/back/symtab.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; Symbol Tables +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/symtab.scm,v 1.39 1987/03/19 00:50:36 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/symtab.scm,v 1.38 1986/12/16 18:20:24 cph Exp $ +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; Symbol Tables (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define (make-symbol-table) (cons "Symbol Table" '())) @@ -84,13 +78,4 @@ (vector-set! binding 1 (cons daemon (vector-ref binding 1)))) (define (remove-binding-daemon! binding daemon) - (vector-set! binding 1 (delq! daemon (vector-ref binding 1)))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; End: (vector-set! binding 1 (delq! daemon (vector-ref binding 1)))) \ No newline at end of file diff --git a/v7/src/compiler/back/syntax.scm b/v7/src/compiler/back/syntax.scm index 3e5f68176..b848e7cc0 100644 --- a/v7/src/compiler/back/syntax.scm +++ b/v7/src/compiler/back/syntax.scm @@ -1,39 +1,36 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/syntax.scm,v 1.13 1987/03/19 00:50:43 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; LAP Syntaxer @@ -199,9 +196,4 @@ (define (standard-coercion kernel) (lambda (nbits) (lambda (n) - (unsigned-integer->bit-string nbits (kernel n))))) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; End: (unsigned-integer->bit-string nbits (kernel n))))) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/assmd.scm b/v7/src/compiler/machines/bobcat/assmd.scm index 4f70eb3b2..e0b253b05 100644 --- a/v7/src/compiler/machines/bobcat/assmd.scm +++ b/v7/src/compiler/machines/bobcat/assmd.scm @@ -1,39 +1,36 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/assmd.scm,v 1.29 1987/03/19 00:52:27 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; Assembler Machine Dependencies @@ -58,9 +55,4 @@ (define (object->bit-string object) (bit-string-append (unsigned-integer->bit-string 24 (primitive-datum object)) - (unsigned-integer->bit-string 8 (primitive-type object)))) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-package compiler-package) -;;; End: (unsigned-integer->bit-string 8 (primitive-type object)))) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/coerce.scm b/v7/src/compiler/machines/bobcat/coerce.scm index 32023278f..9508b2a36 100644 --- a/v7/src/compiler/machines/bobcat/coerce.scm +++ b/v7/src/compiler/machines/bobcat/coerce.scm @@ -1,39 +1,36 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/coerce.scm,v 1.7 1987/03/19 00:52:34 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; 68000 Specific Coercions @@ -82,9 +79,4 @@ (define-coercion 'QUICK 3) (define-coercion 'SHIFT-NUMBER 3) -(define-coercion 'SHORT-LABEL 8) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; End: (define-coercion 'SHORT-LABEL 8) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/insmac.scm b/v7/src/compiler/machines/bobcat/insmac.scm index 2e43f4ec4..70bd10805 100644 --- a/v7/src/compiler/machines/bobcat/insmac.scm +++ b/v7/src/compiler/machines/bobcat/insmac.scm @@ -1,44 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/insmac.scm,v 1.118 1987/03/19 00:52:58 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; 68000 Instruction Set Macros (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) ;;;; Instruction Definitions @@ -149,13 +145,4 @@ false `((EA-EXTENSION ,expression) '()))) (else - (error "EXPAND-DESCRIPTOR: Badly-formed descriptor" descriptor))))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; End: (error "EXPAND-DESCRIPTOR: Badly-formed descriptor" descriptor))))) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/instr1.scm b/v7/src/compiler/machines/bobcat/instr1.scm index 170034c77..0c741711a 100644 --- a/v7/src/compiler/machines/bobcat/instr1.scm +++ b/v7/src/compiler/machines/bobcat/instr1.scm @@ -1,47 +1,41 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/instr1.scm,v 1.60 1987/03/19 00:53:05 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; 68000 Instruction Set Description ;;; Originally from GJS (who did the hard part). -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/instr1.scm,v 1.59 1986/12/20 22:59:09 cph Exp $ - (declare (usual-integrations)) -(using-syntax (access assembler-syntax-table compiler-package) ;;;; Effective Addressing @@ -397,13 +391,4 @@ (define-instruction DC ((W (? expression)) - (WORD (16 expression SIGNED)))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; Scheme Syntax Table: (access assembler-syntax-table compiler-package) -;;; End: (WORD (16 expression SIGNED)))) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/instr2.scm b/v7/src/compiler/machines/bobcat/instr2.scm index 3038f8db2..b2f9ef748 100644 --- a/v7/src/compiler/machines/bobcat/instr2.scm +++ b/v7/src/compiler/machines/bobcat/instr2.scm @@ -1,45 +1,41 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of -;;; this software shall duly acknowledge such use, in accordance -;;; with the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/instr2.scm,v 1.9 1987/03/19 00:53:15 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; 68000 Instruction Set Description ;;; Originally from GJS (who did the hard part). (declare (usual-integrations)) -(using-syntax (access assembler-syntax-table compiler-package) ;;;; BCD Arithmetic @@ -341,13 +337,4 @@ (define-bit-manipulation BTST #b00 ea-d ea-d&-&) (define-bit-manipulation BCHG #b01 ea-d&a ea-d&a) (define-bit-manipulation BCLR #b10 ea-d&a ea-d&a) - (define-bit-manipulation BSET #b11 ea-d&a ea-d&a)) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; Scheme Syntax Table: (access assembler-syntax-table compiler-package) -;;; End: (define-bit-manipulation BSET #b11 ea-d&a ea-d&a)) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/instr3.scm b/v7/src/compiler/machines/bobcat/instr3.scm index 660662723..045d6090d 100644 --- a/v7/src/compiler/machines/bobcat/instr3.scm +++ b/v7/src/compiler/machines/bobcat/instr3.scm @@ -1,45 +1,41 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/instr3.scm,v 1.9 1987/03/19 00:53:25 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; 68000 Instruction Set Description ;;; Originally from GJS (who did the hard part). (declare (usual-integrations)) -(using-syntax (access assembler-syntax-table compiler-package) ;;;; Control Transfer @@ -362,13 +358,4 @@ (1 (encode-wl s)) (3 #b001) (3 ry)) - (relative-word l))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; Scheme Syntax Table: (access assembler-syntax-table compiler-package) -;;; End: (relative-word l))) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/lapgen.scm b/v7/src/compiler/machines/bobcat/lapgen.scm index c05d5b8d7..8597a5401 100644 --- a/v7/src/compiler/machines/bobcat/lapgen.scm +++ b/v7/src/compiler/machines/bobcat/lapgen.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1987 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; RTL Rules for 68020 +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 1.154 1987/03/19 00:53:33 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 1.153 1987/01/10 04:32:35 cph Exp $ +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; RTL Rules for 68020 (declare (usual-integrations)) -(using-syntax (access lap-generator-syntax-table compiler-package) ;;;; Basic machine instructions @@ -756,14 +750,4 @@ (MESSAGE-SENDER:VALUE (? receiver-offset)) `(,@(clear-map!) ,@(increment-anl 7 receiver-offset) - (JMP ,popper:value))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-generator-package compiler-package) -;;; Scheme Syntax Table: (access lap-generator-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: (define popper:value '(@AO 6 #x01E8)) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/machin.scm b/v7/src/compiler/machines/bobcat/machin.scm index 35105a812..83eb26809 100644 --- a/v7/src/compiler/machines/bobcat/machin.scm +++ b/v7/src/compiler/machines/bobcat/machin.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; Machine Model for 68020 +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/machin.scm,v 1.44 1987/03/19 00:53:49 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/machin.scm,v 1.43 1987/02/10 22:14:37 cph Exp $ +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; Machine Model for 68020 (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define (rtl:message-receiver-size:closure) 1) (define (rtl:message-receiver-size:stack) 1) (define (rtl:message-receiver-size:subproblem) 2) @@ -172,7 +166,7 @@ (rtl:make-machine-register d0)) (define-integrable (interpreter-register:enclose) - (rtl:make-machine-register a0)) + (rtl:make-offset (interpreter-regs-pointer) 5)) (define-integrable (interpreter-register:lookup) (rtl:make-machine-register d0)) @@ -210,14 +204,4 @@ (define (lap:make-entry-point label block-start-label) `((ENTRY-POINT ,label) (DC W (- ,label ,block-start-label)) - (LABEL ,label))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: compiler-package -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: (LABEL ,label))) \ No newline at end of file diff --git a/v7/src/compiler/machines/bobcat/make.scm-68040 b/v7/src/compiler/machines/bobcat/make.scm-68040 index e4668e2e0..b5838d312 100644 --- a/v7/src/compiler/machines/bobcat/make.scm-68040 +++ b/v7/src/compiler/machines/bobcat/make.scm-68040 @@ -1,116 +1,129 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 1.11 1987/03/19 00:53:59 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; Compiler Make File for MC68020 (declare (usual-integrations)) (set-working-directory-pathname! "$zcomp") -(load "rcs" system-global-environment) -(load "load" system-global-environment) +(load "base/rcs" system-global-environment) +(load "base/load" system-global-environment) (load-system system-global-environment 'COMPILER-PACKAGE '(SYSTEM-GLOBAL-ENVIRONMENT) '( (SYSTEM-GLOBAL-ENVIRONMENT - "macros.bin" ;compiler syntax - "pbs.bin" ;bit-string read/write syntax + "base/macros" ;compiler syntax + "base/pbs" ;bit-string read/write syntax ) (COMPILER-PACKAGE - "mc68020/machin.bin" ;machine dependent stuff - "toplev.bin" ;top level - "utils.bin" ;odds and ends - "cfg.bin" ;control flow graph - "ctypes.bin" ;CFG datatypes - "dtypes.bin" ;DFG datatypes - "bblock.bin" ;Basic block datatype - "dfg.bin" ;data flow graph - "rtl.bin" ;register transfer language - "emodel.bin" ;environment model - "rtypes.bin" ;RTL analyzer datatypes - "nmatch.bin" ;simple pattern matcher + "base/decls" ;declarations +; "machines/bobcat/decls" ;more declarations + + "base/object" ;tagged object support + "base/queue" ;queue abstraction + "base/sets" ;set abstraction + "source/mvalue" ;multiple-value support + + "machines/bobcat/machin" ;machine dependent stuff + "base/toplev" ;top level + "base/utils" ;odds and ends + "base/cfg" ;control flow graph + "base/ctypes" ;CFG datatypes + "base/dtypes" ;DFG datatypes + "base/bblock" ;Basic block datatype + "base/dfg" ;data flow graph + "base/rtltyp" ;RTL: type definitions + "base/rtl" ;RTL: expression operations + "base/rtlreg" ;RTL: registers + "base/rtlcfg" ;RTL: CFG types + "base/emodel" ;environment model + "base/rtypes" ;RTL analyzer datatypes + "base/nmatch" ;simple pattern matcher ) (CONVERTER-PACKAGE - "graphc.bin" ;SCode->flow-graph converter + "alpha/graphc" ;SCode->flow-graph converter ) (DATAFLOW-PACKAGE - "dflow.bin" ;Dataflow analyzer + "alpha/dflow" ;Dataflow analyzer ) (RTL-GENERATOR-PACKAGE - "rtlgen.bin" ;RTL generator - "rgcomb.bin" ;RTL generator: combinations - "linear.bin" ;linearization + "front-end/rtlgen" ;RTL generator + "front-end/rgcomb" ;RTL generator: combinations + "base/linear" ;linearization ) (RTL-CSE-PACKAGE - "rcse.bin" ;RTL common subexpression eliminator + "front-end/rcse" ;RTL common subexpression eliminator + "front-end/rcseep" ;CSE expression predicates + "front-end/rcsesr" ;CSE stack references + "front-end/rcseht" ;CSE hash table + "front-end/rcsesa" ;CSE state abstraction + "front-end/rcserq" ;CSE register/quantity abstractions ) (RTL-ANALYZER-PACKAGE - "rlife.bin" ;RTL register lifetime analyzer - "ralloc.bin" ;RTL register allocator + "front-end/rlife" ;RTL register lifetime analyzer + "front-end/ralloc" ;RTL register allocator ) (LAP-GENERATOR-PACKAGE - "lapgen.bin" ;LAP generator. - "regmap.bin" ;Hardware register allocator. - "mc68020/lapgen.bin" ;code generation rules. + "back-end/lapgen" ;LAP generator. + "back-end/regmap" ;Hardware register allocator. + "machines/bobcat/lapgen" ;code generation rules. ) (LAP-SYNTAXER-PACKAGE - "syntax.bin" ;Generic syntax phase - "mc68020/coerce.bin" ;Coercions: integer -> bit string - "asmmac.bin" ;Macros for hairy syntax - "mc68020/insmac.bin" ;Macros for hairy syntax - "mc68020/instr1.bin" ;68000 Effective addressing - "mc68020/instr2.bin" ;68000 Instructions - "mc68020/instr3.bin" ; " " + "back-end/syntax" ;Generic syntax phase + "machines/bobcat/coerce" ;Coercions: integer -> bit string + "back-end/asmmac" ;Macros for hairy syntax + "machines/bobcat/insmac" ;Macros for hairy syntax + "machines/bobcat/instr1" ;68000 Effective addressing + "machines/bobcat/instr2" ;68000 Instructions + "machines/bobcat/instr3" ; " " ) (LAP-PACKAGE - "mc68020/assmd.bin" ;Machine dependent - "symtab.bin" ;Symbol tables - "block.bin" ;Assembly blocks - "laptop.bin" ;Assembler top level + "machines/bobcat/assmd" ;Machine dependent + "back-end/symtab" ;Symbol tables + "back-end/block" ;Assembly blocks + "back-end/laptop" ;Assembler top level ) )) @@ -123,7 +136,7 @@ (define :version) (define :modification) - (parse-rcs-header "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 1.10 1986/12/20 23:49:57 cph Exp $" + (parse-rcs-header "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 1.11 1987/03/19 00:53:59 cph Exp $" (lambda (filename version date time author state) (set! :version (car version)) (set! :modification (cadr version)))))) diff --git a/v7/src/compiler/machines/spectrum/assmd.scm b/v7/src/compiler/machines/spectrum/assmd.scm index 4f70eb3b2..2f19b4964 100644 --- a/v7/src/compiler/machines/spectrum/assmd.scm +++ b/v7/src/compiler/machines/spectrum/assmd.scm @@ -1,39 +1,36 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/assmd.scm,v 1.29 1987/03/19 00:54:40 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; Assembler Machine Dependencies @@ -58,9 +55,4 @@ (define (object->bit-string object) (bit-string-append (unsigned-integer->bit-string 24 (primitive-datum object)) - (unsigned-integer->bit-string 8 (primitive-type object)))) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-package compiler-package) -;;; End: (unsigned-integer->bit-string 8 (primitive-type object)))) \ No newline at end of file diff --git a/v7/src/compiler/machines/spectrum/coerce.scm b/v7/src/compiler/machines/spectrum/coerce.scm index b8792bf57..eb8c4c818 100644 --- a/v7/src/compiler/machines/spectrum/coerce.scm +++ b/v7/src/compiler/machines/spectrum/coerce.scm @@ -1,39 +1,36 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/coerce.scm,v 1.4 1987/03/19 00:54:46 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; Spectrum Specific Coercions @@ -166,9 +163,4 @@ (define-coercion 'ASSEMBLE17:X 5) (define-coercion 'ASSEMBLE17:Y 11) (define-coercion 'ASSEMBLE17:Z 1) -(define-coercion 'ASSEMBLE21:X 21) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-syntaxer-package compiler-package) -;;; End: (define-coercion 'ASSEMBLE21:X 21) \ No newline at end of file diff --git a/v7/src/compiler/machines/spectrum/lapgen.scm b/v7/src/compiler/machines/spectrum/lapgen.scm index a9111379b..8e1f99f71 100644 --- a/v7/src/compiler/machines/spectrum/lapgen.scm +++ b/v7/src/compiler/machines/spectrum/lapgen.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1987 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; RTL Rules for Spectrum +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/lapgen.scm,v 1.136 1987/03/19 00:55:32 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/lapgen.scm,v 1.135 1987/02/15 13:06:32 cph Exp $ +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; RTL Rules for Spectrum (declare (usual-integrations)) -(using-syntax (access lap-generator-syntax-table compiler-package) ;;;; Interface to Allocator @@ -1044,14 +1038,4 @@ (MESSAGE-SENDER:VALUE (? receiver-offset)) `(,@(clear-map!) (LDO () ,(offset-reference r30 (* receiver-offset 4)) ,r30) - (BLE (N) ,popper:value))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access lap-generator-package compiler-package) -;;; Scheme Syntax Table: (access lap-generator-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: (BLE (N) ,popper:value))) \ No newline at end of file diff --git a/v7/src/compiler/machines/spectrum/machin.scm b/v7/src/compiler/machines/spectrum/machin.scm index 3952c03c2..ac31a85c6 100644 --- a/v7/src/compiler/machines/spectrum/machin.scm +++ b/v7/src/compiler/machines/spectrum/machin.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1987 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; Machine Model for Spectrum +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/machin.scm,v 1.41 1987/03/19 00:55:54 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/machin.scm,v 1.40 1987/02/13 09:41:41 cph Exp $ +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; Machine Model for Spectrum (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define (rtl:message-receiver-size:closure) 1) (define (rtl:message-receiver-size:stack) 1) @@ -186,14 +180,4 @@ (define (lap:make-entry-point label block-start-label) `((ENTRY-POINT ,label) (WORD (- ,label ,block-start-label)) - (LABEL ,label))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: compiler-package -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: (LABEL ,label))) \ No newline at end of file diff --git a/v7/src/compiler/machines/spectrum/make.scm b/v7/src/compiler/machines/spectrum/make.scm index c954fef43..2461094ee 100644 --- a/v7/src/compiler/machines/spectrum/make.scm +++ b/v7/src/compiler/machines/spectrum/make.scm @@ -1,39 +1,36 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1987 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/make.scm,v 1.3 1987/03/19 00:56:02 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; Compiler Make File for HP Precision Architecture @@ -122,7 +119,7 @@ (define :version) (define :modification) - (parse-rcs-header "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/make.scm,v 1.2 1987/02/15 13:10:52 cph Exp $" + (parse-rcs-header "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/make.scm,v 1.3 1987/03/19 00:56:02 cph Exp $" (lambda (filename version date time author state) (set! :version (car version)) (set! :modification (cadr version)))))) diff --git a/v7/src/compiler/rtlgen/rgcomb.scm b/v7/src/compiler/rtlgen/rgcomb.scm index 3846e8a47..54063382a 100644 --- a/v7/src/compiler/rtlgen/rgcomb.scm +++ b/v7/src/compiler/rtlgen/rgcomb.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1987 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; RTL Generation: Combinations +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgcomb.scm,v 1.7 1987/03/19 00:47:01 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgcomb.scm,v 1.6 1987/01/01 19:07:14 cph Exp $ +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; RTL Generation: Combinations (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define-generator combination-tag (lambda (combination offset rest-generator) @@ -55,14 +49,14 @@ (define (combination:normal combination offset rest-generator) ;; For the time being, all close-coded combinations will return ;; their values in the value register. If the value of a - ;; combination is not a temporary, it is either a value-register - ;; or a value-ignore, which is alright. + ;; combination is not a temporary, it is a value-ignore, which is + ;; alright. (let ((value (combination-value combination))) (if (temporary? value) - (let ((type* (temporary-type value))) - (if type* - (if (not (eq? 'VALUE type*)) - (error "COMBINATION:NORMAL: Bad temporary type" type*)) + (let ((type (temporary-type value))) + (if type + (if (not (eq? 'VALUE type)) + (error "COMBINATION:NORMAL: Bad temporary type" type)) (set-temporary-type! value 'VALUE))))) (if (generate:next-is-null? (snode-next combination) rest-generator) (combination:reduction combination offset) @@ -71,8 +65,7 @@ (define (combination:constant combination offset rest-generator) (let ((value (combination-value combination)) (next (snode-next combination))) - (cond ((or (value-register? value) - (value-temporary? value)) + (cond ((value-temporary? value) (generate-assignment (combination-block combination) value (combination-constant-value combination) @@ -468,9 +461,10 @@ `(APPLY-STACK ,number-pushed ,(+ number-pushed (block-frame-size block)) ,(block-ancestor-distance - block - (procedure-block - (combination-known-operator combination)))))) + block + (block-parent + (procedure-block + (combination-known-operator combination))))))) (define (invocation-prefix:stack->sibling combination number-pushed) `(MOVE-FRAME-UP ,number-pushed @@ -531,14 +525,4 @@ (define-export make-call:push-operator (make-call-maker subproblem->push 1+)) -) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access rtl-generator-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: ,(-1+ (block-frame-size (combination-block combination))))) \ No newline at end of file diff --git a/v7/src/compiler/rtlgen/rtlgen.scm b/v7/src/compiler/rtlgen/rtlgen.scm index 77e283db8..5c381d4b2 100644 --- a/v7/src/compiler/rtlgen/rtlgen.scm +++ b/v7/src/compiler/rtlgen/rtlgen.scm @@ -1,46 +1,40 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1987 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- -;;;; RTL Generation +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rtlgen.scm,v 1.6 1987/03/19 00:47:32 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rtlgen.scm,v 1.5 1987/02/11 22:55:14 cph Exp $ +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# + +;;;; RTL Generation (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define *nodes*) @@ -202,13 +196,12 @@ expression)))))) (generate:next next offset rest-generator)))) -(define (assignment:value-register block value-register rvalue next offset +(define (assignment:value-register block rvalue next offset rest-generator rvalue->sexpression) (if (not (generate:next-is-null? next rest-generator)) (error "Return node has next")) (scfg*node->node! - (scfg*scfg->scfg! (if (or (value-register? rvalue) - (value-temporary? rvalue)) + (scfg*scfg->scfg! (if (value-temporary? rvalue) (make-null-cfg) (rvalue->sexpression rvalue offset (lambda (expression) @@ -223,15 +216,6 @@ (rtl:make-return)))) (generate:next next offset rest-generator))) -(define-assignment value-register-tag - assignment:value-register) - -(define-assignment value-push-tag - (lambda (block value-push rvalue next offset rest-generator - rvalue->sexpression) - (scfg*node->node! (rvalue->sexpression rvalue offset rtl:make-push) - (generate:next next (1+ offset) rest-generator)))) - (define-assignment value-ignore-tag (lambda (block value-ignore rvalue next offset rest-generator rvalue->sexpression) @@ -252,7 +236,7 @@ (rtl:make-assignment temporary expression)))) (generate:next next offset rest-generator))) ((VALUE) - (assignment:value-register block temporary rvalue next offset + (assignment:value-register block rvalue next offset rest-generator rvalue->sexpression)) (else (error "Unknown temporary type" temporary))))) @@ -326,10 +310,6 @@ (lambda (block offset scfg-append! receiver) (receiver (rtl:make-fetch register:environment)))) -(define-rvalue->expression value-register-tag - (lambda (value-register offset scfg-append! receiver) - (receiver (rtl:make-fetch register:value)))) - (define-rvalue->expression reference-tag (lambda (reference offset scfg-append! receiver) (reference->expression (reference-block reference) @@ -386,7 +366,7 @@ ;; IC procedures have their entry points linked into their headers ;; at load time by the linker. (let ((header - (scode:make-lambda (variable-name (procedure-name procedure)) + (scode/make-lambda (variable-name (procedure-name procedure)) (map variable-name (procedure-required procedure)) (map variable-name (procedure-optional procedure)) (let ((rest (procedure-rest procedure))) @@ -398,22 +378,38 @@ (cons (cons procedure header) *ic-procedure-headers*)) (receiver (rtl:make-typed-cons:pair - (rtl:make-constant (scode:procedure-type-code header)) + (rtl:make-constant (scode/procedure-type-code header)) (rtl:make-constant header) (rtl:make-fetch register:environment))))) (define (rvalue->expression:closure-procedure procedure offset scfg-append! receiver) (let ((block (block-parent (procedure-block procedure)))) + (define (finish environment) (receiver (rtl:make-typed-cons:pair (rtl:make-constant type-code:compiled-procedure) (rtl:make-entry:procedure procedure) environment))) + + (define (ic-locative closure-block block) + (let ((loser + (lambda (locative) + (error "Closure parent not IC block")))) + (find-block closure-block block offset + loser + loser + (lambda (locative nearest-ic-locative) + locative)))) + (cond ((not block) (finish (rtl:make-constant false))) ((ic-block? block) - (finish (rtl:make-fetch register:environment))) + (finish + (let ((closure-block (procedure-closure-block procedure))) + (if (ic-block? closure-block) + (rtl:make-fetch register:environment) + (ic-locative closure-block block))))) ((closure-block? block) (let ((closure-block (procedure-closure-block procedure))) (define (loop variables n receiver) @@ -436,29 +432,13 @@ pushes))) (finish (rtl:interpreter-call-result:enclose)))) - (define (loser locative) - (error "Closure parent not IC block")) - (loop (block-bound-variables block) 0 (lambda (offset n pushes) (let ((parent (block-parent block))) (if parent - (find-block closure-block parent offset - loser - loser - (lambda (locative nearest-ic-locative) - (make-frame (1+ n) - (cons (rtl:make-push locative) - pushes)))) + (make-frame (1+ n) + (cons (rtl:make-push + (ic-locative closure-block parent)) + pushes)) (make-frame n pushes))))))) - (else (error "Unknown block type" block))))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access rtl-generator-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: "node rtl arguments") \ No newline at end of file diff --git a/v7/src/compiler/rtlopt/ralloc.scm b/v7/src/compiler/rtlopt/ralloc.scm index 03a2d270c..7f53d09be 100644 --- a/v7/src/compiler/rtlopt/ralloc.scm +++ b/v7/src/compiler/rtlopt/ralloc.scm @@ -1,47 +1,41 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/ralloc.scm,v 1.10 1987/03/19 00:46:34 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; Register Allocation ;;; Based on the GNU C Compiler -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/ralloc.scm,v 1.9 1986/12/20 22:52:48 cph Exp $ - (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define (register-allocation bblocks) ;; First, renumber all the registers remaining to be allocated. @@ -129,14 +123,4 @@ (if (pseudo-register? register) (regset-adjoin! live (vector-ref register->renumber - register)))))))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access rtl-analyzer-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: register)))))))) \ No newline at end of file diff --git a/v7/src/compiler/rtlopt/rcse1.scm b/v7/src/compiler/rtlopt/rcse1.scm index 3ac437078..73874c76c 100644 --- a/v7/src/compiler/rtlopt/rcse1.scm +++ b/v7/src/compiler/rtlopt/rcse1.scm @@ -1,47 +1,41 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcse1.scm,v 1.99 1987/03/19 00:46:43 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; RTL Common Subexpression Elimination ;;; Based on the GNU C Compiler -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rcse1.scm,v 1.98 1987/02/12 00:41:08 cph Exp $ - (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) (define (common-subexpression-elimination blocks n-registers) (fluid-let ((*next-quantity-number* 0)) @@ -219,7 +213,8 @@ (lambda (statement) (let ((n (rtl:interpreter-call:enclose-size statement))) (stack-region-invalidate! 0 n) - (stack-pointer-adjust! n)))) + (stack-pointer-adjust! n)) + (expression-invalidate! (interpreter-register:enclose)))) (define (define-assignment-method type get-environment set-environment! @@ -545,355 +540,4 @@ (define (hash-object object) (cond ((integer? object) object) ((symbol? object) (symbol-hash object)) - (else (hash object)))) - -;;;; Expression Predicates - -(define (expression-equivalent? x y validate?) - ;; If VALIDATE? is true, assume that Y comes from the hash table and - ;; should have its register references validated. - (define (loop x y) - (let ((type (rtl:expression-type x))) - (and (eq? type (rtl:expression-type y)) - (case type - ((REGISTER) - (register-equivalent? x y)) - ((OFFSET) - (let ((rx (rtl:offset-register x))) - (and (register-equivalent? rx (rtl:offset-register y)) - (if (interpreter-stack-pointer? rx) - (eq? (stack-reference-quantity x) - (stack-reference-quantity y)) - (= (rtl:offset-number x) - (rtl:offset-number y)))))) - (else - (rtl:match-subexpressions x y loop)))))) - - (define (register-equivalent? x y) - (let ((x (rtl:register-number x)) - (y (rtl:register-number y))) - (and (eq? (register-quantity x) (register-quantity y)) - (or (not validate?) - (= (register-in-table y) (register-tick y)))))) - - (loop x y)) - -(define (expression-refers-to? x y) - ;; True iff any subexpression of X matches Y. - (define (loop x) - (or (eq? x y) - (if (eq? (rtl:expression-type x) (rtl:expression-type y)) - (expression-equivalent? x y false) - (rtl:any-subexpression? x loop)))) - (loop x)) - -(define (expression-address-varies? expression) - (if (memq (rtl:expression-type expression) - '(OFFSET PRE-INCREMENT POST-INCREMENT)) - (register-expression-varies? (rtl:address-register expression)) - (rtl:any-subexpression? expression expression-address-varies?))) - -(define (expression-varies? expression) - ;; This procedure should not be called on a register expression. - (let ((type (rtl:expression-type expression))) - (or (memq type '(OFFSET PRE-INCREMENT POST-INCREMENT)) - (if (eq? type 'REGISTER) - (register-expression-varies? expression) - (rtl:any-subexpression? expression expression-varies?))))) - -(define (register-expression-varies? expression) - (not (= regnum:regs-pointer (rtl:register-number expression)))) - -(define (stack-push/pop? expression) - (and (pre/post-increment? expression) - (interpreter-stack-pointer? (rtl:address-register expression)))) - -(define (heap-allocate? expression) - (and (pre/post-increment? expression) - (interpreter-free-pointer? (rtl:address-register expression)))) - -(define-integrable (pre/post-increment? expression) - (memq (rtl:expression-type expression) '(PRE-INCREMENT POST-INCREMENT))) - -;;;; Stack References - -(define *stack-offset*) -(define *stack-reference-quantities*) - -(define (stack-reference? expression) - (and (eq? (rtl:expression-type expression) 'OFFSET) - (interpreter-stack-pointer? (rtl:address-register expression)))) - -(define (stack-reference-quantity expression) - (let ((n (+ *stack-offset* (rtl:offset-number expression)))) - (let ((entry (ass= n *stack-reference-quantities*))) - (if entry - (cdr entry) - (let ((quantity (new-quantity false))) - (set! *stack-reference-quantities* - (cons (cons n quantity) - *stack-reference-quantities*)) - quantity))))) - -(define-integrable (stack-pointer-adjust! offset) - (set! *stack-offset* (+ (stack->memory-offset offset) *stack-offset*)) - (stack-pointer-invalidate!)) - -(define-integrable (stack-pointer-invalidate!) - (register-expression-invalidate! (interpreter-stack-pointer))) - -(define-integrable (stack-invalidate!) - (set! *stack-reference-quantities* '())) - -(define (stack-region-invalidate! start end) - (let ((end (+ *stack-offset* end))) - (define (loop i quantities) - (if (< i end) - (loop (1+ i) - (del-ass=! i quantities)) - (set! *stack-reference-quantities* quantities))) - (loop (+ *stack-offset* start) *stack-reference-quantities*))) - -(define (stack-reference-invalidate! expression) - (expression-invalidate! expression) - (set! *stack-reference-quantities* - (del-ass=! (+ *stack-offset* (rtl:offset-number expression)) - *stack-reference-quantities*))) - -(define ass= (association-procedure = car)) -(define del-ass=! (delete-association-procedure list-deletor! = car)) - -;;;; Hash Table Abstraction - -(define n-buckets 31) - -(define (make-hash-table) - (make-vector n-buckets false)) - -(define *hash-table*) - -(define-integrable (hash-table-ref hash) - (vector-ref *hash-table* hash)) - -(define-integrable (hash-table-set! hash element) - (vector-set! *hash-table* hash element)) - -(define element-tag (make-vector-tag false 'ELEMENT)) -(define element? (tagged-vector-predicate element-tag)) - -(define-vector-slots element 1 - expression cost in-memory? - next-hash previous-hash - next-value previous-value first-value) - -(define (make-element expression) - (vector element-tag expression false false false false false false false)) - -(define (hash-table-lookup hash expression) - (define (loop element) - (and element - (if (let ((expression* (element-expression element))) - (or (eq? expression expression*) - (expression-equivalent? expression expression* true))) - element - (loop (element-next-hash element))))) - (loop (hash-table-ref hash))) - -(define (hash-table-insert! hash expression class) - (let ((element (make-element expression)) - (cost (rtl:expression-cost expression))) - (set-element-cost! element cost) - (let ((next (hash-table-ref hash))) - (set-element-next-hash! element next) - (if next (set-element-previous-hash! next element))) - (hash-table-set! hash element) - (cond ((not class) - (set-element-first-value! element element)) - ((< cost (element-cost class)) - (set-element-next-value! element class) - (set-element-previous-value! class element) - (let loop ((x element)) - (if x - (begin (set-element-first-value! x element) - (loop (element-next-value x)))))) - (else - (set-element-first-value! element class) - (let loop ((previous class) - (next (element-next-value class))) - (cond ((not next) - (set-element-next-value! element false) - (set-element-next-value! previous element) - (set-element-previous-value! element previous)) - ((<= cost (element-cost next)) - (set-element-next-value! element next) - (set-element-previous-value! next element) - (set-element-next-value! previous element) - (set-element-previous-value! element previous)) - (else - (loop next (element-next-value next))))))) - element)) - -(define (hash-table-delete! hash element) - (if element - (begin - ;; **** Mark this element as removed. [ref crock-1] - (set-element-first-value! element false) - (let ((next (element-next-value element)) - (previous (element-previous-value element))) - (if next (set-element-previous-value! next previous)) - (if previous - (set-element-next-value! previous next) - (let loop ((element next)) - (if element - (begin (set-element-first-value! element next) - (loop (element-next-value element))))))) - (let ((next (element-next-hash element)) - (previous (element-previous-hash element))) - (if next (set-element-previous-hash! next previous)) - (if previous - (set-element-next-hash! previous next) - (hash-table-set! hash next)))))) - -(define (hash-table-delete-class! predicate) - (let table-loop ((i 0)) - (if (< i n-buckets) - (let bucket-loop ((element (hash-table-ref i))) - (if element - (begin (if (predicate element) - (hash-table-delete! i element)) - (bucket-loop (element-next-hash element))) - (table-loop (1+ i))))))) - -(package (hash-table-copy) - -(define *elements*) - -(define-export (hash-table-copy table) - (fluid-let ((*elements* '())) - (vector-map table element-copy))) - -(define (element-copy element) - (and element - (let ((entry (assq element *elements*))) - (if entry - (cdr entry) - (let ((new (make-element (element-expression element)))) - (set! *elements* (cons (cons element new) *elements*)) - (set-element-cost! new (element-cost element)) - (set-element-in-memory?! new (element-in-memory? element)) - (set-element-next-hash! - new - (element-copy (element-next-hash element))) - (set-element-previous-hash! - new - (element-copy (element-previous-hash element))) - (set-element-next-value! - new - (element-copy (element-next-value element))) - (set-element-previous-value! - new - (element-copy (element-previous-value element))) - (set-element-first-value! - new - (element-copy (element-first-value element))) - new))))) - -) - -;;;; State Abstraction - -(define (state:initialize n-registers thunk) - (fluid-let ((*register-quantity* (make-vector n-registers)) - (*register-next-equivalent* (make-vector n-registers)) - (*register-previous-equivalent* (make-vector n-registers)) - (*register-expression* (make-vector n-registers)) - (*register-tick* (make-vector n-registers)) - (*register-in-table* (make-vector n-registers)) - (*hash-table* (make-hash-table)) - (*stack-offset*) - (*stack-reference-quantities*)) - (thunk))) - -(define (state:reset!) - (vector-fill-with-quantities! *register-quantity*) - (vector-fill! *register-next-equivalent* false) - (vector-fill! *register-previous-equivalent* false) - (vector-fill! *register-expression* false) - (for-each-machine-register - (lambda (register) - (set-register-expression! register (rtl:make-machine-register register)))) - (vector-fill! *register-tick* 0) - (vector-fill! *register-in-table* -1) - (set! *hash-table* (make-hash-table)) - (set! *stack-offset* 0) - (set! *stack-reference-quantities* '())) - -(define (vector-fill-with-quantities! vector) - (define (loop i) - (vector-set! vector i (new-quantity i)) - (if (not (zero? i)) - (loop (-1+ i)))) - (loop (-1+ (vector-length vector)))) - -(define (state:get) - (vector (vector-map *register-quantity* quantity-copy) - (vector-copy *register-next-equivalent*) - (vector-copy *register-previous-equivalent*) - (vector-copy *register-expression*) - (vector-copy *register-tick*) - (vector-copy *register-in-table*) - (hash-table-copy *hash-table*) - *stack-offset* - (copy-alist *stack-reference-quantities*))) - -(define (state:set! state) - (set! *register-quantity* (vector-ref state 0)) - (set! *register-next-equivalent* (vector-ref state 1)) - (set! *register-previous-equivalent* (vector-ref state 2)) - (set! *register-expression* (vector-ref state 3)) - (set! *register-tick* (vector-ref state 4)) - (set! *register-in-table* (vector-ref state 5)) - (set! *hash-table* (vector-ref state 6)) - (set! *stack-offset* (vector-ref state 7)) - (set! *stack-reference-quantities* (vector-ref state 8))) - -;;;; Register/Quantity Abstractions - -(define quantity-tag (make-vector-tag false 'QUANTITY)) -(define quantity? (tagged-vector-predicate quantity-tag)) -(define-vector-slots quantity 1 number first-register last-register) - -(define *next-quantity-number*) - -(define (generate-quantity-number) - (let ((n *next-quantity-number*)) - (set! *next-quantity-number* (1+ *next-quantity-number*)) - n)) - -(define (make-quantity number first-register last-register) - (vector quantity-tag number first-register last-register)) - -(define (new-quantity register) - (make-quantity (generate-quantity-number) register register)) - -(define (quantity-copy quantity) - (make-quantity (quantity-number quantity) - (quantity-first-register quantity) - (quantity-last-register quantity))) - -(define-register-references quantity) -(define-register-references next-equivalent) -(define-register-references previous-equivalent) -(define-register-references expression) -(define-register-references tick) -(define-register-references in-table) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access rtl-cse-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: rtl:set-interpreter-call:set!-value!) \ No newline at end of file diff --git a/v7/src/compiler/rtlopt/rlife.scm b/v7/src/compiler/rtlopt/rlife.scm index 772c33043..f5cdb0c4b 100644 --- a/v7/src/compiler/rtlopt/rlife.scm +++ b/v7/src/compiler/rtlopt/rlife.scm @@ -1,47 +1,41 @@ -;;; -*-Scheme-*- -;;; -;;; Copyright (c) 1986 Massachusetts Institute of Technology -;;; -;;; This material was developed by the Scheme project at the -;;; Massachusetts Institute of Technology, Department of -;;; Electrical Engineering and Computer Science. Permission to -;;; copy this software, to redistribute it, and to use it for any -;;; purpose is granted, subject to the following restrictions and -;;; understandings. -;;; -;;; 1. Any copy made of this software must include this copyright -;;; notice in full. -;;; -;;; 2. Users of this software agree to make their best efforts (a) -;;; to return to the MIT Scheme project any improvements or -;;; extensions that they make, so that these may be included in -;;; future releases; and (b) to inform MIT of noteworthy uses of -;;; this software. -;;; -;;; 3. All materials developed as a consequence of the use of this -;;; software shall duly acknowledge such use, in accordance with -;;; the usual standards of acknowledging credit in academic -;;; research. -;;; -;;; 4. MIT has made no warrantee or representation that the -;;; operation of this software will be error-free, and MIT is -;;; under no obligation to provide any services, by way of -;;; maintenance, update, or otherwise. -;;; -;;; 5. In conjunction with products arising from the use of this -;;; material, there shall be no use of the name of the -;;; Massachusetts Institute of Technology nor of any adaptation -;;; thereof in any advertising, promotional, or sales literature -;;; without prior written consent from MIT in each case. -;;; +#| -*-Scheme-*- + +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rlife.scm,v 1.55 1987/03/19 00:47:19 cph Exp $ + +Copyright (c) 1987 Massachusetts Institute of Technology + +This material was developed by the Scheme project at the Massachusetts +Institute of Technology, Department of Electrical Engineering and +Computer Science. Permission to copy this software, to redistribute +it, and to use it for any purpose is granted, subject to the following +restrictions and understandings. + +1. Any copy made of this software must include this copyright notice +in full. + +2. Users of this software agree to make their best efforts (a) to +return to the MIT Scheme project any improvements or extensions that +they make, so that these may be included in future releases; and (b) +to inform MIT of noteworthy uses of this software. + +3. All materials developed as a consequence of the use of this +software shall duly acknowledge such use, in accordance with the usual +standards of acknowledging credit in academic research. + +4. MIT has made no warrantee or representation that the operation of +this software will be error-free, and MIT is under no obligation to +provide any services, by way of maintenance, update, or otherwise. + +5. In conjunction with products arising from the use of this material, +there shall be no use of the name of the Massachusetts Institute of +Technology nor of any adaptation thereof in any advertising, +promotional, or sales literature without prior written consent from +MIT in each case. |# ;;;; RTL Register Lifetime Analysis ;;; Based on the GNU C Compiler -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlopt/rlife.scm,v 1.54 1986/12/20 23:48:53 cph Exp $ - (declare (usual-integrations)) -(using-syntax (access compiler-syntax-table compiler-package) ;;;; Lifetime Analysis @@ -280,14 +274,4 @@ (lambda (register) (write-string " ") (write register))))))) - (reverse bblocks)))) - -;;; end USING-SYNTAX -) - -;;; Edwin Variables: -;;; Scheme Environment: (access rtl-analyzer-package compiler-package) -;;; Scheme Syntax Table: (access compiler-syntax-table compiler-package) -;;; Tags Table Pathname: (access compiler-tags-pathname compiler-package) -;;; End: (pseudo-register? (rtl:register-number expression)))) \ No newline at end of file