appropriate instances of CONS-POINTER to use the new type.
* Replace RTL expression type @ADDRESS->FLOAT with new type
OBJECT->FLOAT.
* Introduce new internal switch USE-PRE/POST-INCREMENT?. Change code
generation of in-line consing to pay attention to this switch.
* Merge common parts of "machine/make" into new file "base/make".
On MIPS:
* Change code sequence that assigns type codes to assume that the type
field has a known value. This eliminates one instruction in every
type-code assignment. It assumes that the data segment bits have a
certain value, but the microcode already does this.
* Cache immediate constants in registers, and remember which registers
contain which constants. (This should be improved by noticing when
arithmetic operations are done on known constants and cacheing the
results.)
* Set USE-PRE/POST-INCREMENT? to false, saving one instruction in
every CONS, and multiple instructions in each call to VECTOR.
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/compiler.pkg,v 1.33 1991/07/25 02:34:14 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/compiler.pkg,v 1.34 1991/10/25 06:49:28 cph Exp $
-Copyright (c) 1988-1991 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
"machines/bobcat/instr4" ; " "
"machines/bobcat/flinstr1" ;68881 Floating Point Instructions
"machines/bobcat/flinstr2" ; " " " "
+ "machines/bobcat/mc68ktgl" ;68020/68040 selection
)
(parent (compiler))
(export (compiler)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/machin.scm,v 4.25 1991/05/28 19:14:36 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/machin.scm,v 4.26 1991/10/25 06:49:34 cph Exp $
-Copyright (c) 1988-1991 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
\f
;;;; Architecture Parameters
+(define use-pre/post-increment? true)
(define-integrable endianness 'BIG)
(define-integrable addressing-granularity 8)
(define-integrable scheme-object-width 32)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68020,v 4.87 1991/07/25 07:24:04 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68020,v 4.88 1991/10/25 06:49:41 cph Exp $
Copyright (c) 1991 Massachusetts Institute of Technology
(declare (usual-integrations))
-(package/system-loader "comp" '() 'QUERY)
-(for-each (lambda (name)
- ((package/reference (find-package name) 'INITIALIZE-PACKAGE!)))
- '((COMPILER MACROS)
- (COMPILER DECLARATIONS)))
-(load "machines/bobcat/mc68ktgl")
-((package/reference (find-package '(COMPILER LAP-SYNTAXER))
- 'MC68K/toggle-closure-format)
- 'MC68020)
-(add-system! (make-system "Liar (Motorola MC68020)" 4 87 '()))
\ No newline at end of file
+((load "base/make") "Motorola MC68020")
+((environment-lookup (->environment '(COMPILER LAP-SYNTAXER))
+ 'MC68K/TOGGLE-CLOSURE-FORMAT)
+ 'MC68020)
\ No newline at end of file
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 4.87 1991/07/25 02:34:28 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 4.88 1991/10/25 06:49:46 cph Exp $
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1991 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(declare (usual-integrations))
-(package/system-loader "comp" '() 'QUERY)
-(for-each (lambda (name)
- ((package/reference (find-package name) 'INITIALIZE-PACKAGE!)))
- '((COMPILER MACROS)
- (COMPILER DECLARATIONS)))
-(add-system! (make-system "Liar (Motorola MC68040)" 4 87 '()))
\ No newline at end of file
+((load "base/make") "Motorola MC68040")
+((environment-lookup (->environment '(COMPILER LAP-SYNTAXER))
+ 'MC68K/TOGGLE-CLOSURE-FORMAT)
+ 'MC68040)
\ No newline at end of file
#| -*- Scheme -*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/mc68ktgl.scm,v 1.1 1991/03/24 23:53:02 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/mc68ktgl.scm,v 1.2 1991/10/25 06:49:53 cph Exp $
Copyright (c) 1991 Massachusetts Institute of Technology
MIT in each case. |#
(declare (usual-integrations))
-\f
-(in-package (->environment '(compiler lap-syntaxer))
-
-;; This procedure toggles the closure format for the mc68k back end.
(define (mc68k/toggle-closure-format #!optional new-format)
- (let ((new-format
- (cond ((not (default-object? new-format))
- new-format)
- ((eq? MC68K/closure-format 'MC68020)
- 'MC68040)
- (else
- 'MC68020))))
- (if (not (eq? new-format MC68K/closure-format))
- (case new-format
- ((MC68020)
- (set! mc68k/closure-format
- 'MC68020)
- (set! closure-first-offset
- MC68020/closure-first-offset)
- (set! closure-object-first-offset
- MC68020/closure-object-first-offset)
- (set! closure-entry-distance
- MC68020/closure-entry-distance)
- (set! closure-environment-adjustment
- MC68020/closure-environment-adjustment)
- (set! generate/closure-header
- MC68020/closure-header)
- (set! generate/cons-closure
- MC68020/cons-closure)
- (set! generate/cons-multiclosure
- MC68020/cons-multiclosure))
- ((MC68040)
- (set! mc68k/closure-format
- 'MC68040)
- (set! closure-first-offset
- MC68040/closure-first-offset)
- (set! closure-object-first-offset
- MC68040/closure-object-first-offset)
- (set! closure-entry-distance
- MC68040/closure-entry-distance)
- (set! closure-environment-adjustment
- MC68040/closure-environment-adjustment)
- (set! generate/closure-header
- MC68040/closure-header)
- (set! generate/cons-closure
- MC68040/cons-closure)
- (set! generate/cons-multiclosure
- MC68040/cons-multiclosure))
- (error "MC68K/toggle-closure-format: Unknown format"
- new-format)))
- (warn "MC68K/closure-format is now" MC68K/closure-format)
- MC68K/closure-format))
-
-) ;; End of in-package.
+ (case (if (default-object? new-format)
+ (if (eq? MC68K/closure-format 'MC68020)
+ 'MC68040
+ 'MC68020)
+ new-format)
+ ((MC68020)
+ (set! closure-first-offset MC68020/closure-first-offset)
+ (set! closure-object-first-offset MC68020/closure-object-first-offset)
+ (set! closure-entry-distance MC68020/closure-entry-distance)
+ (set! closure-environment-adjustment
+ MC68020/closure-environment-adjustment)
+ (set! generate/closure-header MC68020/closure-header)
+ (set! generate/cons-closure MC68020/cons-closure)
+ (set! generate/cons-multiclosure MC68020/cons-multiclosure)
+ (set! mc68k/closure-format 'MC68020))
+ ((MC68040)
+ (set! closure-first-offset MC68040/closure-first-offset)
+ (set! closure-object-first-offset MC68040/closure-object-first-offset)
+ (set! closure-entry-distance MC68040/closure-entry-distance)
+ (set! closure-environment-adjustment
+ MC68040/closure-environment-adjustment)
+ (set! generate/closure-header MC68040/closure-header)
+ (set! generate/cons-closure MC68040/cons-closure)
+ (set! generate/cons-multiclosure MC68040/cons-multiclosure)
+ (set! mc68k/closure-format 'MC68040))
+ (else
+ (error "Unknown closure format:" new-format)))
+ MC68K/closure-format)
\ No newline at end of file
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rules1.scm,v 4.35 1991/05/28 19:14:47 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rules1.scm,v 4.36 1991/10/25 06:49:58 cph Exp $
-Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(FMOVE D ,source (@A+ 5))))))
(define-rule statement
- (ASSIGN (REGISTER (? target))
- (@ADDRESS->FLOAT (REGISTER (? source))))
- (let ((source (indirect-reference! source 1)))
+ (ASSIGN (REGISTER (? target)) (OBJECT->FLOAT (REGISTER (? source))))
+ (let ((source (standard-move-to-temporary! source 'DATA))
+ (temp (allocate-temporary-register! 'ADDRESS)))
(delete-dead-registers!)
- (LAP (FMOVE D ,source ,(reference-target-alias! target 'FLOAT)))))
+ (LAP ,@(object->address source)
+ (MOV L ,source ,(register-reference temp))
+ (FMOVE D
+ ,(offset-reference temp 1)
+ ,(reference-target-alias! target 'FLOAT)))))
(define-rule statement
(ASSIGN (? target)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rulrew.scm,v 1.3 1990/05/03 15:17:42 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rulrew.scm,v 1.4 1991/10/25 06:50:06 cph Exp $
-Copyright (c) 1990 Massachusetts Institute of Technology
+Copyright (c) 1990-91 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
\f
;;;; Synthesized Data
+(define-rule rewriting
+ (CONS-NON-POINTER (? type) (? datum))
+ ;; On 68000, there's no difference between an address and a datum,
+ ;; so the rules for constructing non-pointer objects are the same as
+ ;; those for pointer objects.
+ (rtl:make-cons-pointer type datum))
+
(define-rule rewriting
(CONS-POINTER (REGISTER (? type register-known-value)) (? datum))
(QUALIFIER (rtl:machine-constant? type))