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/compilation-info.h" | 8 #include "src/compilation-info.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 __ cmp(cp, kScratchReg); | 672 __ cmp(cp, kScratchReg); |
673 __ Assert(eq, kWrongFunctionContext); | 673 __ Assert(eq, kWrongFunctionContext); |
674 } | 674 } |
675 __ ldr(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 675 __ ldr(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
676 __ Call(ip); | 676 __ Call(ip); |
677 RecordCallPosition(instr); | 677 RecordCallPosition(instr); |
678 DCHECK_EQ(LeaveCC, i.OutputSBit()); | 678 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
679 frame_access_state()->ClearSPDelta(); | 679 frame_access_state()->ClearSPDelta(); |
680 break; | 680 break; |
681 } | 681 } |
682 case kArchTailCallJSFunctionFromJSFunction: | 682 case kArchTailCallJSFunctionFromJSFunction: { |
683 case kArchTailCallJSFunction: { | |
684 Register func = i.InputRegister(0); | 683 Register func = i.InputRegister(0); |
685 if (FLAG_debug_code) { | 684 if (FLAG_debug_code) { |
686 // Check the function's context matches the context argument. | 685 // Check the function's context matches the context argument. |
687 __ ldr(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset)); | 686 __ ldr(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset)); |
688 __ cmp(cp, kScratchReg); | 687 __ cmp(cp, kScratchReg); |
689 __ Assert(eq, kWrongFunctionContext); | 688 __ Assert(eq, kWrongFunctionContext); |
690 } | 689 } |
691 if (arch_opcode == kArchTailCallJSFunctionFromJSFunction) { | 690 AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, |
692 AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, | 691 i.TempRegister(0), i.TempRegister(1), |
693 i.TempRegister(0), i.TempRegister(1), | 692 i.TempRegister(2)); |
694 i.TempRegister(2)); | |
695 } | |
696 __ ldr(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 693 __ ldr(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
697 __ Jump(ip); | 694 __ Jump(ip); |
698 DCHECK_EQ(LeaveCC, i.OutputSBit()); | 695 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
699 frame_access_state()->ClearSPDelta(); | 696 frame_access_state()->ClearSPDelta(); |
700 frame_access_state()->SetFrameAccessToDefault(); | 697 frame_access_state()->SetFrameAccessToDefault(); |
701 break; | 698 break; |
702 } | 699 } |
703 case kArchPrepareCallCFunction: { | 700 case kArchPrepareCallCFunction: { |
704 int const num_parameters = MiscField::decode(instr->opcode()); | 701 int const num_parameters = MiscField::decode(instr->opcode()); |
705 __ PrepareCallCFunction(num_parameters, kScratchReg); | 702 __ PrepareCallCFunction(num_parameters, kScratchReg); |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1994 padding_size -= v8::internal::Assembler::kInstrSize; | 1991 padding_size -= v8::internal::Assembler::kInstrSize; |
1995 } | 1992 } |
1996 } | 1993 } |
1997 } | 1994 } |
1998 | 1995 |
1999 #undef __ | 1996 #undef __ |
2000 | 1997 |
2001 } // namespace compiler | 1998 } // namespace compiler |
2002 } // namespace internal | 1999 } // namespace internal |
2003 } // namespace v8 | 2000 } // namespace v8 |
OLD | NEW |