Commit ec9bc794 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[turbofan] Fix kArchTailCallCodeObject on ia32/x64.

Previously these instructions tried to jump to the value at the code entry's
location, rather than jumping to this location. Also adds a test.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29949}
parent 8d2f4553
......@@ -318,7 +318,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
__ jmp(code, RelocInfo::CODE_TARGET);
} else {
Register reg = i.InputRegister(0);
__ jmp(Operand(reg, Code::kHeaderSize - kHeapObjectTag));
__ add(reg, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ jmp(reg);
}
break;
}
......
......@@ -567,8 +567,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
__ jmp(code, RelocInfo::CODE_TARGET);
} else {
Register reg = i.InputRegister(0);
int entry = Code::kHeaderSize - kHeapObjectTag;
__ jmp(Operand(reg, entry));
__ addp(reg, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ jmp(reg);
}
break;
}
......
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