6984056: C1: incorrect code for integer constant addition on x64
authoriveresov
Sat, 11 Sep 2010 15:21:37 -0700
changeset 6460 6f5143b00f4c
parent 6459 3d75ed40a975
child 6461 cfc616b49f58
6984056: C1: incorrect code for integer constant addition on x64 Summary: Fix add/sub of constants to ints on x64 Reviewed-by: kvn
hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Thu Sep 09 05:24:11 2010 -0700
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Sat Sep 11 15:21:37 2010 -0700
@@ -2066,11 +2066,11 @@
       jint c = right->as_constant_ptr()->as_jint();
       switch (code) {
         case lir_add: {
-          __ increment(lreg, c);
+          __ incrementl(lreg, c);
           break;
         }
         case lir_sub: {
-          __ decrement(lreg, c);
+          __ decrementl(lreg, c);
           break;
         }
         default: ShouldNotReachHere();