| 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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 __ li(kInterpreterDispatchTableRegister, | 1012 __ li(kInterpreterDispatchTableRegister, |
| 1013 Operand(ExternalReference::interpreter_dispatch_table_address( | 1013 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1014 masm->isolate()))); | 1014 masm->isolate()))); |
| 1015 | 1015 |
| 1016 // Dispatch to the first bytecode handler for the function. | 1016 // Dispatch to the first bytecode handler for the function. |
| 1017 __ Daddu(a0, kInterpreterBytecodeArrayRegister, | 1017 __ Daddu(a0, kInterpreterBytecodeArrayRegister, |
| 1018 kInterpreterBytecodeOffsetRegister); | 1018 kInterpreterBytecodeOffsetRegister); |
| 1019 __ lbu(a0, MemOperand(a0)); | 1019 __ lbu(a0, MemOperand(a0)); |
| 1020 __ Dlsa(at, kInterpreterDispatchTableRegister, a0, kPointerSizeLog2); | 1020 __ Dlsa(at, kInterpreterDispatchTableRegister, a0, kPointerSizeLog2); |
| 1021 __ ld(at, MemOperand(at)); | 1021 __ ld(at, MemOperand(at)); |
| 1022 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging | |
| 1023 // and header removal. | |
| 1024 __ Daddu(at, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
| 1025 __ Call(at); | 1022 __ Call(at); |
| 1026 | 1023 |
| 1027 // Even though the first bytecode handler was called, we will never return. | 1024 // Even though the first bytecode handler was called, we will never return. |
| 1028 __ Abort(kUnexpectedReturnFromBytecodeHandler); | 1025 __ Abort(kUnexpectedReturnFromBytecodeHandler); |
| 1029 | 1026 |
| 1030 // Load debug copy of the bytecode array. | 1027 // Load debug copy of the bytecode array. |
| 1031 __ bind(&load_debug_bytecode_array); | 1028 __ bind(&load_debug_bytecode_array); |
| 1032 __ ld(kInterpreterBytecodeArrayRegister, | 1029 __ ld(kInterpreterBytecodeArrayRegister, |
| 1033 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex)); | 1030 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex)); |
| 1034 __ Branch(&bytecode_array_loaded); | 1031 __ Branch(&bytecode_array_loaded); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 kInterpreterRegisterFileRegister, | 1151 kInterpreterRegisterFileRegister, |
| 1155 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); | 1152 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); |
| 1156 __ SmiUntag(kInterpreterBytecodeOffsetRegister); | 1153 __ SmiUntag(kInterpreterBytecodeOffsetRegister); |
| 1157 | 1154 |
| 1158 // Dispatch to the target bytecode. | 1155 // Dispatch to the target bytecode. |
| 1159 __ Daddu(a1, kInterpreterBytecodeArrayRegister, | 1156 __ Daddu(a1, kInterpreterBytecodeArrayRegister, |
| 1160 kInterpreterBytecodeOffsetRegister); | 1157 kInterpreterBytecodeOffsetRegister); |
| 1161 __ lbu(a1, MemOperand(a1)); | 1158 __ lbu(a1, MemOperand(a1)); |
| 1162 __ Dlsa(a1, kInterpreterDispatchTableRegister, a1, kPointerSizeLog2); | 1159 __ Dlsa(a1, kInterpreterDispatchTableRegister, a1, kPointerSizeLog2); |
| 1163 __ ld(a1, MemOperand(a1)); | 1160 __ ld(a1, MemOperand(a1)); |
| 1164 __ Daddu(a1, a1, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
| 1165 __ Jump(a1); | 1161 __ Jump(a1); |
| 1166 } | 1162 } |
| 1167 | 1163 |
| 1168 | 1164 |
| 1169 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1165 static void Generate_InterpreterNotifyDeoptimizedHelper( |
| 1170 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1166 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
| 1171 // Enter an internal frame. | 1167 // Enter an internal frame. |
| 1172 { | 1168 { |
| 1173 FrameScope scope(masm, StackFrame::INTERNAL); | 1169 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1174 | 1170 |
| (...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2699 } | 2695 } |
| 2700 } | 2696 } |
| 2701 | 2697 |
| 2702 | 2698 |
| 2703 #undef __ | 2699 #undef __ |
| 2704 | 2700 |
| 2705 } // namespace internal | 2701 } // namespace internal |
| 2706 } // namespace v8 | 2702 } // namespace v8 |
| 2707 | 2703 |
| 2708 #endif // V8_TARGET_ARCH_MIPS64 | 2704 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |