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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 int stack_slots = frame()->GetSpillSlotCount(); | 658 int stack_slots = frame()->GetSpillSlotCount(); |
659 if (stack_slots > 0) { | 659 if (stack_slots > 0) { |
660 __ add(sp, sp, Operand(stack_slots * kPointerSize)); | 660 __ add(sp, sp, Operand(stack_slots * kPointerSize)); |
661 } | 661 } |
662 // Restore registers. | 662 // Restore registers. |
663 const RegList saves = descriptor->CalleeSavedRegisters(); | 663 const RegList saves = descriptor->CalleeSavedRegisters(); |
664 if (saves != 0) { | 664 if (saves != 0) { |
665 __ ldm(ia_w, sp, saves); | 665 __ ldm(ia_w, sp, saves); |
666 } | 666 } |
667 } | 667 } |
668 __ mov(sp, fp); | 668 __ LeaveFrame(StackFrame::MANUAL); |
669 __ ldm(ia_w, sp, fp.bit() | lr.bit()); | |
670 __ Ret(); | 669 __ Ret(); |
671 } else { | 670 } else { |
672 __ mov(sp, fp); | 671 __ LeaveFrame(StackFrame::MANUAL); |
673 __ ldm(ia_w, sp, fp.bit() | lr.bit()); | |
674 int pop_count = | 672 int pop_count = |
675 descriptor->IsJSFunctionCall() ? descriptor->ParameterCount() : 0; | 673 descriptor->IsJSFunctionCall() ? descriptor->ParameterCount() : 0; |
676 __ Drop(pop_count); | 674 __ Drop(pop_count); |
677 __ Ret(); | 675 __ Ret(); |
678 } | 676 } |
679 } | 677 } |
680 | 678 |
681 | 679 |
682 void CodeGenerator::AssembleMove(InstructionOperand* source, | 680 void CodeGenerator::AssembleMove(InstructionOperand* source, |
683 InstructionOperand* destination) { | 681 InstructionOperand* destination) { |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 | 827 |
830 void CodeGenerator::AddNopForSmiCodeInlining() { | 828 void CodeGenerator::AddNopForSmiCodeInlining() { |
831 // On 32-bit ARM we do not insert nops for inlined Smi code. | 829 // On 32-bit ARM we do not insert nops for inlined Smi code. |
832 UNREACHABLE(); | 830 UNREACHABLE(); |
833 } | 831 } |
834 | 832 |
835 #undef __ | 833 #undef __ |
836 } | 834 } |
837 } | 835 } |
838 } // namespace v8::internal::compiler | 836 } // namespace v8::internal::compiler |
OLD | NEW |