mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:39:31 +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
|
||||
RemoveDelaySlot(hp1);
|
||||
{$endif cpudelayslot}
|
||||
if (hp1.typ = ait_align) then
|
||||
hp2 := hp1;
|
||||
while (hp2.typ = ait_align) do
|
||||
begin
|
||||
{ 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 }
|
||||
Exit;
|
||||
|
||||
{ Check again in case there's more than one adjacent alignment entry
|
||||
(a frequent construct under x86, for example). [Kit] }
|
||||
end;
|
||||
asml.remove(hp1);
|
||||
hp1.free;
|
||||
|
Loading…
Reference in New Issue
Block a user