[Mono-dev] mono on PPC - casting issue

Taloth Saldono talothsaldono at gmail.com
Fri Sep 16 22:21:26 UTC 2016


Hey M Jam,

I'm not involved in PPC or mono development at all, but I've seen a similar
case over 2 years ago, that was on a Qoriq-based Synology NAS. For that
device it was that the mono jitter emitted powerpc extended 64-bit
instructions which were unsupported by that specific CPU. But of course I
don't know if it's related to your issue, also, there have been changes to
the ppc jitter since then.

Running the mono basic regression tests was particularly telling, you could
see all the specific cases going wrong. (https://github.com/mono/mono/
blob/mono-3.10.0-branch/mono/mini/Makefile.am.in#L438-L458)

The Jitter for PPC is here: https://github.com/mono/
mono/blob/mono-3.10.0-branch/mono/mini/mini-ppc.c
search for OP_FCONV_TO_I4.
But I recommend you get those regression tests compiled first, and then
lookup your CPU datasheet to find out what instruction set it supports.

Cheers,

Taloth


On Fri, Sep 16, 2016 at 11:45 PM, M Jam <mjam.mono at gmail.com> wrote:

> Hi all,
>
> I am trying to get mono working on ppc.
> Apparently, on one else is using it. even debian.
>
> I did a lot of debugging and finally at a point where I know the problem
> is in mono runtime.
> The even generated the CIL code on both x86 and ppc and compared them.
> They are exactly identical.
>
> problem area is as simple as this:
>
> int x = (int) 2.0
> If I print x, I get 0.
>
> other broken things: Also math.ceiling() is broken and may be more are
> broken.
>
>
> At this point, I am not sure what is the best route to debug other than
> disassembling the code for which I need some preparation as I don't has
> 'as' and 'ld' on my ppc platform.
> I need to build them.
>
> In the mean time, if anyone has an advice on debugging this issue, I
> highly appreciate it.
>
> Also, lastly CIL code between a cast of int and uint is
> <       IL_0015:  conv.i4
> ---
> >       IL_0015:  conv.u4
>
> Where is it in the JIT this code gets handled.
>
> Thanks,
> M Jam
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20160917/3fa4b63d/attachment.html>


More information about the Mono-devel-list mailing list