From: Nathan F. <nf...@us...> - 2010-01-06 05:05:53
|
Update of /cvsroot/sbcl/sbcl/src/compiler/x86 In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv8144/src/compiler/x86 Modified Files: type-vops.lisp Log Message: 1.0.34.4: micro-optimize widetag checking on x86oids If we are checking a range of widetags and there are no more widetags to check, we can tweak the widetag and do a single, unsigned comparison. Index: type-vops.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/type-vops.lisp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- type-vops.lisp 5 Jun 2009 11:36:48 -0000 1.23 +++ type-vops.lisp 6 Jan 2010 05:05:44 -0000 1.24 @@ -127,18 +127,28 @@ ;; was true. (return)) (t - (unless (= start bignum-widetag) - (inst cmp al-tn start) - (if (= end complex-array-widetag) - (progn - (aver last) - (inst jmp greater-or-equal target)) - (inst jmp :b when-false))) ; was :l - (unless (= end complex-array-widetag) - (inst cmp al-tn end) - (if last - (inst jmp less-or-equal target) - (inst jmp :be when-true)))))))))))) ; was :le + (cond + ((= start bignum-widetag) + (inst cmp al-tn end) + (if last + (inst jmp less-or-equal target) + (inst jmp :be when-true))) + ((= end complex-array-widetag) + (inst cmp al-tn start) + (if last + (inst jmp greater-or-equal target) + (inst jmp :b when-false))) + ((not last) + (inst cmp al-tn start) + (inst jmp :b when-false) + (inst cmp al-tn end) + (if last + (inst jmp less-or-equal target) + (inst jmp :be when-true))) + (t + (inst sub al-tn start) + (inst cmp al-tn (- end start)) + (inst jmp less-or-equal target)))))))))))) (emit-label drop-through)))) ;;;; type checking and testing |