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

Sat, 11 Sep 2010 15:21:37 -0700

author
iveresov
date
Sat, 11 Sep 2010 15:21:37 -0700
changeset 2145
7f9553bedfd5
parent 2144
a83b0246bb77
child 2146
3a294e483abc

6984056: C1: incorrect code for integer constant addition on x64
Summary: Fix add/sub of constants to ints on x64
Reviewed-by: kvn

src/cpu/x86/vm/c1_LIRAssembler_x86.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Thu Sep 09 05:24:11 2010 -0700
     1.2 +++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Sat Sep 11 15:21:37 2010 -0700
     1.3 @@ -2066,11 +2066,11 @@
     1.4        jint c = right->as_constant_ptr()->as_jint();
     1.5        switch (code) {
     1.6          case lir_add: {
     1.7 -          __ increment(lreg, c);
     1.8 +          __ incrementl(lreg, c);
     1.9            break;
    1.10          }
    1.11          case lir_sub: {
    1.12 -          __ decrement(lreg, c);
    1.13 +          __ decrementl(lreg, c);
    1.14            break;
    1.15          }
    1.16          default: ShouldNotReachHere();

mercurial