| 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \ | 459 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \ |
| 460 __ bind(ool->exit()); \ | 460 __ bind(ool->exit()); \ |
| 461 __ bind(&done); \ | 461 __ bind(&done); \ |
| 462 } while (0) | 462 } while (0) |
| 463 | 463 |
| 464 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { | 464 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { |
| 465 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); | 465 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); |
| 466 if (sp_slot_delta > 0) { | 466 if (sp_slot_delta > 0) { |
| 467 __ daddiu(sp, sp, sp_slot_delta * kPointerSize); | 467 __ daddiu(sp, sp, sp_slot_delta * kPointerSize); |
| 468 } | 468 } |
| 469 if (frame()->needs_frame()) { | |
| 470 __ Pop(ra, fp); | |
| 471 } | |
| 472 frame_access_state()->SetFrameAccessToDefault(); | 469 frame_access_state()->SetFrameAccessToDefault(); |
| 473 } | 470 } |
| 474 | 471 |
| 475 | 472 |
| 476 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { | 473 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { |
| 477 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); | 474 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); |
| 478 if (sp_slot_delta < 0) { | 475 if (sp_slot_delta < 0) { |
| 479 __ Dsubu(sp, sp, Operand(-sp_slot_delta * kPointerSize)); | 476 __ Dsubu(sp, sp, Operand(-sp_slot_delta * kPointerSize)); |
| 480 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); | 477 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); |
| 481 } | 478 } |
| 479 if (frame()->needs_frame()) { |
| 480 __ ld(ra, MemOperand(fp, StandardFrameConstants::kCallerPCOffset)); |
| 481 __ ld(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 482 } |
| 482 frame_access_state()->SetFrameAccessToSP(); | 483 frame_access_state()->SetFrameAccessToSP(); |
| 483 } | 484 } |
| 484 | 485 |
| 485 | 486 |
| 486 // Assembles an instruction after register allocation, producing machine code. | 487 // Assembles an instruction after register allocation, producing machine code. |
| 487 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { | 488 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
| 488 MipsOperandConverter i(this, instr); | 489 MipsOperandConverter i(this, instr); |
| 489 InstructionCode opcode = instr->opcode(); | 490 InstructionCode opcode = instr->opcode(); |
| 490 | 491 |
| 491 switch (ArchOpcodeField::decode(opcode)) { | 492 switch (ArchOpcodeField::decode(opcode)) { |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 padding_size -= v8::internal::Assembler::kInstrSize; | 1766 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1766 } | 1767 } |
| 1767 } | 1768 } |
| 1768 } | 1769 } |
| 1769 | 1770 |
| 1770 #undef __ | 1771 #undef __ |
| 1771 | 1772 |
| 1772 } // namespace compiler | 1773 } // namespace compiler |
| 1773 } // namespace internal | 1774 } // namespace internal |
| 1774 } // namespace v8 | 1775 } // namespace v8 |
| OLD | NEW |