| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. | 1023 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. |
| 1024 // - Allow simulator stop operations if FLAG_stop_at is set. | 1024 // - Allow simulator stop operations if FLAG_stop_at is set. |
| 1025 // - Code aging of the BytecodeArray object. | 1025 // - Code aging of the BytecodeArray object. |
| 1026 | 1026 |
| 1027 // Load bytecode offset and dispatch table into registers. | 1027 // Load bytecode offset and dispatch table into registers. |
| 1028 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); | 1028 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
| 1029 __ Daddu(kInterpreterRegisterFileRegister, fp, | 1029 __ Daddu(kInterpreterRegisterFileRegister, fp, |
| 1030 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); | 1030 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
| 1031 __ li(kInterpreterBytecodeOffsetRegister, | 1031 __ li(kInterpreterBytecodeOffsetRegister, |
| 1032 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 1032 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
| 1033 __ LoadRoot(kInterpreterDispatchTableRegister, | 1033 __ li(kInterpreterDispatchTableRegister, |
| 1034 Heap::kInterpreterTableRootIndex); | 1034 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1035 __ Daddu(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, | 1035 masm->isolate()))); |
| 1036 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | |
| 1037 | 1036 |
| 1038 // Dispatch to the first bytecode handler for the function. | 1037 // Dispatch to the first bytecode handler for the function. |
| 1039 __ Daddu(a0, kInterpreterBytecodeArrayRegister, | 1038 __ Daddu(a0, kInterpreterBytecodeArrayRegister, |
| 1040 kInterpreterBytecodeOffsetRegister); | 1039 kInterpreterBytecodeOffsetRegister); |
| 1041 __ lbu(a0, MemOperand(a0)); | 1040 __ lbu(a0, MemOperand(a0)); |
| 1042 __ Dlsa(at, kInterpreterDispatchTableRegister, a0, kPointerSizeLog2); | 1041 __ Dlsa(at, kInterpreterDispatchTableRegister, a0, kPointerSizeLog2); |
| 1043 __ ld(at, MemOperand(at)); | 1042 __ ld(at, MemOperand(at)); |
| 1044 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging | 1043 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging |
| 1045 // and header removal. | 1044 // and header removal. |
| 1046 __ Daddu(at, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1045 __ Daddu(at, at, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 | 1128 |
| 1130 // Call the constructor with a0, a1, and a3 unmodified. | 1129 // Call the constructor with a0, a1, and a3 unmodified. |
| 1131 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); | 1130 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 1132 } | 1131 } |
| 1133 | 1132 |
| 1134 | 1133 |
| 1135 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { | 1134 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { |
| 1136 // Initialize register file register and dispatch table register. | 1135 // Initialize register file register and dispatch table register. |
| 1137 __ Daddu(kInterpreterRegisterFileRegister, fp, | 1136 __ Daddu(kInterpreterRegisterFileRegister, fp, |
| 1138 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); | 1137 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
| 1139 __ LoadRoot(kInterpreterDispatchTableRegister, | 1138 __ li(kInterpreterDispatchTableRegister, |
| 1140 Heap::kInterpreterTableRootIndex); | 1139 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1141 __ Daddu(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, | 1140 masm->isolate()))); |
| 1142 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | |
| 1143 | 1141 |
| 1144 // Get the context from the frame. | 1142 // Get the context from the frame. |
| 1145 __ ld(kContextRegister, | 1143 __ ld(kContextRegister, |
| 1146 MemOperand(kInterpreterRegisterFileRegister, | 1144 MemOperand(kInterpreterRegisterFileRegister, |
| 1147 InterpreterFrameConstants::kContextFromRegisterPointer)); | 1145 InterpreterFrameConstants::kContextFromRegisterPointer)); |
| 1148 | 1146 |
| 1149 // Get the bytecode array pointer from the frame. | 1147 // Get the bytecode array pointer from the frame. |
| 1150 __ ld(a1, | 1148 __ ld(a1, |
| 1151 MemOperand(kInterpreterRegisterFileRegister, | 1149 MemOperand(kInterpreterRegisterFileRegister, |
| 1152 InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 1150 InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2760 } | 2758 } |
| 2761 } | 2759 } |
| 2762 | 2760 |
| 2763 | 2761 |
| 2764 #undef __ | 2762 #undef __ |
| 2765 | 2763 |
| 2766 } // namespace internal | 2764 } // namespace internal |
| 2767 } // namespace v8 | 2765 } // namespace v8 |
| 2768 | 2766 |
| 2769 #endif // V8_TARGET_ARCH_MIPS64 | 2767 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |