From: Nikodemus S. <de...@us...> - 2008-02-14 16:40:55
|
Update of /cvsroot/sbcl/sbcl/src/compiler/x86 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1264/src/compiler/x86 Modified Files: system.lisp Log Message: 1.0.14.27: rename MAKE-FIXNUM to POINTER-HASH * Use VOP translation instead of %PRIMITIVE. * On x86 and x86-64 improve the pointer-hash slightly: use the whole address, but none of the tag bits in the hash. * Fix type in INDEX-FOR-HASHING: the first argument is a HASH, not an INDEX. Given the better quality of low bits on x86oids (and hopefully soon on others as well), adjust the mixing a bit. Index: system.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/system.lisp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- system.lisp 13 Apr 2007 19:23:52 -0000 1.23 +++ system.lisp 14 Feb 2008 16:40:47 -0000 1.24 @@ -124,14 +124,16 @@ (storew eax x 0 other-pointer-lowtag) (move res x))) -(define-vop (make-fixnum) +(define-vop (pointer-hash) + (:translate pointer-hash) (:args (ptr :scs (any-reg descriptor-reg) :target res)) (:results (res :scs (any-reg descriptor-reg))) + (:policy :fast-safe) (:generator 1 - ;; Some code (the hash table code) depends on this returning a - ;; positive number so make sure it does. (move res ptr) - (inst shl res 3) + ;; Mask the lowtag, and shift the whole address into a positive + ;; fixnum. + (inst and res (lognot lowtag-mask)) (inst shr res 1))) (define-vop (make-other-immediate-type) |