OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 1040 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
1041 __ Mov(kInterpreterDispatchTableRegister, | 1041 __ Mov(kInterpreterDispatchTableRegister, |
1042 Operand(ExternalReference::interpreter_dispatch_table_address( | 1042 Operand(ExternalReference::interpreter_dispatch_table_address( |
1043 masm->isolate()))); | 1043 masm->isolate()))); |
1044 | 1044 |
1045 // Dispatch to the first bytecode handler for the function. | 1045 // Dispatch to the first bytecode handler for the function. |
1046 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, | 1046 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, |
1047 kInterpreterBytecodeOffsetRegister)); | 1047 kInterpreterBytecodeOffsetRegister)); |
1048 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); | 1048 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); |
1049 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); | 1049 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); |
1050 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging | |
1051 // and header removal. | |
1052 __ Add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
1053 __ Call(ip0); | 1050 __ Call(ip0); |
1054 | 1051 |
1055 // Even though the first bytecode handler was called, we will never return. | 1052 // Even though the first bytecode handler was called, we will never return. |
1056 __ Abort(kUnexpectedReturnFromBytecodeHandler); | 1053 __ Abort(kUnexpectedReturnFromBytecodeHandler); |
1057 | 1054 |
1058 // Load debug copy of the bytecode array. | 1055 // Load debug copy of the bytecode array. |
1059 __ Bind(&load_debug_bytecode_array); | 1056 __ Bind(&load_debug_bytecode_array); |
1060 __ Ldr(kInterpreterBytecodeArrayRegister, | 1057 __ Ldr(kInterpreterBytecodeArrayRegister, |
1061 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex)); | 1058 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex)); |
1062 __ B(&bytecode_array_loaded); | 1059 __ B(&bytecode_array_loaded); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 MemOperand( | 1113 MemOperand( |
1117 kInterpreterRegisterFileRegister, | 1114 kInterpreterRegisterFileRegister, |
1118 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); | 1115 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); |
1119 __ SmiUntag(kInterpreterBytecodeOffsetRegister); | 1116 __ SmiUntag(kInterpreterBytecodeOffsetRegister); |
1120 | 1117 |
1121 // Dispatch to the target bytecode. | 1118 // Dispatch to the target bytecode. |
1122 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, | 1119 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, |
1123 kInterpreterBytecodeOffsetRegister)); | 1120 kInterpreterBytecodeOffsetRegister)); |
1124 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); | 1121 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); |
1125 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); | 1122 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); |
1126 __ Add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
1127 __ Jump(ip0); | 1123 __ Jump(ip0); |
1128 } | 1124 } |
1129 | 1125 |
1130 | 1126 |
1131 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1127 static void Generate_InterpreterNotifyDeoptimizedHelper( |
1132 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1128 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
1133 // Enter an internal frame. | 1129 // Enter an internal frame. |
1134 { | 1130 { |
1135 FrameScope scope(masm, StackFrame::INTERNAL); | 1131 FrameScope scope(masm, StackFrame::INTERNAL); |
1136 | 1132 |
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2758 } | 2754 } |
2759 } | 2755 } |
2760 | 2756 |
2761 | 2757 |
2762 #undef __ | 2758 #undef __ |
2763 | 2759 |
2764 } // namespace internal | 2760 } // namespace internal |
2765 } // namespace v8 | 2761 } // namespace v8 |
2766 | 2762 |
2767 #endif // V8_TARGET_ARCH_ARM | 2763 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |