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/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
612 void CodeGenerator::AssembleDeoptimizerCall(int deoptimization_id) { | 612 void CodeGenerator::AssembleDeoptimizerCall(int deoptimization_id) { |
613 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 613 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
614 isolate(), deoptimization_id, Deoptimizer::LAZY); | 614 isolate(), deoptimization_id, Deoptimizer::LAZY); |
615 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 615 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
616 } | 616 } |
617 | 617 |
618 | 618 |
619 void CodeGenerator::AssemblePrologue() { | 619 void CodeGenerator::AssemblePrologue() { |
620 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 620 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
621 if (descriptor->kind() == CallDescriptor::kCallAddress) { | 621 if (descriptor->kind() == CallDescriptor::kCallAddress) { |
622 __ Push(lr, fp); | 622 if (FLAG_enable_ool_constant_pool) { |
ulan
2014/09/04 13:50:10
This matches now what LeaveFrame(StackFrame::MANUA
| |
623 __ mov(fp, sp); | 623 __ Push(lr, fp, pp); |
624 // Adjust FP to point to saved FP. | |
625 __ sub(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset)); | |
626 } else { | |
627 __ Push(lr, fp); | |
628 __ mov(fp, sp); | |
629 } | |
624 const RegList saves = descriptor->CalleeSavedRegisters(); | 630 const RegList saves = descriptor->CalleeSavedRegisters(); |
625 if (saves != 0) { // Save callee-saved registers. | 631 if (saves != 0) { // Save callee-saved registers. |
626 int register_save_area_size = 0; | 632 int register_save_area_size = 0; |
627 for (int i = Register::kNumRegisters - 1; i >= 0; i--) { | 633 for (int i = Register::kNumRegisters - 1; i >= 0; i--) { |
628 if (!((1 << i) & saves)) continue; | 634 if (!((1 << i) & saves)) continue; |
629 register_save_area_size += kPointerSize; | 635 register_save_area_size += kPointerSize; |
630 } | 636 } |
631 frame()->SetRegisterSaveAreaSize(register_save_area_size); | 637 frame()->SetRegisterSaveAreaSize(register_save_area_size); |
632 __ stm(db_w, sp, saves); | 638 __ stm(db_w, sp, saves); |
633 } | 639 } |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
844 | 850 |
845 void CodeGenerator::AddNopForSmiCodeInlining() { | 851 void CodeGenerator::AddNopForSmiCodeInlining() { |
846 // On 32-bit ARM we do not insert nops for inlined Smi code. | 852 // On 32-bit ARM we do not insert nops for inlined Smi code. |
847 } | 853 } |
848 | 854 |
849 #undef __ | 855 #undef __ |
850 | 856 |
851 } // namespace compiler | 857 } // namespace compiler |
852 } // namespace internal | 858 } // namespace internal |
853 } // namespace v8 | 859 } // namespace v8 |
OLD | NEW |