[Mono-bugs] [Bug 58633][Maj] New - shift right breakage in the JIT

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 18 May 2004 02:20:53 -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 jackson@ximian.com.

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

--- shadow/58633	2004-05-18 02:20:53.000000000 -0400
+++ shadow/58633.tmp.19137	2004-05-18 02:20:53.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 58633
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: (x-86)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jackson@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: shift right breakage in the JIT
+
+The shift right operator in the JIT is not working correctly. 
+
+From miguel:
+
+using System;
+
+public class X
+{
+        static byte [] buffer = new byte [1];
+        
+        public static void Main()
+        {
+                ulong value = 38654838087;
+                int x = 0;
+                
+                buffer [x] = ((byte)(value >> x));
+                Console.WriteLine ("Should print 71->" + buffer [x]);
+        }
+}
+
+
+Correct output:
+        Should print 71->71
+
+Current output:
+        Should print 71->9
+
+
+Additional Information:
+Commenting out the ifndefs directives for 
+MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS in mini.c and mini-x86.c fix the problem.
+
+This bug prevents ILASM from generating a useable binary.