[Mono-dev] Patch for 'thiscall' call convention on windows

Paolo Molaro lupus at ximian.com
Thu Jan 11 13:53:35 EST 2007


On 01/10/07 Argiris Kirtzidis wrote:
> I have attached a patch to 'mono/mini/mini-x86.c' that allows Mono
> JIT to handle ThisCall convention on windows.correctly.
> This allows for interop/pinvoke with visual c++ compiled
> classes/methods. (For GCC cygwin/mingw 'Cdecl' should be used)
> 
> The changes are in effect only on the x86 Windows platform and for
> methods that are marked with 'thiscall'.

I don't like much the pop/push stuff to simulate the call convention.
I understand the changes to properly support it are more involved, but
that's why it hasn't been done yet. Introducing a new opcode like
OP_ECX_THIS should not be too bad, though.
And this codepath needs to be enabled on linux, too.
Thanks.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list