mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-08 21:38:45 +02:00
* patch by J. Gareth Moreton: fix for incorrect alignment removal, resolves #37420
git-svn-id: trunk@45864 -
This commit is contained in:
parent
091862cd88
commit
a172064767
@ -1690,12 +1690,16 @@ Unit AoptObj;
|
|||||||
if (hp1.typ=ait_instruction) and (taicpu(hp1).is_jmp) then
|
if (hp1.typ=ait_instruction) and (taicpu(hp1).is_jmp) then
|
||||||
RemoveDelaySlot(hp1);
|
RemoveDelaySlot(hp1);
|
||||||
{$endif cpudelayslot}
|
{$endif cpudelayslot}
|
||||||
if (hp1.typ = ait_align) then
|
hp2 := hp1;
|
||||||
|
while (hp2.typ = ait_align) do
|
||||||
begin
|
begin
|
||||||
{ Only remove the align if a label doesn't immediately follow }
|
{ Only remove the align if a label doesn't immediately follow }
|
||||||
if GetNextInstruction(hp1, hp2) and (hp2.typ = ait_label) then
|
if GetNextInstruction(hp2, hp2) and (hp2.typ = ait_label) then
|
||||||
{ The label is unskippable }
|
{ The label is unskippable }
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
|
{ Check again in case there's more than one adjacent alignment entry
|
||||||
|
(a frequent construct under x86, for example). [Kit] }
|
||||||
end;
|
end;
|
||||||
asml.remove(hp1);
|
asml.remove(hp1);
|
||||||
hp1.free;
|
hp1.free;
|
||||||
|
Loading…
Reference in New Issue
Block a user