X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsparc%2Fcell.lisp;h=18405a31d858ad8e01ed0c4d6d47d50803576c6a;hb=15d6e7c9a2c3234f95dfe278046fa2fee1b0c007;hp=2d632bc4a81caffc464a4b3acdc8b4431b7e8bb2;hpb=68fd2d2dd6f265669a8957accd8a33e62786a97e;p=sbcl.git diff --git a/src/compiler/sparc/cell.lisp b/src/compiler/sparc/cell.lisp index 2d632bc..18405a3 100644 --- a/src/compiler/sparc/cell.lisp +++ b/src/compiler/sparc/cell.lisp @@ -79,6 +79,19 @@ (:policy :fast) (:translate symbol-value)) +(define-vop (symbol-hash) + (:policy :fast-safe) + (:translate symbol-hash) + (:args (symbol :scs (descriptor-reg))) + (:results (res :scs (any-reg))) + (:result-types positive-fixnum) + (:generator 2 + ;; The symbol-hash slot of NIL holds NIL because it is also the + ;; cdr slot, so we have to strip off the two low bits to make sure + ;; it is a fixnum. The lowtag selection magic that is required to + ;; ensure this is explained in the comment in objdef.lisp + (loadw res symbol symbol-hash-slot other-pointer-lowtag) + (inst andn res res fixnum-tag-mask))) ;;;; FDEFINITION (fdefn) objects. (define-vop (fdefn-fun cell-ref) @@ -94,7 +107,7 @@ (move obj-temp object) (loadw value obj-temp fdefn-fun-slot other-pointer-lowtag) (inst cmp value null-tn) - (let ((err-lab (generate-error-code vop undefined-symbol-error obj-temp))) + (let ((err-lab (generate-error-code vop undefined-fun-error obj-temp))) (inst b :eq err-lab)) (inst nop)))