mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 17:09:37 +01:00
* cmov ref,reg disabled because ref might be never nil
git-svn-id: trunk@1407 -
This commit is contained in:
parent
d8acc80ae5
commit
8b01dce70a
@ -1623,9 +1623,14 @@ procedure PeepHoleOptPass2(asml: taasmoutput; BlockStart, BlockEnd: tai);
|
|||||||
CanBeCMOV:=assigned(p) and (p.typ=ait_instruction) and
|
CanBeCMOV:=assigned(p) and (p.typ=ait_instruction) and
|
||||||
(taicpu(p).opcode=A_MOV) and
|
(taicpu(p).opcode=A_MOV) and
|
||||||
(taicpu(p).opsize in [S_L,S_W]) and
|
(taicpu(p).opsize in [S_L,S_W]) and
|
||||||
((taicpu(p).oper[0]^.typ = top_reg) or
|
((taicpu(p).oper[0]^.typ = top_reg)
|
||||||
((taicpu(p).oper[0]^.typ = top_ref) and
|
{ we can't use cmov ref,reg because
|
||||||
(taicpu(p).oper[0]^.ref^.refaddr = addr_no))) and
|
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]);
|
(taicpu(p).oper[1]^.typ in [top_reg]);
|
||||||
end;
|
end;
|
||||||
{$endif USECMOV}
|
{$endif USECMOV}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user