[Mono-dev] [PATCH] Marshaling structs on Winx64
Bill Holmes
billholmes54 at gmail.com
Wed Jun 11 11:41:44 EDT 2008
I have been doing more work with passing arguments to native calls on
Winx64. The attached patch handles the case of an argument that is a
struct that is not able to be passed in a register.
http://msdn.microsoft.com/en-us/library/ms235286(VS.80).aspx
I spoke to some of you about this on IRC. The summary of this
solution is that when one of these structs are identified a local
variable is created and the argument is copied to that local variable.
Then the local variable is passed by reference (address of the
variable) either in a register if available or on the stack.
I have added more unit tests for this as well as cleaned up the tests
some to make the code shorter.
I still believe that there is a problem with native code calling
managed. I will be looking into that soon.
OK to commit? Suggestions? What do I not understand? ;)
fyi. This week I have been looking into SEH on Winx64. I am working
on a patch to add unwind data for each method to register with the
Winx64 function table.
-bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: struct_08_06_11.diff
Type: application/octet-stream
Size: 22417 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080611/d447b4ac/attachment-0001.obj
More information about the Mono-devel-list
mailing list