فهرست منبع

* use TEST CL,32 instead of TEST ECX,32 in the beginning of a 64-bit shl/shr
sequence on i386

git-svn-id: trunk@35856 -

nickysn 8 سال پیش
والد
کامیت
af235cae86
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 2
      compiler/i386/cgcpu.pas
  2. 1 1
      compiler/i386/n386mat.pas

+ 2 - 2
compiler/i386/cgcpu.pas

@@ -699,7 +699,7 @@ unit cgcpu;
               { so we've to do some tricks here                           }
               { so we've to do some tricks here                           }
               current_asmdata.getjumplabel(l1);
               current_asmdata.getjumplabel(l1);
               current_asmdata.getjumplabel(l2);
               current_asmdata.getjumplabel(l2);
-              list.Concat(taicpu.op_const_reg(A_TEST,S_L,32,NR_ECX));
+              list.Concat(taicpu.op_const_reg(A_TEST,S_B,32,NR_CL));
               cg.a_jmp_flags(list,F_E,l1);
               cg.a_jmp_flags(list,F_E,l1);
               tmpreg:=cg.getintregister(list,OS_32);
               tmpreg:=cg.getintregister(list,OS_32);
               case op of
               case op of
@@ -832,7 +832,7 @@ unit cgcpu;
               { so we've to do some tricks here                           }
               { so we've to do some tricks here                           }
               current_asmdata.getjumplabel(l1);
               current_asmdata.getjumplabel(l1);
               current_asmdata.getjumplabel(l2);
               current_asmdata.getjumplabel(l2);
-              list.Concat(taicpu.op_const_reg(A_TEST,S_L,32,NR_ECX));
+              list.Concat(taicpu.op_const_reg(A_TEST,S_B,32,NR_CL));
               cg.a_jmp_flags(list,F_E,l1);
               cg.a_jmp_flags(list,F_E,l1);
               case op of
               case op of
                 OP_SHL:
                 OP_SHL:

+ 1 - 1
compiler/i386/n386mat.pas

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