[fpc-devel] *** GMX Spamverdacht *** Re: Broken frac functionin FPC3.1.1 / Windows x86_64

Thorsten Engler thorsten.engler at gmx.net
Sun Apr 29 13:44:22 CEST 2018

> From: fpc-devel <fpc-devel-bounces at lists.freepascal.org> On Behalf
> Of J. Gareth Moreton

> For functions with a stack frame, either LEAVE or MOV RSP, RBP; POP
> RBP must precede it.
It's not quite that simple, at least under windows:

But yes, this documents that there can be multiple epilogues, so the additional ret would be fine in this regard.

Following this exact format is required so that the stack unwinder during processing of SEH (structured exception handling) which is performed by the OS can correctly restore the value of non-volatile registers that has been saved on the stack.

Fortunately, as our function in this case doesn't use the stack at all and doesn't contain calls to other functions, this can be skipped.

> So what happens now? Do we submit a patch?
I think Sven Barth was going to fix this up anyway?


More information about the fpc-devel mailing list