diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-04-29 22:27:00 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-04-29 22:27:00 +0000 |
commit | 0dee786d4c542bb4427b12dcff2eef924a2a441e (patch) | |
tree | ef384d859076bd53c53e1d1ceff67f869c530758 | |
parent | d993b358d7691ee07f4245cdace5089a497992fe (diff) | |
download | fpc-0dee786d4c542bb4427b12dcff2eef924a2a441e.tar.gz |
* i386 version of fix from r21113
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@21127 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | compiler/i386/popt386.pas | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/compiler/i386/popt386.pas b/compiler/i386/popt386.pas index a7bbfe0434..41ee651b1a 100644 --- a/compiler/i386/popt386.pas +++ b/compiler/i386/popt386.pas @@ -637,12 +637,20 @@ begin because it can never be executed} if (taicpu(p).opcode = A_JMP) then begin - while GetNextInstruction(p, hp1) and + hp2:=p; + while GetNextInstruction(hp2, hp1) and (hp1.typ <> ait_label) do if not(hp1.typ in ([ait_label,ait_align]+skipinstr)) then begin - asml.remove(hp1); - hp1.free; + { don't kill start/end of assembler block, + no-line-info-start/end etc } + if hp1.typ<>ait_marker then + begin + asml.remove(hp1); + hp1.free; + end + else + hp2:=hp1; end else break; end; |