瀏覽代碼

* avoid the AND instruction in the i386 shr64/shl64 code, by using TEST+JZ,
instead of CMP+JL

git-svn-id: trunk@35830 -

nickysn 8 年之前
父節點
當前提交
7e8c89435f
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      compiler/i386/n386mat.pas

+ 2 - 3
compiler/i386/n386mat.pas

@@ -179,9 +179,8 @@ implementation
             { so we've to do some tricks here                           }
             current_asmdata.getjumplabel(l2);
             current_asmdata.getjumplabel(l3);
-            emit_const_reg(A_AND,S_L,63,NR_ECX);
-            emit_const_reg(A_CMP,S_L,32,NR_ECX);
-            cg.a_jmp_flags(current_asmdata.CurrAsmList,F_L,l2);
+            emit_const_reg(A_TEST,S_L,32,NR_ECX);
+            cg.a_jmp_flags(current_asmdata.CurrAsmList,F_E,l2);
             emit_const_reg(A_SUB,S_L,32,NR_ECX);
             if nodetype=shln then
               begin