[Mono-dev] ilasm on Linux/SPARC64 and Linux/PowerPC

Thierry Lafage thierry.lafage at inria.fr
Fri Mar 12 11:19:14 EST 2010


I reproduced the same problem on a Linux/PowerPC box.

Thierry Lafage.



Thierry Lafage a écrit :
> Hi,
>
> I successfully compiled and installed Mono (2.6.1+patch for Sparc from 
> https://bugzilla.novell.com/show_bug.cgi?id=566298 configured with 
> --disable-parallel-mark) on my SPARC/Linux box, but I am in trouble 
> with ilasm. When trying to assemble the following simple file:
>
>     .method private static void 'foo' () cil managed
>     {
>         ldc.r8  float64(0x41dfffffffc00000)    /* 2.147483647e+9 */
>         pop
>         ret
>     }
>
> it says:
>
>     $ ilasm /dll /output:foo.o foo.s
>     Assembling 'foo.s' , no listing file, to dll --> 'foo.o'
>
>     foo.s (3, 37):
>     Unhandled Exception: System.ArgumentException: Destination array
>     is not long enough to copy all the items in the collection. Check
>     array index and length.
>       at System.BitConverter.PutBytes (System.Byte* dst, System.Byte[]
>     src, Int32 start_index, Int32 count) [0x00000] in <filename unknown>:0
>       at System.BitConverter.ToDouble (System.Byte[] value, Int32
>     startIndex) [0x00000] in <filename unknown>:0
>       at Mono.ILASM.ILParser.yyparse (yyInput yyLex) [0x00000] in
>     <filename unknown>:0
>       at Mono.ILASM.ILParser.yyparse (yyInput yyLex, System.Object
>     yyd) [0x00000] in <filename unknown>:0
>       at Mono.ILASM.Driver+DriverMain.ProcessFile (System.String
>     file_path) [0x00000] in <filename unknown>:0
>
> It seems that SystemToDouble() does not manage to convert the constant 
> because its byte[] parameter is not long enough (should be 8, but ...?).
> I suspect something's wrong in ilasm build (perhaps jay?), but I don't 
> know what.
> Note that I need a 32-bit build, even if the SPARC processor is 64 
> bit; but I think it is the default behavior...
> Also, ilasm accepts "ldc.r8 2147483647", but my CIL assembly code is 
> generated (from C code by gcc4cli) and I would prefer not modifying it 
> (I don't know if I would be authorized to do so).
>
> Thanks in advance for any help,
> Thierry Lafage.
>   
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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