| 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 bce954935015b87b064f298a413020d20150dab9..2cf10a1bbec4d92f0ecea7c2060f0fe6d34e61fa 100644
|
| --- a/src/compiler/mips64/code-generator-mips64.cc
|
| +++ b/src/compiler/mips64/code-generator-mips64.cc
|
| @@ -489,8 +489,6 @@ void CodeGenerator::AssembleDeconstructFrame() {
|
| __ Pop(ra, fp);
|
| }
|
|
|
| -void CodeGenerator::AssembleSetupStackPointer() {}
|
| -
|
| void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
|
| int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta);
|
| if (sp_slot_delta > 0) {
|
| @@ -1894,8 +1892,26 @@ void CodeGenerator::AssembleDeoptimizerCall(
|
| __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY);
|
| }
|
|
|
| +void CodeGenerator::FinishFrame(Frame* frame) {
|
| + CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
|
| +
|
| + const RegList saves_fpu = descriptor->CalleeSavedFPRegisters();
|
| + if (saves_fpu != 0) {
|
| + int count = base::bits::CountPopulation32(saves_fpu);
|
| + DCHECK(kNumCalleeSavedFPU == count);
|
| + frame->AllocateSavedCalleeRegisterSlots(count *
|
| + (kDoubleSize / kPointerSize));
|
| + }
|
| +
|
| + const RegList saves = descriptor->CalleeSavedRegisters();
|
| + if (saves != 0) {
|
| + int count = base::bits::CountPopulation32(saves);
|
| + DCHECK(kNumCalleeSaved == count + 1);
|
| + frame->AllocateSavedCalleeRegisterSlots(count);
|
| + }
|
| +}
|
|
|
| -void CodeGenerator::AssemblePrologue() {
|
| +void CodeGenerator::AssembleConstructFrame() {
|
| CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
|
| if (frame_access_state()->has_frame()) {
|
| if (descriptor->IsCFunctionCall()) {
|
| @@ -1908,7 +1924,8 @@ void CodeGenerator::AssemblePrologue() {
|
| }
|
| }
|
|
|
| - int stack_shrink_slots = frame()->GetSpillSlotCount();
|
| + int shrink_slots = frame()->GetSpillSlotCount();
|
| +
|
| if (info()->is_osr()) {
|
| // TurboFan OSR-compiled functions cannot be entered directly.
|
| __ Abort(kShouldNotDirectlyEnterOsrFunction);
|
| @@ -1919,32 +1936,25 @@ void CodeGenerator::AssemblePrologue() {
|
| // remaining stack slots.
|
| if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --");
|
| osr_pc_offset_ = __ pc_offset();
|
| - stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots();
|
| + shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots();
|
| }
|
|
|
| - if (stack_shrink_slots > 0) {
|
| - __ Dsubu(sp, sp, Operand(stack_shrink_slots * kPointerSize));
|
| + if (shrink_slots > 0) {
|
| + __ Dsubu(sp, sp, Operand(shrink_slots * kPointerSize));
|
| }
|
|
|
| const RegList saves_fpu = descriptor->CalleeSavedFPRegisters();
|
| if (saves_fpu != 0) {
|
| // Save callee-saved FPU registers.
|
| __ MultiPushFPU(saves_fpu);
|
| - int count = base::bits::CountPopulation32(saves_fpu);
|
| - DCHECK(kNumCalleeSavedFPU == count);
|
| - frame()->AllocateSavedCalleeRegisterSlots(count *
|
| - (kDoubleSize / kPointerSize));
|
| + DCHECK(kNumCalleeSavedFPU == base::bits::CountPopulation32(saves_fpu));
|
| }
|
|
|
| const RegList saves = descriptor->CalleeSavedRegisters();
|
| if (saves != 0) {
|
| // Save callee-saved registers.
|
| __ MultiPush(saves);
|
| - // kNumCalleeSaved includes the fp register, but the fp register
|
| - // is saved separately in TF.
|
| - int count = base::bits::CountPopulation32(saves);
|
| - DCHECK(kNumCalleeSaved == count + 1);
|
| - frame()->AllocateSavedCalleeRegisterSlots(count);
|
| + DCHECK(kNumCalleeSaved == base::bits::CountPopulation32(saves) + 1);
|
| }
|
| }
|
|
|
|
|