Conditionalization for the C back end.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 8 Nov 1992 04:12:22 +0000 (04:12 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 8 Nov 1992 04:12:22 +0000 (04:12 +0000)
v7/src/compiler/machines/alpha/machin.scm
v7/src/compiler/machines/bobcat/machin.scm
v7/src/compiler/machines/i386/machin.scm
v7/src/compiler/machines/mips/machin.scm
v7/src/compiler/machines/spectrum/machin.scm
v7/src/compiler/machines/vax/machin.scm
v7/src/compiler/rtlgen/rgrval.scm

index a34b0e7c21c8b5aaa5e0af623a3f20603038fd05..2c0532ed5fce8a9cf8ddc29fc6aa8f175561140f 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: machin.scm,v 1.1 1992/08/29 13:51:27 jinx Exp $
+$Id: machin.scm,v 1.2 1992/11/08 04:12:22 jinx Exp $
 
 Copyright (c) 1992 Digital Equipment Corporation (D.E.C.)
 
@@ -119,6 +119,12 @@ case.
 (define (closure-environment-adjustment nentries entry)
   nentries entry                       ; ignored
   0)
+
+(define-integrable (byte-offset:zero? obj)
+  (zero? obj))
+
+(define-integrable (byte-offset:- x y)
+  (- x y))
 \f
 ;;;; Machine Registers
 
index f2ddd94adbedc36093c8e01d072a9b73168ecb83..8f5e38d4e079ab25d122090fce56dea560d78a4e 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$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 $
+$Id: machin.scm,v 4.27 1992/11/08 04:10:31 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -213,6 +213,12 @@ MIT in each case. |#
 
 (define/format-dependent closure-environment-adjustment)
 )
+
+(define-integrable (byte-offset:zero? obj)
+  (zero? obj))
+
+(define-integrable (byte-offset:- x y)
+  (- x y))
 \f
 (define-integrable d0 0)
 (define-integrable d1 1)
index 0cef124a6673f57df3ac429cdd58b8971422d0d6..189f1d15449c28797ae988938d4e56d419706a0c 100644 (file)
@@ -1,7 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/i386/machin.scm,v 1.13 1992/08/17 16:35:58 jinx Exp $
-$MC68020-Header: /scheme/src/compiler/machines/bobcat/RCS/machin.scm,v 4.26 1991/10/25 06:49:34 cph Exp $
+$Id: machin.scm,v 1.14 1992/11/08 04:12:02 jinx Exp $
 
 Copyright (c) 1992 Massachusetts Institute of Technology
 
@@ -121,7 +120,15 @@ MIT in each case. |#
 (define (closure-environment-adjustment nentries entry)
   (declare (integrate-operator closure-entry-distance))
   (closure-entry-distance nentries entry 0))
+
+(define-integrable (byte-offset:zero? obj)
+  (zero? obj))
+
+(define-integrable (byte-offset:- x y)
+  (- x y))
 \f
+;;;; Machine registers
+
 (define eax 0)                         ; acumulator
 (define ecx 1)                         ; counter register
 (define edx 2)                         ; multiplication high-half target
index 9e4a18e41d44e9fb00b120ff8919323aac93d8f4..810c57ef4af8005595a15f6a8d4dfb25fc7cdbce 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/mips/machin.scm,v 1.7 1992/08/20 01:25:15 jinx Exp $
+$Id: machin.scm,v 1.8 1992/11/08 04:11:28 jinx Exp $
 
 Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
@@ -115,6 +115,12 @@ MIT in each case. |#
 (define (closure-environment-adjustment nentries entry)
   nentries entry                       ; ignored
   0)
+
+(define-integrable (byte-offset:zero? obj)
+  (zero? obj))
+
+(define-integrable (byte-offset:- x y)
+  (- x y))
 \f
 ;;;; Machine Registers
 
index e8e68e30e991b692f84388547c5ab461910421b4..df7f9f92b374e4203da6d94b8482ff8d3f191f27 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$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 $
+$Id: machin.scm,v 4.25 1992/11/08 04:09:47 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -147,6 +147,12 @@ MIT in each case. |#
 (define (closure-environment-adjustment nentries entry)
   nentries entry                       ; ignored
   0)
+
+(define-integrable (byte-offset:zero? obj)
+  (zero? obj))
+
+(define-integrable (byte-offset:- x y)
+  (- x y))
 \f
 ;;;; Machine Registers
 
index a85a0ea0d3ed5f449773a9b2832f8e1a5ccae7ec..b8739cad2012858f7edbf9f0f821df778488562a 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/machin.scm,v 4.8 1991/10/25 12:57:26 cph Exp $
+$Id: machin.scm,v 4.9 1992/11/08 04:11:05 jinx Exp $
 
-Copyright (c) 1987-91 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -120,6 +120,12 @@ MIT in each case. |#
   (declare (integrate-operator closure-entry-distance))
   (closure-entry-distance nentries entry 0))
 
+(define-integrable (byte-offset:zero? obj)
+  (zero? obj))
+
+(define-integrable (byte-offset:- x y)
+  (- x y))
+\f
 (define-integrable r0 0)               ; return value
 (define-integrable r1 1)
 (define-integrable r2 2)
index b9e4d4dcc5dee412cbf973d8aede808ff97b14d9..67c2d6251690f5d5ebb0784acb564fb71de88ee2 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgrval.scm,v 4.17 1990/08/24 20:19:59 jinx Rel $
+$Id: rgrval.scm,v 4.18 1992/11/08 04:07:53 jinx Exp $
 
-Copyright (c) 1988, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -267,9 +267,10 @@ MIT in each case. |#
            (entry (closure-block-entry-number block))
            (entry* (closure-block-entry-number block*)))
        (let ((distance
-              (- (closure-entry-distance nentries entry entry*)
-                 (closure-environment-adjustment nentries entry))))
-         (if (zero? distance)
+              (byte-offset:-
+               (closure-entry-distance nentries entry entry*)
+               (closure-environment-adjustment nentries entry))))
+         (if (byte-offset:zero? distance)
              expression
              ;; This is cheaper than the obvious thing with object->address,
              ;; etc.
@@ -399,6 +400,7 @@ MIT in each case. |#
   ;; is always the canonical entry point.
   (let* ((closure-block (procedure-closing-block procedure))
         (shared-block (block-shared-block closure-block)))
-    (zero? (closure-environment-adjustment
-           (block-number-of-entries shared-block)
-           (closure-block-entry-number closure-block)))))
\ No newline at end of file
+    (byte-offset:zero?
+     (closure-environment-adjustment
+      (block-number-of-entries shared-block)
+      (closure-block-entry-number closure-block)))))
\ No newline at end of file