src/share/vm/c1/c1_LIRGenerator.cpp

changeset 7944
8dddcd728302
parent 7598
ddce0b7cee93
parent 7924
3816de51b5e7
child 7951
8fd636dd1c91
equal deleted inserted replaced
7840:c8082f58a3d6 7944:8dddcd728302
2187 #endif 2187 #endif
2188 2188
2189 if (log2_scale != 0) { 2189 if (log2_scale != 0) {
2190 // temporary fix (platform dependent code without shift on Intel would be better) 2190 // temporary fix (platform dependent code without shift on Intel would be better)
2191 // TODO: ARM also allows embedded shift in the address 2191 // TODO: ARM also allows embedded shift in the address
2192 __ shift_left(index_op, log2_scale, index_op); 2192 LIR_Opr tmp = new_pointer_register();
2193 if (TwoOperandLIRForm) {
2194 __ move(index_op, tmp);
2195 index_op = tmp;
2196 }
2197 __ shift_left(index_op, log2_scale, tmp);
2198 if (!TwoOperandLIRForm) {
2199 index_op = tmp;
2200 }
2193 } 2201 }
2194 2202
2195 LIR_Address* addr = new LIR_Address(base_op, index_op, x->basic_type()); 2203 LIR_Address* addr = new LIR_Address(base_op, index_op, x->basic_type());
2196 #endif // !GENERATE_ADDRESS_IS_PREFERRED 2204 #endif // !GENERATE_ADDRESS_IS_PREFERRED
2197 __ move(value.result(), addr); 2205 __ move(value.result(), addr);

mercurial