X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Ftype-vops.lisp;h=0727ca69052e43f5c706c6aa4f0225565d1bcf75;hb=3d544b84f2b7ecd617d220145a775079df6c7919;hp=589b2cb792f0164f1a321fb8dc9fc8386831eea2;hpb=953e2961a4e0f130d67da600d1c965d6794a8984;p=sbcl.git diff --git a/src/compiler/x86-64/type-vops.lisp b/src/compiler/x86-64/type-vops.lisp index 589b2cb..0727ca6 100644 --- a/src/compiler/x86-64/type-vops.lisp +++ b/src/compiler/x86-64/type-vops.lisp @@ -80,10 +80,9 @@ (%test-headers value target not-p nil headers drop-through)) (defun %test-lowtag (value target not-p lowtag) - (move-qword-to-eax value) - (inst and al-tn lowtag-mask) - (inst cmp al-tn lowtag) - (inst jmp (if not-p :ne :e) target)) + (inst lea eax-tn (make-ea :dword :base value :disp (- lowtag))) + (inst test al-tn lowtag-mask) + (inst jmp (if not-p :nz :z) target)) (defun %test-headers (value target not-p function-p headers &optional (drop-through (gen-label))) @@ -265,9 +264,10 @@ (if not-p (values not-target target) (values target not-target)) - (generate-fixnum-test value) - (inst jmp :e yep) (move-qword-to-eax value) + (inst test al-tn fixnum-tag-mask) + (inst jmp :e yep) + (inst and al-tn lowtag-mask) (inst cmp al-tn other-pointer-lowtag) (inst jmp :ne nope) @@ -307,8 +307,8 @@ (values not-target target) (values target not-target)) ;; Is it a fixnum? - (generate-fixnum-test value) (move rax-tn value) + (inst test al-tn fixnum-tag-mask) (inst jmp :e fixnum) ;; If not, is it an other pointer?