1.0.5.53: cleanup LOAD-TYPE macros

* 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.
This commit is contained in:
Nathan Froyd 2007-05-19 02:14:05 +00:00
parent dd5b34f093
commit 9105a2e4a8
9 changed files with 11 additions and 13 deletions

View file

@ -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\"

View 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

View 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.

View 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

View 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.

View 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.

View file

@ -125,7 +125,8 @@
(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))))))))
;;;; allocation helpers

View file

@ -160,7 +160,8 @@
(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))))))))
;;;; allocation helpers

View 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"