mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 22:10:42 +02:00
* cleanup
This commit is contained in:
parent
c1d8e32eae
commit
39164ad732
@ -96,30 +96,17 @@ Implementation
|
|||||||
|
|
||||||
p := taicpu(hp);
|
p := taicpu(hp);
|
||||||
case p.opcode of
|
case p.opcode of
|
||||||
{ These operands do not write into a register at all }
|
{ These operations do not write into a register at all
|
||||||
A_CMP, A_CMN, A_TST, A_B, A_BL, A_MSR, A_FCMP:
|
|
||||||
|
LDR/STR with post/pre-indexed operations do not need special treatment
|
||||||
|
because post-/preindexed does not mean that a register
|
||||||
|
is loaded with a new value, it is only modified }
|
||||||
|
A_STR, A_CMP, A_CMN, A_TST, A_B, A_BL, A_MSR, A_FCMP:
|
||||||
exit;
|
exit;
|
||||||
{Take care of post/preincremented store and loads, they will change their base register}
|
|
||||||
A_STR, A_LDR:
|
|
||||||
begin
|
|
||||||
Result := false;
|
|
||||||
{ actually, this does not apply here because post-/preindexed does not mean that a register
|
|
||||||
is loaded with a new value, it is only modified
|
|
||||||
(taicpu(p).oper[1]^.typ=top_ref) and
|
|
||||||
(taicpu(p).oper[1]^.ref^.addressmode in [AM_PREINDEXED,AM_POSTINDEXED]) and
|
|
||||||
(taicpu(p).oper[1]^.ref^.base = reg);
|
|
||||||
}
|
|
||||||
{ STR does not load into it's first register }
|
|
||||||
if p.opcode = A_STR then
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
else
|
else
|
||||||
;
|
;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Result then
|
|
||||||
exit;
|
|
||||||
|
|
||||||
case p.oper[0]^.typ of
|
case p.oper[0]^.typ of
|
||||||
top_reg:
|
top_reg:
|
||||||
Result := (p.oper[0]^.reg = reg);
|
Result := (p.oper[0]^.reg = reg);
|
||||||
|
Loading…
Reference in New Issue
Block a user