[Mono-bugs] [Bug 31673][Nor] New - shl opcode behaviour

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
3 Oct 2002 08:32:24 -0000

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 lupus@ximian.com.


--- shadow/31673	Thu Oct  3 04:32:24 2002
+++ shadow/31673.tmp.7157	Thu Oct  3 04:32:24 2002
@@ -0,0 +1,26 @@
+Bug#: 31673
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: shl opcode behaviour
+With code like:
+                static int many_shifts (int a, int b, int c) {
+                        return a << b << c << 1;
+                }
+mcs generates different code than csc.
+csc ANDs the right operand with 0x1f (I guess because shl has undefined
+behaviour with larger operands and maybe somewhere the C# spec specifies
+predictable results).