X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fpred.lisp;h=e83f65f12c3e50f31dd55e22f2dad4a03e41fe5f;hb=6bbc22725d3bf663726ed9adca544e39316364a6;hp=a72055931a2f445dec97d322dbc7806ef1aba0b1;hpb=5a465889bcae1c47eb02dd024250b5a32b8118b2;p=sbcl.git diff --git a/src/compiler/x86/pred.lisp b/src/compiler/x86/pred.lisp index a720559..e83f65f 100644 --- a/src/compiler/x86/pred.lisp +++ b/src/compiler/x86/pred.lisp @@ -42,8 +42,8 @@ (y-val (encode-value-if-immediate y))) (cond ;; Shorter instruction sequences for these two cases. - ((eql 0 y-val) (inst test x x)) - ((eql 0 x-val) (inst test y y)) + ((and (eql 0 y-val) (sc-is x any-reg descriptor-reg)) (inst test x x)) + ((and (eql 0 x-val) (sc-is y any-reg descriptor-reg)) (inst test y y)) ;; An encoded value (literal integer) has to be the second argument. ((sc-is x immediate) (inst cmp y x-val))