[Mono-dev] Mono AOT for 64-bit Windows
voldemarz
voldemarz at gmail.com
Fri Jun 28 16:32:21 UTC 2013
Below is the message that Gavin Dodd sent me directly because his post seemed
have stuck in approval process (mistake?). Added it for reference.
Gavin Dodd wrote
> I just dealt with AOT cross compiling from win64 to freebsd/amd64 and had
> something like this
>
> mono_marshal_get_icall_wrapper emits the address of the function to call
> at the time of compilation.
>
> As I was only concerned with AOT I just changed
>
> mono_mb_emit_native_call (mb, csig2, (gpointer) func);
> to
> mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
> mono_mb_emit_op (mb, CEE_MONO_ICALL, func);
>
>
> I'm sure there was another case that also emitted the wrong address in the
> same way but can't find it at the moment.
>
> Another issue that probably doesn't apply to you, but caused huge
> problems, was alignment of data structures between different compilers.
> The mono vm compiled on freebsd had different alignment for bitfields than
> the compiler built with msvc.
Regarding my issue. I tracked down that mono_method_to_ir() was emitting IR
with EMIT_NEW_PCONST which is not AOT compatible. I can see that newest
source in is using EMIT_NEW_AOTCONST.
I was using 3.0.6 tarball release, didn't use the newest one cause at the
point when I started messing with this there were some troubles compiling. I
guess now I should really try to use more up to date source..
--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-AOT-for-64-bit-Windows-tp4659926p4660058.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list