mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 10:09:17 +02:00
* MIPS peephole: check that operand is present before accessing its fields, also check that it's not a branch target. Mantis #27608.
git-svn-id: trunk@30110 -
This commit is contained in:
parent
a41ff9ac9e
commit
a709a9b637
@ -310,7 +310,9 @@ unit aoptcpu;
|
|||||||
|
|
||||||
function TCpuAsmOptimizer.TryRemoveMovToRefIndex(var p: tai; next: taicpu): boolean;
|
function TCpuAsmOptimizer.TryRemoveMovToRefIndex(var p: tai; next: taicpu): boolean;
|
||||||
begin
|
begin
|
||||||
result:=(next.oper[1]^.typ=top_ref) and
|
result:=(next.ops>1) and
|
||||||
|
(next.oper[1]^.typ=top_ref) and
|
||||||
|
(next.oper[1]^.ref^.refaddr<>addr_full) and
|
||||||
(next.oper[1]^.ref^.base=taicpu(p).oper[0]^.reg) and
|
(next.oper[1]^.ref^.base=taicpu(p).oper[0]^.reg) and
|
||||||
(not RegModifiedBetween(taicpu(p).oper[1]^.reg,p,next)) and
|
(not RegModifiedBetween(taicpu(p).oper[1]^.reg,p,next)) and
|
||||||
Assigned(FindRegDealloc(taicpu(p).oper[0]^.reg,tai(next.next)));
|
Assigned(FindRegDealloc(taicpu(p).oper[0]^.reg,tai(next.next)));
|
||||||
|
Loading…
Reference in New Issue
Block a user