| Index: src/compiler/mips64/code-generator-mips64.cc
|
| diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc
|
| index 8e94ceed2126841ab08b5e5897ccb4621b2be0c9..39dfd4377290068682a4326d9bcf0e13c6d73b82 100644
|
| --- a/src/compiler/mips64/code-generator-mips64.cc
|
| +++ b/src/compiler/mips64/code-generator-mips64.cc
|
| @@ -1154,6 +1154,22 @@ void CodeGenerator::AssemblePrologue() {
|
| StandardFrameConstants::kFixedFrameSizeFromFp);
|
| }
|
| int stack_slots = frame()->GetSpillSlotCount();
|
| +
|
| + if (info()->is_osr()) {
|
| + // TurboFan OSR-compiled functions cannot be entered directly.
|
| + // TODO(titzer): put an abort into the header of OSR functions on mips64.
|
| +
|
| + // Unoptimized code jumps directly to this entrypoint while the unoptimized
|
| + // frame is still on the stack. Optimized code uses OSR values directly from
|
| + // the unoptimized frame. Thus, all that needs to be done is to allocate the
|
| + // remaining stack slots.
|
| + if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --");
|
| + osr_pc_offset_ = __ pc_offset();
|
| + size_t unoptimized_slots = OsrHelper(info()).UnoptimizedFrameSlots();
|
| + DCHECK(stack_slots >= static_cast<int>(unoptimized_slots));
|
| + stack_slots -= unoptimized_slots;
|
| + }
|
| +
|
| if (stack_slots > 0) {
|
| __ Dsubu(sp, sp, Operand(stack_slots * kPointerSize));
|
| }
|
|
|