[fpc-pascal] issue when enabling -O2

Matias Vara matiasevara at gmail.com
Wed Jan 10 18:18:19 CET 2018


2018-01-10 18:03 GMT+01:00 Karoly Balogh (Charlie/SGR) <
charlie at scenergy.dfmk.hu>:

> Hi,
> On Wed, 10 Jan 2018, Matias Vara wrote:
> > Thank you very much Karol, I completly missed this point during the
> > development of my kernel (Or maybe I had in mind sometime ago but I
> > forgot it)It was only when I decided to play with -02 that all these
> > issues arrised.
> BTW, your code (as shown by the parameter passing in your assembler dumps)
> seems to use the Microsoft x64 calling convention, which declares RSI
> value as callee-saved, and then your code overwrites that without saving.
> So the fact that your code overwrites it, could be the culprit. (And then
> the OUTSD instruction also increases RSI by 4, so even if that MOV
> wouldn't be there, you'd still need to save it.)
> Also note that the 64bit x86-64 ABI is very different between Linux and
> Windows, for example.
Thanks, I am going to review all the assembler code.

> BTW, developing a kernel in Pascal is cool... ;)

It is indeed :)


> Charlie
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180110/0eb636df/attachment.html>

More information about the fpc-pascal mailing list