Let OFFSET-CONFLICTS-IN-SB check multiple offsets at a time
[sbcl.git] / src / compiler / generic / utils.lisp
index 7b433a2..d4192d3 100644 (file)
@@ -15,7 +15,7 @@
 ;;; Make a fixnum out of NUM. (I.e. shift by two bits if it will fit.)
 (defun fixnumize (num)
   (if (fixnump num)
-      (ash num (1- n-lowtag-bits))
+      (ash num n-fixnum-tag-bits)
       (error "~W is too big for a fixnum." num)))
 
 ;;; Determining whether a constant offset fits in an addressing mode.
@@ -59,7 +59,7 @@
 
 ;;; Return the (byte) offset from NIL to the start of the fdefn object
 ;;; for the static function NAME.
-(defun static-fun-offset (name)
+(defun static-fdefn-offset (name)
   (let ((static-syms (length *static-symbols*))
         (static-fun-index (position name *static-funs*)))
     (unless static-fun-index
        (pad-data-block (1- symbol-size))
        (- list-pointer-lowtag)
        (* static-fun-index (pad-data-block fdefn-size))
-       (* fdefn-raw-addr-slot n-word-bytes))))
+       other-pointer-lowtag)))
+
+;;; Return the (byte) offset from NIL to the raw-addr slot of the
+;;; fdefn object for the static function NAME.
+(defun static-fun-offset (name)
+  (+ (static-fdefn-offset name)
+     (- other-pointer-lowtag)
+     (* fdefn-raw-addr-slot n-word-bytes)))
 \f
 ;;; Various error-code generating helpers
 (defvar *adjustable-vectors* nil)