X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Futils.lisp;h=3625f66ba110abe20ae31bdb11ac3eb175dee8cc;hb=2e5263a05f55e2b56a3194ad7853e9ae18ad69af;hp=1ebf85d470a94f2d4c9a8c14da01168a6591129b;hpb=51e63f301624e39febdd85b5feba19b7c980f307;p=sbcl.git diff --git a/src/compiler/generic/utils.lisp b/src/compiler/generic/utils.lisp index 1ebf85d..3625f66 100644 --- a/src/compiler/generic/utils.lisp +++ b/src/compiler/generic/utils.lisp @@ -19,7 +19,7 @@ (error "~W is too big for a fixnum." num))) ;;; Determining whether a constant offset fits in an addressing mode. -#!+x86 +#!+(or x86 x86-64) (defun foldable-constant-offset-p (element-size lowtag data-offset offset) (if (< element-size n-byte-bits) nil @@ -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 @@ -68,7 +68,14 @@ (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))) ;;; Various error-code generating helpers (defvar *adjustable-vectors* nil)