6984056: C1: incorrect code for integer constant addition on x64

Fix add/sub of constants to ints on x64

Reviewed-by: kvn
This commit is contained in:
Igor Veresov 2010-09-11 15:21:37 -07:00
parent af2548723c
commit 0aba89442c

View File

@ -2066,11 +2066,11 @@ void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
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();