* cmov ref,reg disabled because ref might be never nil

git-svn-id: trunk@1407 -
This commit is contained in:
florian 2005-10-16 12:25:58 +00:00
parent d8acc80ae5
commit 8b01dce70a

View File

@ -1623,9 +1623,14 @@ procedure PeepHoleOptPass2(asml: taasmoutput; BlockStart, BlockEnd: tai);
CanBeCMOV:=assigned(p) and (p.typ=ait_instruction) and
(taicpu(p).opcode=A_MOV) and
(taicpu(p).opsize in [S_L,S_W]) and
((taicpu(p).oper[0]^.typ = top_reg) or
((taicpu(p).oper[0]^.typ = top_ref) and
(taicpu(p).oper[0]^.ref^.refaddr = addr_no))) and
((taicpu(p).oper[0]^.typ = top_reg)
{ we can't use cmov ref,reg because
ref could be nil and cmov still throws an exception
if ref=nil but the mov isn't done (FK)
or ((taicpu(p).oper[0]^.typ = top_ref) and
(taicpu(p).oper[0]^.ref^.refaddr = addr_no))
}
) and
(taicpu(p).oper[1]^.typ in [top_reg]);
end;
{$endif USECMOV}