1.0.5.53: cleanup LOAD-TYPE macros
authorNathan Froyd <froydnj@cs.rice.edu>
Sat, 19 May 2007 02:14:05 +0000 (02:14 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Sat, 19 May 2007 02:14:05 +0000 (02:14 +0000)
* when the LOAD-TYPE macros in the various backends hardcoded '3',
  they really meant (1- N-WORD-BYTES)--a little reflection on
  widetags, lowtags, and endian orderings should make this clear
  (we don't have a 64-bit big-endian port to drive it home, though);
* catch the spread of magic constants in code/array.lisp.

make.sh
src/code/array.lisp
src/compiler/hppa/macros.lisp
src/compiler/mips/macros.lisp
src/compiler/ppc/macros.lisp
src/compiler/sparc/macros.lisp
src/compiler/x86-64/macros.lisp
src/compiler/x86/macros.lisp
version.lisp-expr

diff --git a/make.sh b/make.sh
index 51a36cc..c06056e 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -65,7 +65,7 @@ if [ "$OSTYPE" = "cygwin" -o "$OSTYPE" = "msys" ] ; then
 else
     DEVNULL=/dev/null
 fi
-SBCL_XC_HOST="${1:-sbcl --disable-debugger --userinit $DEVNULL --sysinit $DEVNULL}"
+SBCL_XC_HOST="${1:-sbcl --userinit $DEVNULL --sysinit $DEVNULL}"
 export DEVNULL
 export SBCL_XC_HOST
 echo //SBCL_XC_HOST=\"$SBCL_XC_HOST\"
index f41730b..39850a6 100644 (file)
@@ -349,11 +349,7 @@ of specialized arrays is supported."
                             (:little-endian
                              (- sb!vm:other-pointer-lowtag))
                             (:big-endian
-                             ;; I'm not completely sure of what this
-                             ;; 3 represents symbolically. It's
-                             ;; just what all the LOAD-TYPE vops
-                             ;; are doing.
-                             (- 3 sb!vm:other-pointer-lowtag)))))
+                             (- (1- n-word-bytes) sb!vm:other-pointer-lowtag)))))
                    ;; WIDETAG-OF needs extra code to handle
                    ;; LIST and FUNCTION lowtags. We're only
                    ;; dispatching on other pointers, so let's
index d3e8070..95f7563 100644 (file)
@@ -52,7 +52,7 @@
     (:little-endian
      `(inst ldb ,offset ,source ,target))
     (:big-endian
-     `(inst ldb (+ ,offset 3) ,source ,target))))
+     `(inst ldb (+ ,offset (1- n-word-bytes)) ,source ,target))))
 
 ;;; Macros to handle the fact that we cannot use the machine native call and
 ;;; return instructions.
index 9e09443..e6316c0 100644 (file)
@@ -70,7 +70,7 @@
       (:little-endian
        `(inst lbu ,n-target ,n-source ,n-offset))
       (:big-endian
-       `(inst lbu ,n-target ,n-source (+ ,n-offset 3))))))
+       `(inst lbu ,n-target ,n-source (+ ,n-offset (1- n-word-bytes)))))))
 
 
 ;;; Macros to handle the fact that we cannot use the machine native call and
index c1eac07..7e9ace4 100644 (file)
@@ -67,7 +67,7 @@
       (:little-endian
        `(inst lbz ,n-target ,n-source ,n-offset))
       (:big-endian
-       `(inst lbz ,n-target ,n-source (+ ,n-offset 3))))))
+       `(inst lbz ,n-target ,n-source (+ ,n-offset (1- n-word-bytes)))))))
 
 ;;; Macros to handle the fact that we cannot use the machine native call and
 ;;; return instructions.
index bc8149e..a453e2b 100644 (file)
@@ -70,7 +70,7 @@
       (:little-endian
        `(inst ldub ,n-target ,n-source ,n-offset))
       (:big-endian
-       `(inst ldub ,n-target ,n-source (+ ,n-offset 3))))))
+       `(inst ldub ,n-target ,n-source (+ ,n-offset (1- n-word-bytes)))))))
 
 ;;; Macros to handle the fact that we cannot use the machine native call and
 ;;; return instructions.
index be94d71..16a7774 100644 (file)
               (make-ea :byte :base ,n-source :disp ,n-offset)))
       (:big-endian
        `(inst mov ,n-target
-              (make-ea :byte :base ,n-source :disp (+ ,n-offset 4)))))))
+              (make-ea :byte :base ,n-source
+                             :disp (+ ,n-offset (1- n-word-bytes))))))))
 \f
 ;;;; allocation helpers
 
index 468efaa..01c6226 100644 (file)
               (make-ea :byte :base ,n-source :disp ,n-offset)))
       (:big-endian
        `(inst mov ,n-target
-              (make-ea :byte :base ,n-source :disp (+ ,n-offset 3)))))))
+              (make-ea :byte :base ,n-source
+                             :disp (+ ,n-offset (1- n-word-bytes))))))))
 \f
 ;;;; allocation helpers
 
index 070d26a..d27186c 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.5.52"
+"1.0.5.53"