src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp

changeset 1495
323bd24c6520
parent 1434
708275a44e4a
child 1907
c18cbe5936b8
child 1927
87fc6aca31ab
     1.1 --- a/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Fri Oct 30 16:22:59 2009 -0700
     1.2 +++ b/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Mon Nov 02 11:17:55 2009 +0100
     1.3 @@ -144,17 +144,17 @@
     1.4    if (index->is_register()) {
     1.5      // apply the shift and accumulate the displacement
     1.6      if (shift > 0) {
     1.7 -      LIR_Opr tmp = new_register(T_INT);
     1.8 +      LIR_Opr tmp = new_pointer_register();
     1.9        __ shift_left(index, shift, tmp);
    1.10        index = tmp;
    1.11      }
    1.12      if (disp != 0) {
    1.13 -      LIR_Opr tmp = new_register(T_INT);
    1.14 +      LIR_Opr tmp = new_pointer_register();
    1.15        if (Assembler::is_simm13(disp)) {
    1.16 -        __ add(tmp, LIR_OprFact::intConst(disp), tmp);
    1.17 +        __ add(tmp, LIR_OprFact::intptrConst(disp), tmp);
    1.18          index = tmp;
    1.19        } else {
    1.20 -        __ move(LIR_OprFact::intConst(disp), tmp);
    1.21 +        __ move(LIR_OprFact::intptrConst(disp), tmp);
    1.22          __ add(tmp, index, tmp);
    1.23          index = tmp;
    1.24        }
    1.25 @@ -162,8 +162,8 @@
    1.26      }
    1.27    } else if (disp != 0 && !Assembler::is_simm13(disp)) {
    1.28      // index is illegal so replace it with the displacement loaded into a register
    1.29 -    index = new_register(T_INT);
    1.30 -    __ move(LIR_OprFact::intConst(disp), index);
    1.31 +    index = new_pointer_register();
    1.32 +    __ move(LIR_OprFact::intptrConst(disp), index);
    1.33      disp = 0;
    1.34    }
    1.35  

mercurial