| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
| 6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.h" |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \ | 460 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \ |
| 461 __ bind(ool->exit()); \ | 461 __ bind(ool->exit()); \ |
| 462 __ bind(&done); \ | 462 __ bind(&done); \ |
| 463 } while (0) | 463 } while (0) |
| 464 | 464 |
| 465 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { | 465 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { |
| 466 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); | 466 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); |
| 467 if (sp_slot_delta > 0) { | 467 if (sp_slot_delta > 0) { |
| 468 __ addiu(sp, sp, sp_slot_delta * kPointerSize); | 468 __ addiu(sp, sp, sp_slot_delta * kPointerSize); |
| 469 } | 469 } |
| 470 if (frame()->needs_frame()) { | |
| 471 __ Pop(ra, fp); | |
| 472 } | |
| 473 frame_access_state()->SetFrameAccessToDefault(); | 470 frame_access_state()->SetFrameAccessToDefault(); |
| 474 } | 471 } |
| 475 | 472 |
| 476 | 473 |
| 477 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { | 474 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { |
| 478 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); | 475 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); |
| 479 if (sp_slot_delta < 0) { | 476 if (sp_slot_delta < 0) { |
| 480 __ Subu(sp, sp, Operand(-sp_slot_delta * kPointerSize)); | 477 __ Subu(sp, sp, Operand(-sp_slot_delta * kPointerSize)); |
| 481 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); | 478 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); |
| 482 } | 479 } |
| 480 if (frame()->needs_frame()) { |
| 481 __ lw(ra, MemOperand(fp, StandardFrameConstants::kCallerPCOffset)); |
| 482 __ lw(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 483 } |
| 483 frame_access_state()->SetFrameAccessToSP(); | 484 frame_access_state()->SetFrameAccessToSP(); |
| 484 } | 485 } |
| 485 | 486 |
| 486 | 487 |
| 487 // Assembles an instruction after register allocation, producing machine code. | 488 // Assembles an instruction after register allocation, producing machine code. |
| 488 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { | 489 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
| 489 MipsOperandConverter i(this, instr); | 490 MipsOperandConverter i(this, instr); |
| 490 InstructionCode opcode = instr->opcode(); | 491 InstructionCode opcode = instr->opcode(); |
| 491 | 492 |
| 492 switch (ArchOpcodeField::decode(opcode)) { | 493 switch (ArchOpcodeField::decode(opcode)) { |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 padding_size -= v8::internal::Assembler::kInstrSize; | 1638 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1638 } | 1639 } |
| 1639 } | 1640 } |
| 1640 } | 1641 } |
| 1641 | 1642 |
| 1642 #undef __ | 1643 #undef __ |
| 1643 | 1644 |
| 1644 } // namespace compiler | 1645 } // namespace compiler |
| 1645 } // namespace internal | 1646 } // namespace internal |
| 1646 } // namespace v8 | 1647 } // namespace v8 |
| OLD | NEW |