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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 1033 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
1034 __ mov(kInterpreterDispatchTableRegister, | 1034 __ mov(kInterpreterDispatchTableRegister, |
1035 Operand(ExternalReference::interpreter_dispatch_table_address( | 1035 Operand(ExternalReference::interpreter_dispatch_table_address( |
1036 masm->isolate()))); | 1036 masm->isolate()))); |
1037 | 1037 |
1038 // Dispatch to the first bytecode handler for the function. | 1038 // Dispatch to the first bytecode handler for the function. |
1039 __ ldrb(r1, MemOperand(kInterpreterBytecodeArrayRegister, | 1039 __ ldrb(r1, MemOperand(kInterpreterBytecodeArrayRegister, |
1040 kInterpreterBytecodeOffsetRegister)); | 1040 kInterpreterBytecodeOffsetRegister)); |
1041 __ ldr(ip, MemOperand(kInterpreterDispatchTableRegister, r1, LSL, | 1041 __ ldr(ip, MemOperand(kInterpreterDispatchTableRegister, r1, LSL, |
1042 kPointerSizeLog2)); | 1042 kPointerSizeLog2)); |
1043 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging | |
1044 // and header removal. | |
1045 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
1046 __ Call(ip); | 1043 __ Call(ip); |
1047 | 1044 |
1048 // Even though the first bytecode handler was called, we will never return. | 1045 // Even though the first bytecode handler was called, we will never return. |
1049 __ Abort(kUnexpectedReturnFromBytecodeHandler); | 1046 __ Abort(kUnexpectedReturnFromBytecodeHandler); |
1050 } | 1047 } |
1051 | 1048 |
1052 | 1049 |
1053 void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { | 1050 void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { |
1054 // TODO(rmcilroy): List of things not currently dealt with here but done in | 1051 // TODO(rmcilroy): List of things not currently dealt with here but done in |
1055 // fullcodegen's EmitReturnSequence. | 1052 // fullcodegen's EmitReturnSequence. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 MemOperand( | 1164 MemOperand( |
1168 kInterpreterRegisterFileRegister, | 1165 kInterpreterRegisterFileRegister, |
1169 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); | 1166 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); |
1170 __ SmiUntag(kInterpreterBytecodeOffsetRegister); | 1167 __ SmiUntag(kInterpreterBytecodeOffsetRegister); |
1171 | 1168 |
1172 // Dispatch to the target bytecode. | 1169 // Dispatch to the target bytecode. |
1173 __ ldrb(r1, MemOperand(kInterpreterBytecodeArrayRegister, | 1170 __ ldrb(r1, MemOperand(kInterpreterBytecodeArrayRegister, |
1174 kInterpreterBytecodeOffsetRegister)); | 1171 kInterpreterBytecodeOffsetRegister)); |
1175 __ ldr(ip, MemOperand(kInterpreterDispatchTableRegister, r1, LSL, | 1172 __ ldr(ip, MemOperand(kInterpreterDispatchTableRegister, r1, LSL, |
1176 kPointerSizeLog2)); | 1173 kPointerSizeLog2)); |
1177 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
1178 __ mov(pc, ip); | 1174 __ mov(pc, ip); |
1179 } | 1175 } |
1180 | 1176 |
1181 | 1177 |
1182 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1178 static void Generate_InterpreterNotifyDeoptimizedHelper( |
1183 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1179 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
1184 // Enter an internal frame. | 1180 // Enter an internal frame. |
1185 { | 1181 { |
1186 FrameScope scope(masm, StackFrame::INTERNAL); | 1182 FrameScope scope(masm, StackFrame::INTERNAL); |
1187 | 1183 |
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2620 } | 2616 } |
2621 } | 2617 } |
2622 | 2618 |
2623 | 2619 |
2624 #undef __ | 2620 #undef __ |
2625 | 2621 |
2626 } // namespace internal | 2622 } // namespace internal |
2627 } // namespace v8 | 2623 } // namespace v8 |
2628 | 2624 |
2629 #endif // V8_TARGET_ARCH_ARM | 2625 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |