From 01cf70d354d119c39857788a68b39c5fd8e821c3 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Tue, 21 Mar 2006 15:25:16 +0000 Subject: [PATCH] * 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 - --- compiler/i386/popt386.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/i386/popt386.pas b/compiler/i386/popt386.pas index 23b8d8e0ec..70bb1bc48e 100644 --- a/compiler/i386/popt386.pas +++ b/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);