[Mono-dev] [PATCH] Marshaling structs on Winx64
Zoltan Varga
vargaz at gmail.com
Thu Jun 12 08:21:09 EDT 2008
Hi,
- ArgNone /* only in pair_storage */
+ ArgNone, /* only in pair_storage */
+ ArgValuetypeAddrInIReg
} ArgStorage;
- it would look better if ArgNone would be the last entry.
+ load->inst_left = (cfg)->varinfo [vtaddr->inst_c0];;
- there is an extra semicolon at the end
- for the tests: you could use the TestDriver assembly for running the
tests. See
pinvoke2.cs for how it is done.
Other than these, it looks ok to check in.
Zoltan
2008/6/11 Bill Holmes <billholmes54 at gmail.com>:
> 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
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
More information about the Mono-devel-list
mailing list