Micro-optimize machine code for some register tests on x86[-64].
[sbcl.git] / src / compiler / x86 / type-vops.lisp
index af66ab4..38d6adc 100644 (file)
         ;; Get the second digit.
         (loadw eax-tn value (1+ bignum-digits-offset) other-pointer-lowtag)
         ;; All zeros, its an (unsigned-byte 32).
-        (inst or eax-tn eax-tn)
+        (inst test eax-tn eax-tn)
         (inst jmp :z yep)
         (inst jmp nope)
 
 
         ;; positive implies (unsigned-byte 32).
         (emit-label fixnum)
-        (inst or eax-tn eax-tn)
+        (inst test eax-tn eax-tn)
         (inst jmp (if not-p :s :ns) target)
 
         (emit-label not-target)))))
       ;; Get the second digit.
       (loadw eax-tn value (1+ bignum-digits-offset) other-pointer-lowtag)
       ;; All zeros, its an (unsigned-byte 32).
-      (inst or eax-tn eax-tn)
+      (inst test eax-tn eax-tn)
       (inst jmp :z yep)
       (inst jmp nope)
 
 
       ;; positive implies (unsigned-byte 32).
       (emit-label fixnum)
-      (inst or eax-tn eax-tn)
+      (inst test eax-tn eax-tn)
       (inst jmp :s nope)
 
       (emit-label yep)