X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Ftype-vops.lisp;h=4b8cd454b9f01ee66040239bbac11dca20cfc0de;hb=a0c5831b3a74118cf41a848300200a1acdb48dcf;hp=6c9e10b35b1437d21e041eeebd55d8de02ee5d07;hpb=dd7e2e75f3e3954809bed15d94522a86525e62b9;p=sbcl.git diff --git a/src/compiler/x86/type-vops.lisp b/src/compiler/x86/type-vops.lisp index 6c9e10b..4b8cd45 100644 --- a/src/compiler/x86/type-vops.lisp +++ b/src/compiler/x86/type-vops.lisp @@ -13,25 +13,8 @@ ;;;; test generation utilities -;;; Emit the most compact form of the test immediate instruction, -;;; using an 8 bit test when the immediate is only 8 bits and the -;;; value is one of the four low registers (eax, ebx, ecx, edx) or the -;;; control stack. (defun generate-fixnum-test (value) - (let ((offset (tn-offset value))) - (cond ((and (sc-is value any-reg descriptor-reg) - (or (= offset eax-offset) (= offset ebx-offset) - (= offset ecx-offset) (= offset edx-offset))) - (inst test (make-random-tn :kind :normal - :sc (sc-or-lose 'byte-reg) - :offset offset) - 3)) - ((sc-is value control-stack) - (inst test (make-ea :byte :base ebp-tn - :disp (- (* (1+ offset) n-word-bytes))) - 3)) - (t - (inst test value 3))))) + (emit-optimized-test-inst value 3)) (defun %test-fixnum (value target not-p) (generate-fixnum-test value)