mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-29 19:41:15 +02:00
* fixed crash when there are two asm blocks right after each other
This commit is contained in:
parent
8cf4da6d5e
commit
64c509adb8
@ -60,19 +60,22 @@ Begin
|
|||||||
PeepHoleOptPass2(AsmL, BlockStart, BlockEnd);
|
PeepHoleOptPass2(AsmL, BlockStart, BlockEnd);
|
||||||
{dispose labeltabel}
|
{dispose labeltabel}
|
||||||
ShutDownDFA;
|
ShutDownDFA;
|
||||||
|
{continue where we left off, BlockEnd is either the start of an assembler
|
||||||
If Assigned(BlockEnd) And
|
block or nil}
|
||||||
GetNextInstruction(BlockEnd, BlockStart) Then
|
BlockStart := BlockEnd;
|
||||||
{we stopped at an assmbler block, so skip it}
|
While Assigned(BlockStart) And
|
||||||
|
(BlockStart^.typ = ait_Marker) And
|
||||||
|
(Pai_Marker(BlockStart)^.Kind = AsmBlockStart) Do
|
||||||
Begin
|
Begin
|
||||||
|
{we stopped at an assembler block, so skip it}
|
||||||
While GetNextInstruction(BlockStart, BlockStart) And
|
While GetNextInstruction(BlockStart, BlockStart) And
|
||||||
((BlockStart^.Typ <> Ait_Marker) Or
|
((BlockStart^.Typ <> Ait_Marker) Or
|
||||||
(Pai_Marker(Blockstart)^.Kind <> AsmBlockEnd)) Do;
|
(Pai_Marker(Blockstart)^.Kind <> AsmBlockEnd)) Do;
|
||||||
If GetNextInstruction(BlockStart, BlockStart) Then
|
If GetNextInstruction(BlockStart, BlockStart) And
|
||||||
BlockEnd := DFAPass1(AsmL, BlockStart)
|
((BlockStart^.typ <> ait_Marker) Or
|
||||||
Else BlockStart := Nil
|
(Pai_Marker(BlockStart)^.Kind <> AsmBlockStart)) Then
|
||||||
|
BlockEnd := DFAPass1(AsmL, BlockStart);
|
||||||
End
|
End
|
||||||
Else BlockStart := Nil;
|
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
@ -80,7 +83,10 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.24 1998-12-29 18:48:23 jonas
|
Revision 1.25 1998-12-29 19:58:27 jonas
|
||||||
|
* fixed crash when there are two asm blocks right after each other
|
||||||
|
|
||||||
|
Revision 1.24 1998/12/29 18:48:23 jonas
|
||||||
+ optimize pascal code surrounding assembler blocks
|
+ optimize pascal code surrounding assembler blocks
|
||||||
|
|
||||||
Revision 1.23 1998/12/11 00:02:43 peter
|
Revision 1.23 1998/12/11 00:02:43 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user