[MLton] MLton broken FFI on AMD64???

Matthew Fluet matthew.fluet at gmail.com
Sun Feb 6 17:38:12 PST 2011


On Fri, Feb 4, 2011 at 10:01 AM, Matthew Fluet <matthew.fluet at gmail.com> wrote:
> Interestingly, it seems that MacOSX also demands that rax be set to
> the the number of floating point parameters.
>
> It seems that setting rax for every FFI call on AMD64 would be the
> simplest solution.

I committed a patch that always sets %rax to the number of XMMS
registers passed for non-win64 AMD64 platforms; since %rax is caller
save, this doesn't really affect register allocation and just incurs
an immediate->register move instruction.  That solved the issue on
Linux and MacOSX (and presumably on other Unices).



More information about the MLton mailing list