* mini.c: use BIGMUL only if both operands have the same signage.
* iltests.il: Test for bug 60056. (errors related to signage in
BIGMUL).
r=lupus.
svn path=/trunk/mono/; revision=29410
+2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * mini.c: use BIGMUL only if both operands have the same signage.
+ * iltests.il: Test for bug 60056. (errors related to signage in
+ BIGMUL).
+
+ r=lupus.
Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
ldc.i4.1
ret
}
-
+
+ .method public static int32 test_1_bug60056 () {
+ .locals init (int32 m5)
+
+ ldc.i4.m1
+ stloc.0
+
+ ldc.i4.1
+ conv.u8
+
+ ldloc.0
+ conv.i8
+ mul
+
+ ldc.i4.m1
+ conv.i8
+ ceq
+ ret
+ }
}
&& tree->inst_left->inst_left->type == STACK_I4
&& (tree->inst_right->opcode == CEE_CONV_I8
|| tree->inst_right->opcode == CEE_CONV_U8)
- && tree->inst_right->inst_left->type == STACK_I4) {
+ && tree->inst_right->inst_left->type == STACK_I4
+ && tree->inst_left->opcode == tree->inst_right->opcode) {
tree->opcode = (tree->inst_left->opcode == CEE_CONV_I8 ? OP_BIGMUL: OP_BIGMUL_UN);
tree->inst_left = tree->inst_left->inst_left;
tree->inst_right = tree->inst_right->inst_left;