[Mono-dev] Mono:MIPS patch

Csaba Balazs csaba.balazs at researchstudio.at
Wed Mar 26 05:48:36 EDT 2008


Hello,

I am trying to crosscompile the Mono to MIPS (32 bit). I attached a possible
patch for it.

The actual machine:
system type             : ATI XILLEON HDTV SUPERTOLL
cpu model               : MIPS 4KEc V4.8
Linux version           : 2.6.12.6


I used partly Yoichi Nakayama's (Oct 2007) patch and got a lot of help from
Zoltan Varga.

And the current regression test result on this machine (DreamBox 7025):

basic.exe - 100%
basic-long.exe - 100%
basic-float.exe - 80% (Test 'test_0_conv_i', 'test_2_rem', 'test_4_long_cast',
'test_4_single_long_cast', 'test_0_rounding' failed)


The main problem is the endianism. This machine is a little-endian machine, and
the Mono VM is a big-endian.
We can change the "byte-order" at "stmt: OP_OUTARG (lreg)" in the
inssel-mips.brg, but unfortunately, we cannot do this at "stmt: OP_SETRET
(lreg)", because it would change the internal long parameters too.

So, whenever I need a long (lreg - 64 bit) value from a native code, I have to
change it.
And I also found an interesting problem with const and non-const comparison in
C#.

So I can use sockets and collections in C#, but the solution has not been
perfect yet.

I am waiting for remarks, approval or any other idea to solve this
endian-problem easily!

Thank you very much,

Csaba
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-dreambox7025.patch
Type: text/x-patch
Size: 19650 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080326/d2181092/attachment-0001.bin 


More information about the Mono-devel-list mailing list