[Mono-bugs] [Bug 58138][Nor] New - xsp fails on solaris

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 6 May 2004 11:13:30 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vargaz@freemail.hu.

http://bugzilla.ximian.com/show_bug.cgi?id=58138

--- shadow/58138	2004-05-06 11:13:30.000000000 -0400
+++ shadow/58138.tmp.12616	2004-05-06 11:13:30.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 58138
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vargaz@freemail.hu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: xsp fails on solaris
+
+As reported on m-d-l, xsp does not work on solaris under the JIT.
+The problem is caused by the JIT miscompiling the following code:
+
+using System;
+
+public class Tests {
+
+public static void Main ()
+{
+	checked {
+		long val = 10000;
+		new TimeSpan (val * 10000);
+	}
+}
+}
+
+The problem here is the val * 10000 assignment is compiled to a call,
+and that call overwrites the the %0 register which contains the address
+of the valuetype which needs to be passed to the constructor:
+
+ (outarg (ldaddr regoffset[-0x10(sparc_fp)]))
+ (sparc_outarg_regpair (ldind.i8 regoffset[-0x8(sparc_fp)]))
+ (sparc_outarg_regpair (conv.u8 iconst[10000]))
+ (stind.i8 regoffset[-0x18(sparc_fp)] lcall)
+ (sparc_outarg_regpair (ldind.i8 regoffset[-0x18(sparc_fp)]))
+ voidcall[.ctor]