Reimplement 32 bit offsets in compiled code blocks. They are now
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 30 Jul 1987 21:44:51 +0000 (21:44 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 30 Jul 1987 21:44:51 +0000 (21:44 +0000)
implemented as a chain of 16 bit offsets, since parts of the system
depend on the fact that any given offset is only 16 bits long.

v7/src/compiler/machines/bobcat/assmd.scm
v7/src/compiler/machines/bobcat/instr2.scm
v7/src/compiler/machines/bobcat/lapgen.scm
v7/src/compiler/machines/bobcat/make.scm-68040
v7/src/compiler/machines/bobcat/rules3.scm

index 6d358dc0405330a276df851610d187c2922c814d..0317cad202a9c160a53840c00d66ec0c11264e49 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/assmd.scm,v 1.30 1987/07/13 22:04:47 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/assmd.scm,v 1.31 1987/07/30 21:43:32 jinx Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -36,11 +36,20 @@ MIT in each case. |#
 
 (declare (usual-integrations))
 \f
+(declare (integrate addressing-granularity scheme-object-width
+                   maximum-padding-length
+                   maximum-block-offset block-offset-width))
+
 (define addressing-granularity 8)
 (define scheme-object-width 32)
+
 ;; Instruction length is always a multiple of 16
 (define maximum-padding-length 16)
 
+;; Block offsets are always words
+(define maximum-block-offset (- (expt 2 16) 2))
+(define block-offset-width 16)
+
 (define make-nmv-header)
 (let ()
 
@@ -57,4 +66,8 @@ MIT in each case. |#
 (define (object->bit-string object)
   (bit-string-append
    (unsigned-integer->bit-string 24 (primitive-datum object))
-   (unsigned-integer->bit-string 8 (primitive-type object))))
\ No newline at end of file
+   (unsigned-integer->bit-string 8 (primitive-type object))))
+
+(define (block-offset->bit-string offset start?)
+  (unsigned-integer->bit-string block-offset-width
+                               (if start? offset (1+ offset))))
\ No newline at end of file
index 0e85d3e792594002474600f6a1add5913b3b7a30..96750af4d8e099510165cc1da6ec95215dd3e246 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/instr2.scm,v 1.12 1987/07/30 07:09:32 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/instr2.scm,v 1.13 1987/07/30 21:44:02 jinx Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -44,16 +44,7 @@ MIT in each case. |#
    (WORD (16 expression SIGNED)))
 
   ((L (? expression))
-   (WORD (32 expression SIGNED)))
-
-  ((O (? expression))
-   (GROWING-WORD
-    (offset expression)
-    ((0 65535)
-     (WORD (16 offset)))
-    ;; Always non-negative
-    ((0 ())
-     (WORD (32 (1+ offset)))))))
+   (WORD (32 expression SIGNED))))
 \f
 ;;;; BCD Arithmetic
 
index 00e6925b1d039b1659d9834997629f2570226a64..2c83cf0e483c17c39ec1b7cff496f0448c8d7ecf 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 1.187 1987/07/30 07:10:24 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 1.188 1987/07/30 21:44:13 jinx Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -257,7 +257,7 @@ MIT in each case. |#
   (set! compiler:external-labels
        (cons label compiler:external-labels))
   (LAP (ENTRY-POINT ,label)
-       (DC O (- ,label ,block-start-label))
+       (BLOCK-OFFSET ,label)
        (LABEL ,label)))
 \f
 ;;;; Registers/Entries
index ac83525f642401a1704e45e0eeb40afc4c32f401..26d85d82171bbdad09a2bfcb4d11bffff0c7ff00 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 1.37 1987/07/30 07:10:47 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 1.38 1987/07/30 21:44:39 jinx Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -46,11 +46,11 @@ MIT in each case. |#
     (make-environment
       (define :name "Liar (Bobcat 68020)")
       (define :version 1)
-      (define :modification 37)
+      (define :modification 38)
       (define :files)
 
 ;      (parse-rcs-header
-;       "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 1.37 1987/07/30 07:10:47 jinx Exp $"
+;       "$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/make.scm-68040,v 1.38 1987/07/30 21:44:39 jinx Exp $"
 ;       (lambda (filename version date time zone author state)
 ;       (set! :version (car version))
 ;       (set! :modification (cadr version))))
index 5d7d57dbcb69e104b46288f38a4b43ffdc0171cd..10cfe98a87941c8811d094aa1f42c8a67842f7cf 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rules3.scm,v 1.12 1987/07/30 07:10:59 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/rules3.scm,v 1.13 1987/07/30 21:44:51 jinx Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -323,5 +323,5 @@ MIT in each case. |#
 (define (make-external-label label)
   (set! compiler:external-labels 
        (cons label compiler:external-labels))
-  (LAP (DC O (- ,label ,*block-start-label*))
+  (LAP (BLOCK-OFFSET ,label)
        (LABEL ,label)))