mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
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:
parent
dd5b34f093
commit
9105a2e4a8
2
make.sh
2
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\"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue