[fpc-pascal] ppc64le ABI problem
Sven Barth
pascaldragon at googlemail.com
Mon Aug 26 14:08:25 CEST 2019
Florian Klämpfl <florian at freepascal.org> schrieb am Mo., 26. Aug. 2019,
14:01:
> Am 26. August 2019 00:59:16 schrieb tobiasgiesen at gmail.com:
>
> > Hello,
> >
> >
> > while examining a crash when running Lazarus on ppc64le, I found the
> > following issue in function calls.
> >
> >
> > Calls to functions with more than eight parameters seem to be
> > implemented differently from how gcc does it in a C program.
> >
> >
> > gcc uses the memory location 96(r1) for the ninth parameter, but FPC
> > uses 112(r1).
> >
> >
> > Therefore, calls to XGetWindowProperty crash. This function has 12
> > parameters. gcc puts the four last ones into 96(r1), 104(r1), 112(r1),
> 120(r1),
> > and FPC into 112(r1), 120(r1), 128(r1), 136(r1).
> >
> >
> > What can be done about this?
>
> Try to change the 48 in fpc/compiler/powerpc64/cpupara.pas line to 32 as a
> temporary test.
>
Line 302 in case anyone is wondering (thankfully that's the only "48" in
that fike (plus its preceeding comment) ^^')
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190826/2a9cb19d/attachment.html>
More information about the fpc-pascal
mailing list