X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fppc%2Ftype-vops.lisp;h=9a82f52e4351bdc4fccb341902f977e9f5fa37c8;hb=8a8568603cc7cacd188fe1cac18824a69bece6af;hp=3b2b34a78aea9bf1b8caa88a922f0b955aeb2163;hpb=f6a2e547ef4e4895c3536835123b44338221ac2d;p=sbcl.git diff --git a/src/compiler/ppc/type-vops.lisp b/src/compiler/ppc/type-vops.lisp index 3b2b34a..9a82f52 100644 --- a/src/compiler/ppc/type-vops.lisp +++ b/src/compiler/ppc/type-vops.lisp @@ -13,14 +13,13 @@ (defun %test-fixnum (value target not-p &key temp) (assemble () - ;; FIXME: again, this 3 should be FIXNUM-MASK - (inst andi. temp value 3) + (inst andi. temp value fixnum-tag-mask) (inst b? (if not-p :ne :eq) target))) (defun %test-fixnum-and-headers (value target not-p headers &key temp) (let ((drop-through (gen-label))) (assemble () - (inst andi. temp value 3) + (inst andi. temp value fixnum-tag-mask) (inst beq (if not-p drop-through target))) (%test-headers value target not-p nil headers :drop-through drop-through :temp temp))) @@ -140,13 +139,9 @@ ,@(if mask `((inst andi. temp value ,mask) (inst twi 0 value (error-number-or-lose ',error-code)) - (inst twi :ne temp ,@(if ;; KLUDGE: At - ;; present, MASK is - ;; 3 or LOWTAG-MASK - (eql mask 3) - ;; KLUDGE - `(0) - type-codes)) + (inst twi :ne temp ,@(ecase mask + ((fixnum-tag-mask) `(0)) + ((lowtag-mask) type-codes))) (move result value)) `((let ((err-lab (generate-error-code vop ,error-code value)))