| 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 } | 644 } |
| 645 | 645 |
| 646 | 646 |
| 647 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { | 647 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { |
| 648 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); | 648 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); |
| 649 if (sp_slot_delta < 0) { | 649 if (sp_slot_delta < 0) { |
| 650 __ Add(sp, sp, sp_slot_delta * kPointerSize, r0); | 650 __ Add(sp, sp, sp_slot_delta * kPointerSize, r0); |
| 651 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); | 651 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); |
| 652 } | 652 } |
| 653 if (frame()->needs_frame()) { | 653 if (frame()->needs_frame()) { |
| 654 if (FLAG_enable_embedded_constant_pool) { | 654 __ RestoreFrameStateForTailCall(); |
| 655 __ LoadP(kConstantPoolRegister, | |
| 656 MemOperand(fp, StandardFrameConstants::kConstantPoolOffset)); | |
| 657 } | |
| 658 __ LoadP(r0, MemOperand(fp, StandardFrameConstants::kCallerPCOffset)); | |
| 659 __ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
| 660 __ mtlr(r0); | |
| 661 } | 655 } |
| 662 frame_access_state()->SetFrameAccessToSP(); | 656 frame_access_state()->SetFrameAccessToSP(); |
| 663 } | 657 } |
| 664 | 658 |
| 665 | 659 |
| 666 // Assembles an instruction after register allocation, producing machine code. | 660 // Assembles an instruction after register allocation, producing machine code. |
| 667 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { | 661 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
| 668 PPCOperandConverter i(this, instr); | 662 PPCOperandConverter i(this, instr); |
| 669 ArchOpcode opcode = ArchOpcodeField::decode(instr->opcode()); | 663 ArchOpcode opcode = ArchOpcodeField::decode(instr->opcode()); |
| 670 | 664 |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 padding_size -= v8::internal::Assembler::kInstrSize; | 1844 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1851 } | 1845 } |
| 1852 } | 1846 } |
| 1853 } | 1847 } |
| 1854 | 1848 |
| 1855 #undef __ | 1849 #undef __ |
| 1856 | 1850 |
| 1857 } // namespace compiler | 1851 } // namespace compiler |
| 1858 } // namespace internal | 1852 } // namespace internal |
| 1859 } // namespace v8 | 1853 } // namespace v8 |
| OLD | NEW |