| 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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 // - Allow simulator stop operations if FLAG_stop_at is set. | 1052 // - Allow simulator stop operations if FLAG_stop_at is set. |
| 1053 // - Code aging of the BytecodeArray object. | 1053 // - Code aging of the BytecodeArray object. |
| 1054 | 1054 |
| 1055 // Load accumulator, register file, bytecode offset, dispatch table into | 1055 // Load accumulator, register file, bytecode offset, dispatch table into |
| 1056 // registers. | 1056 // registers. |
| 1057 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); | 1057 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
| 1058 __ Add(kInterpreterRegisterFileRegister, fp, | 1058 __ Add(kInterpreterRegisterFileRegister, fp, |
| 1059 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); | 1059 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
| 1060 __ Mov(kInterpreterBytecodeOffsetRegister, | 1060 __ Mov(kInterpreterBytecodeOffsetRegister, |
| 1061 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 1061 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
| 1062 __ LoadRoot(kInterpreterDispatchTableRegister, | 1062 __ Mov(kInterpreterDispatchTableRegister, |
| 1063 Heap::kInterpreterTableRootIndex); | 1063 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1064 __ Add(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, | 1064 masm->isolate()))); |
| 1065 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | |
| 1066 | 1065 |
| 1067 // Dispatch to the first bytecode handler for the function. | 1066 // Dispatch to the first bytecode handler for the function. |
| 1068 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, | 1067 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, |
| 1069 kInterpreterBytecodeOffsetRegister)); | 1068 kInterpreterBytecodeOffsetRegister)); |
| 1070 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); | 1069 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); |
| 1071 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); | 1070 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); |
| 1072 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging | 1071 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging |
| 1073 // and header removal. | 1072 // and header removal. |
| 1074 __ Add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1073 __ Add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 1075 __ Call(ip0); | 1074 __ Call(ip0); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1096 BytecodeArray::kParameterSizeOffset)); | 1095 BytecodeArray::kParameterSizeOffset)); |
| 1097 __ Drop(x1, 1); | 1096 __ Drop(x1, 1); |
| 1098 __ Ret(); | 1097 __ Ret(); |
| 1099 } | 1098 } |
| 1100 | 1099 |
| 1101 | 1100 |
| 1102 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { | 1101 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { |
| 1103 // Initialize register file register and dispatch table register. | 1102 // Initialize register file register and dispatch table register. |
| 1104 __ Add(kInterpreterRegisterFileRegister, fp, | 1103 __ Add(kInterpreterRegisterFileRegister, fp, |
| 1105 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); | 1104 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
| 1106 __ LoadRoot(kInterpreterDispatchTableRegister, | 1105 __ Mov(kInterpreterDispatchTableRegister, |
| 1107 Heap::kInterpreterTableRootIndex); | 1106 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1108 __ Add(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, | 1107 masm->isolate()))); |
| 1109 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | |
| 1110 | 1108 |
| 1111 // Get the context from the frame. | 1109 // Get the context from the frame. |
| 1112 __ Ldr(kContextRegister, | 1110 __ Ldr(kContextRegister, |
| 1113 MemOperand(kInterpreterRegisterFileRegister, | 1111 MemOperand(kInterpreterRegisterFileRegister, |
| 1114 InterpreterFrameConstants::kContextFromRegisterPointer)); | 1112 InterpreterFrameConstants::kContextFromRegisterPointer)); |
| 1115 | 1113 |
| 1116 // Get the bytecode array pointer from the frame. | 1114 // Get the bytecode array pointer from the frame. |
| 1117 __ Ldr(x1, | 1115 __ Ldr(x1, |
| 1118 MemOperand(kInterpreterRegisterFileRegister, | 1116 MemOperand(kInterpreterRegisterFileRegister, |
| 1119 InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 1117 InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
| (...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2825 } | 2823 } |
| 2826 } | 2824 } |
| 2827 | 2825 |
| 2828 | 2826 |
| 2829 #undef __ | 2827 #undef __ |
| 2830 | 2828 |
| 2831 } // namespace internal | 2829 } // namespace internal |
| 2832 } // namespace v8 | 2830 } // namespace v8 |
| 2833 | 2831 |
| 2834 #endif // V8_TARGET_ARCH_ARM | 2832 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |