فهرست منبع

* don't change "mov const,ref; mov ref,reg" into "mov const,reg; mov reg,ref"
if ref depends on reg

git-svn-id: trunk@3002 -

Jonas Maebe 19 سال پیش
والد
کامیت
01cf70d354
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      compiler/i386/popt386.pas

+ 2 - 1
compiler/i386/popt386.pas

@@ -1202,7 +1202,8 @@ begin
                                  (taicpu(hp1).oper[0]^.typ = top_ref) and
                                  (taicpu(hp1).oper[1]^.typ = top_reg) and
                                  (taicpu(p).opsize = taicpu(hp1).opsize) and
-                                 RefsEqual(taicpu(hp1).oper[0]^.ref^,taicpu(p).oper[1]^.ref^) then
+                                 RefsEqual(taicpu(hp1).oper[0]^.ref^,taicpu(p).oper[1]^.ref^) and
+                                 not(reginref(getsupreg(taicpu(hp1).oper[1]^.reg),taicpu(hp1).oper[0]^.ref^)) then
                                 begin
                                   allocregbetween(asml,taicpu(hp1).oper[1]^.reg,p,hp1,usedregs);
                                   taicpu(hp1).loadReg(0,taicpu(hp1).oper[1]^.reg);