* Introduce new RTL expression type CONS-NON-POINTER and change
authorChris Hanson <org/chris-hanson/cph>
Fri, 25 Oct 1991 12:29:56 +0000 (12:29 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 25 Oct 1991 12:29:56 +0000 (12:29 +0000)
  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.

v7/src/compiler/machines/spectrum/machin.scm
v7/src/compiler/machines/spectrum/make.scm
v7/src/compiler/machines/spectrum/rulflo.scm
v7/src/compiler/machines/spectrum/rulrew.scm

index 72ff77d714d13edfda69022502fbf451453c8384..e8e68e30e991b692f84388547c5ab461910421b4 100644 (file)
@@ -1,7 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/machin.scm,v 4.23 1991/07/25 09:04:33 cph Exp $
-$MC68020-Header: machin.scm,v 4.22 90/05/03 15:17:20 GMT jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/machin.scm,v 4.24 1991/10/25 12:29:51 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -40,6 +39,7 @@ MIT in each case. |#
 \f
 ;;;; Architecture Parameters
 
+(define use-pre/post-increment? true)
 (define-integrable endianness 'BIG)
 (define-integrable addressing-granularity 8)
 (define-integrable scheme-object-width 32)
index 22532f04f8bbfbc9047c61b3b3f424bf22b05378..c3abdd164dbf04b4e378d06bdbc547ea326234e6 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/make.scm,v 4.87 1991/07/25 02:38:17 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/make.scm,v 4.88 1991/10/25 12:29:52 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -36,9 +36,4 @@ MIT in each case. |#
 
 (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 (HP PA)" 4 87 '()))
\ No newline at end of file
+((load "base/make") "HP PA")
\ No newline at end of file
index 90f09b05304ccb9725f0ebce0fd3bbda22e6ac5c..2f922b0093447b64d6f94268912255878328e503 100644 (file)
@@ -1,9 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/rulflo.scm,v 4.32 1990/01/25 16:45:49 jinx Rel $
-$MC68020-Header: rules1.scm,v 4.32 90/01/18 22:43:54 GMT cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/rulflo.scm,v 4.33 1991/10/25 12:29:54 cph Exp $
 
-Copyright (c) 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1989-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -63,10 +62,11 @@ MIT in each case. |#
           (FSTDS (MA) ,source (OFFSET 8 0 21))))))
 
 (define-rule statement
-  ;; convert a flonum object address to a floating-point number
-  (ASSIGN (REGISTER (? target)) (@ADDRESS->FLOAT (REGISTER (? source))))
-  (let ((source (standard-source! source)))
-    (LAP (FLDDS () (OFFSET 4 0 ,source) ,(flonum-target! target)))))
+  ;; convert a flonum object to a floating-point number
+  (ASSIGN (REGISTER (? target)) (OBJECT->FLOAT (REGISTER (? source))))
+  (let ((source (standard-move-to-temporary! source)))
+    (LAP ,@(object->address source)
+        (FLDDS () (OFFSET 4 0 ,source) ,(flonum-target! target)))))
 \f
 ;;;; Flonum Arithmetic
 
index c37f2da27a865750dea7f6d7ebeb3aaf282f771f..acceaa92cb1ad1a0c0ceaf522481a566b388d8ae 100644 (file)
@@ -1,9 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/rulrew.scm,v 1.3 1990/07/22 18:56:39 jinx Rel $
-$MC68020-rulrew.scm,v 1.3 90/05/03 15:17:42 GMT jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/rulrew.scm,v 1.4 1991/10/25 12:29:56 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
@@ -40,6 +39,13 @@ MIT in each case. |#
 \f
 ;;;; Synthesized Data
 
+(define-rule rewriting
+  (CONS-NON-POINTER (? type) (? datum))
+  ;; Since we use DEP instructions to insert type codes, there's no
+  ;; difference between the way that pointers and non-pointers are
+  ;; constructed.
+  (rtl:make-cons-pointer type datum))
+
 (define-rule rewriting
   (CONS-POINTER (REGISTER (? type register-known-value))
                (REGISTER (? datum register-known-value)))