Commit 1150cf7f authored by danno's avatar danno Committed by Commit bot

[turbofan] Fix Corrections tankage on x64.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25683}
parent 9ed88f17
......@@ -754,9 +754,14 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
} else if (constant_summand < 0) {
__ subl(i.OutputRegister(), Immediate(-constant_summand));
}
} else if (mode == kMode_MR1 || mode == kMode_M2) {
// Using "addl %r1, %r1" is generally faster than "shll %r1, 1"
__ addl(i.OutputRegister(), i.InputRegister(1));
} else if (mode == kMode_MR1) {
if (i.InputRegister(1).is(i.OutputRegister())) {
__ shll(i.OutputRegister(), Immediate(1));
} else {
__ leal(i.OutputRegister(), i.MemoryOperand());
}
} else if (mode == kMode_M2) {
__ shll(i.OutputRegister(), Immediate(1));
} else if (mode == kMode_M4) {
__ shll(i.OutputRegister(), Immediate(2));
} else if (mode == kMode_M8) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment