x64: LAddI must use LEAL, not LEAQ

R=danno@chromium.org

Review URL: https://codereview.chromium.org/17448005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2013-06-19 09:36:38 +00:00
parent 1be45275c6
commit 3ca50a576a

View File

@ -1717,10 +1717,11 @@ void LCodeGen::DoAddI(LAddI* instr) {
if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) {
if (right->IsConstantOperand()) {
int32_t offset = ToInteger32(LConstantOperand::cast(right));
__ lea(ToRegister(instr->result()), MemOperand(ToRegister(left), offset));
__ leal(ToRegister(instr->result()),
MemOperand(ToRegister(left), offset));
} else {
Operand address(ToRegister(left), ToRegister(right), times_1, 0);
__ lea(ToRegister(instr->result()), address);
__ leal(ToRegister(instr->result()), address);
}
} else {
if (right->IsConstantOperand()) {