[fpc-devel] Internal jump instructions for longer conditional jumps

Martin fpc at mfriebe.de
Mon Apr 20 16:44:42 CEST 2020


FPC sometimes generates jump instructions as follows. (Not always bound 
to "IF" but that is the example I found

IF something then begin {long code} end;

The conditional asm jump does not jump all the way to the code after the 
"end".
Instead it points to an unconditional jump, that (according to line 
info) is at the end of some other line.

Such "jump pads" (?) seem common (gdb seems to know about them).

I try to detect them in fpDebug.
Which assumptions are reasonable?

- How long can a series of such "jump forwarders" be.
   Can the unconditional jump, go to another unconditional jump, before 
eventually hitting the line that the pascal code would go to?
   How many to expect max, before getting suspicious?

- If such jumps are within line info, they should not be at the start of 
a line?


More information about the fpc-devel mailing list