From: Nathan Froyd Date: Sun, 18 Apr 2010 20:20:16 +0000 (+0000) Subject: 1.0.37.59: micro-optimize x86oid signed-word checking X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=2936871808ba75ff33a6c199c23985373e5735ac;p=sbcl.git 1.0.37.59: micro-optimize x86oid signed-word checking Combine MOV/CMP by using CMP with a memory operand. Saves a byte. --- diff --git a/src/compiler/x86-64/type-vops.lisp b/src/compiler/x86-64/type-vops.lisp index 0735c08..58e8854 100644 --- a/src/compiler/x86-64/type-vops.lisp +++ b/src/compiler/x86-64/type-vops.lisp @@ -238,8 +238,8 @@ (inst and al-tn lowtag-mask) (inst cmp al-tn other-pointer-lowtag) (inst jmp :ne nope) - (loadw rax-tn value 0 other-pointer-lowtag) - (inst cmp rax-tn (+ (ash 1 n-widetag-bits) bignum-widetag)) + (inst cmp (make-ea-for-object-slot value 0 other-pointer-lowtag) + (+ (ash 1 n-widetag-bits) bignum-widetag)) (inst jmp (if not-p :ne :e) target)) NOT-TARGET)) @@ -254,8 +254,8 @@ (inst and al-tn lowtag-mask) (inst cmp al-tn other-pointer-lowtag) (inst jmp :ne nope) - (loadw rax-tn value 0 other-pointer-lowtag) - (inst cmp rax-tn (+ (ash 1 n-widetag-bits) bignum-widetag)) + (inst cmp (make-ea-for-object-slot value 0 other-pointer-lowtag) + (+ (ash 1 n-widetag-bits) bignum-widetag)) (inst jmp :ne nope)) YEP (move result value))) diff --git a/src/compiler/x86/type-vops.lisp b/src/compiler/x86/type-vops.lisp index a8efea6..af66ab4 100644 --- a/src/compiler/x86/type-vops.lisp +++ b/src/compiler/x86/type-vops.lisp @@ -257,8 +257,8 @@ :disp (- other-pointer-lowtag))) (inst test al-tn lowtag-mask) (inst jmp :ne nope) - (loadw eax-tn value 0 other-pointer-lowtag) - (inst cmp eax-tn (+ (ash 1 n-widetag-bits) bignum-widetag)) + (inst cmp (make-ea-for-object-slot value 0 other-pointer-lowtag) + (+ (ash 1 n-widetag-bits) bignum-widetag)) (inst jmp (if not-p :ne :e) target)) NOT-TARGET)) @@ -273,8 +273,8 @@ :disp (- other-pointer-lowtag))) (inst test al-tn lowtag-mask) (inst jmp :ne nope) - (loadw eax-tn value 0 other-pointer-lowtag) - (inst cmp eax-tn (+ (ash 1 n-widetag-bits) bignum-widetag)) + (inst cmp (make-ea-for-object-slot value 0 other-pointer-lowtag) + (+ (ash 1 n-widetag-bits) bignum-widetag)) (inst jmp :ne nope)) YEP (move result value))) diff --git a/version.lisp-expr b/version.lisp-expr index c2d58bf..9d4f74e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.37.58" +"1.0.37.59"