OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 | 805 |
806 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { | 806 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { |
807 // Initialize register file register and dispatch table register. | 807 // Initialize register file register and dispatch table register. |
808 __ movp(kInterpreterRegisterFileRegister, rbp); | 808 __ movp(kInterpreterRegisterFileRegister, rbp); |
809 __ addp(kInterpreterRegisterFileRegister, | 809 __ addp(kInterpreterRegisterFileRegister, |
810 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); | 810 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
811 __ Move( | 811 __ Move( |
812 kInterpreterDispatchTableRegister, | 812 kInterpreterDispatchTableRegister, |
813 ExternalReference::interpreter_dispatch_table_address(masm->isolate())); | 813 ExternalReference::interpreter_dispatch_table_address(masm->isolate())); |
814 | 814 |
815 // Get the context from the frame. | |
816 __ movp(kContextRegister, | |
817 Operand(kInterpreterRegisterFileRegister, | |
818 InterpreterFrameConstants::kContextFromRegisterPointer)); | |
819 | |
820 // Get the bytecode array pointer from the frame. | 815 // Get the bytecode array pointer from the frame. |
821 __ movp( | 816 __ movp( |
822 kInterpreterBytecodeArrayRegister, | 817 kInterpreterBytecodeArrayRegister, |
823 Operand(kInterpreterRegisterFileRegister, | 818 Operand(kInterpreterRegisterFileRegister, |
824 InterpreterFrameConstants::kBytecodeArrayFromRegisterPointer)); | 819 InterpreterFrameConstants::kBytecodeArrayFromRegisterPointer)); |
825 | 820 |
826 if (FLAG_debug_code) { | 821 if (FLAG_debug_code) { |
827 // Check function data field is actually a BytecodeArray object. | 822 // Check function data field is actually a BytecodeArray object. |
828 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); | 823 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); |
829 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, | 824 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2787 __ ret(0); | 2782 __ ret(0); |
2788 } | 2783 } |
2789 | 2784 |
2790 | 2785 |
2791 #undef __ | 2786 #undef __ |
2792 | 2787 |
2793 } // namespace internal | 2788 } // namespace internal |
2794 } // namespace v8 | 2789 } // namespace v8 |
2795 | 2790 |
2796 #endif // V8_TARGET_ARCH_X64 | 2791 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |