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); |