<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Benito van der Zander via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Mi., 24. Mai 2023, 13:00:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_4708679732178853499smartTemplate4-template">Hi,<br>
<br>
<blockquote type="cite">It is weird that your code calls setjmp?
Are you using a non Windows platform? Comparisons with Delphi
should be done on Windows where the exception systems match.
Apples to Apples please.
<br>
</blockquote>
<br>
It is FPC on Linux.</div>
<div><br>
</div>
<div>And Delphi 4 on Linux (in WINE)<br></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">As Marco said, please compare using the same *target* platform otherwise you're comparing apples with oranges due to different exception handling mechanisms between Windows and Linux. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<p> </p>
<p>Even if it wants to do the Linux nonsense, FPC could at least
inline fpc_setjmp in fpc_pushexceptaddr to make it only one
function call.</p></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">fpc_setjmp can not be unlined because a) it's an assembly function and b) *relies* on being a separate function. </div><div dir="auto"><br></div><div dir="auto">And fpc_pushexceptaddr not only accesses private state of the system unit, it's also a larger function and thus inlining it would not provide any benefit. Also combining them would not work, because they are for different purposes. </div><div dir="auto"><br></div><div dir="auto">The low level exception handling code is the way it is for reasons.</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>