1.1 --- a/src/share/vm/c1/c1_LIRGenerator.cpp Wed May 27 13:20:53 2015 -0700 1.2 +++ b/src/share/vm/c1/c1_LIRGenerator.cpp Thu May 28 20:52:47 2015 -0700 1.3 @@ -2189,7 +2189,15 @@ 1.4 if (log2_scale != 0) { 1.5 // temporary fix (platform dependent code without shift on Intel would be better) 1.6 // TODO: ARM also allows embedded shift in the address 1.7 - __ shift_left(index_op, log2_scale, index_op); 1.8 + LIR_Opr tmp = new_pointer_register(); 1.9 + if (TwoOperandLIRForm) { 1.10 + __ move(index_op, tmp); 1.11 + index_op = tmp; 1.12 + } 1.13 + __ shift_left(index_op, log2_scale, tmp); 1.14 + if (!TwoOperandLIRForm) { 1.15 + index_op = tmp; 1.16 + } 1.17 } 1.18 1.19 LIR_Address* addr = new LIR_Address(base_op, index_op, x->basic_type());