[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Building luaffifb with MSVC
- From: Thomas Buergel <Thomas.Buergel@...>
- Date: Thu, 15 Feb 2018 06:40:37 +0000
> Looks like there was a bug in luaffi when passing parameters to
> functions on the stack on x86-64 platform. I have not found definitive
> documentation clarifying this (if anyone can provide a reference that
> would be very helpful) but it seems that stack arguments must be at 8
> byte boundaries.
The two dominant x86-64 calling conventions in an overview:
https://en.wikipedia.org/wiki/X86_calling_conventions#x86-64_calling_conventions
For once, the one used on Windows is simpler:
https://docs.microsoft.com/en-us/cpp/build/calling-convention
Especially varargs can be a challenge on the SysV x86-64 ABI:
https://blog.nelhage.com/2010/10/amd64-and-va_arg/