提交 60952a9b 编写于 作者: R roland

8071731: Better scaling for C1

Reviewed-by: kvn, iveresov
上级 86e0ad45
......@@ -2204,7 +2204,15 @@ void LIRGenerator::do_UnsafePutRaw(UnsafePutRaw* x) {
if (log2_scale != 0) {
// temporary fix (platform dependent code without shift on Intel would be better)
// TODO: ARM also allows embedded shift in the address
__ shift_left(index_op, log2_scale, index_op);
LIR_Opr tmp = new_pointer_register();
if (TwoOperandLIRForm) {
__ move(index_op, tmp);
index_op = tmp;
}
__ shift_left(index_op, log2_scale, tmp);
if (!TwoOperandLIRForm) {
index_op = tmp;
}
}
LIR_Address* addr = new LIR_Address(base_op, index_op, x->basic_type());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册