mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 13:28:05 +02:00
* AVR: fix TAoptBaseCpu.RegModifiedByInstruction, resolves #39623
This commit is contained in:
parent
e87c52d7dc
commit
49edb0b606
@ -117,13 +117,22 @@ Implementation
|
||||
i : Longint;
|
||||
begin
|
||||
result:=false;
|
||||
If (p1.typ = ait_instruction) and (taicpu(p1).opcode in [A_MUL,A_MULS,A_FMUL,A_FMULS,A_FMULSU]) and
|
||||
if p1.typ <> ait_instruction then
|
||||
exit;
|
||||
If (taicpu(p1).opcode in [A_MUL,A_MULS,A_FMUL,A_FMULS,A_FMULSU]) and
|
||||
((getsupreg(reg)=RS_R0) or (getsupreg(reg)=RS_R1)) then
|
||||
begin
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
|
||||
If (taicpu(p1).opcode=A_MOVW) and
|
||||
(TRegister(ord(taicpu(p1).oper[0]^.reg)+1)=reg) then
|
||||
begin
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
|
||||
for i:=0 to taicpu(p1).ops-1 do
|
||||
if (taicpu(p1).oper[i]^.typ=top_reg) and (taicpu(p1).oper[i]^.reg=Reg) and (taicpu(p1).spilling_get_operation_type(i) in [operand_write,operand_readwrite]) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user