Commit 94d49b11 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS64: CpuProfiler: fix for CollectDeoptEvents test.

Port a925f3f4

Original commit message:
The same idea as in https://codereview.chromium.org/984893003/

BUG=chromium:452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27139}
parent 9333e7e1
......@@ -303,7 +303,7 @@ bool LCodeGen::GenerateJumpTable() {
Comment(";;; -------------------- Jump table --------------------");
}
Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
Label table_start;
Label table_start, call_deopt_entry;
__ bind(&table_start);
Label needs_frame;
for (int i = 0; i < jump_table_.length(); i++) {
......@@ -314,29 +314,33 @@ bool LCodeGen::GenerateJumpTable() {
__ li(t9, Operand(ExternalReference::ForDeoptEntry(entry)));
if (table_entry->needs_frame) {
DCHECK(!info()->saves_caller_doubles());
if (needs_frame.is_bound()) {
__ Branch(&needs_frame);
Comment(";;; call deopt with frame");
__ MultiPush(cp.bit() | fp.bit() | ra.bit());
__ Call(&needs_frame);
} else {
__ Call(&call_deopt_entry);
}
}
if (needs_frame.is_linked()) {
__ bind(&needs_frame);
__ MultiPush(cp.bit() | fp.bit() | ra.bit());
// This variant of deopt can only be used with stubs. Since we don't
// have a function pointer to install in the stack frame that we're
// building, install a special marker there instead.
DCHECK(info()->IsStub());
__ li(scratch0(), Operand(Smi::FromInt(StackFrame::STUB)));
__ push(scratch0());
__ Daddu(fp, sp,
Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
__ Call(t9);
__ li(at, Operand(Smi::FromInt(StackFrame::STUB)));
__ push(at);
__ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
}
} else {
Comment(";;; call deopt");
__ bind(&call_deopt_entry);
if (info()->saves_caller_doubles()) {
DCHECK(info()->IsStub());
RestoreCallerDoubles();
}
__ Call(t9);
}
}
__ Jump(t9);
__ RecordComment("]");
// The deoptimization jump table is the last part of the instruction
......
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