| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 1047 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
| 1048 __ mov(kInterpreterDispatchTableRegister, | 1048 __ mov(kInterpreterDispatchTableRegister, |
| 1049 Operand(ExternalReference::interpreter_dispatch_table_address( | 1049 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1050 masm->isolate()))); | 1050 masm->isolate()))); |
| 1051 | 1051 |
| 1052 // Dispatch to the first bytecode handler for the function. | 1052 // Dispatch to the first bytecode handler for the function. |
| 1053 __ lbzx(r4, MemOperand(kInterpreterBytecodeArrayRegister, | 1053 __ lbzx(r4, MemOperand(kInterpreterBytecodeArrayRegister, |
| 1054 kInterpreterBytecodeOffsetRegister)); | 1054 kInterpreterBytecodeOffsetRegister)); |
| 1055 __ ShiftLeftImm(ip, r4, Operand(kPointerSizeLog2)); | 1055 __ ShiftLeftImm(ip, r4, Operand(kPointerSizeLog2)); |
| 1056 __ LoadPX(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); | 1056 __ LoadPX(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); |
| 1057 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging | |
| 1058 // and header removal. | |
| 1059 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
| 1060 __ Call(ip); | 1057 __ Call(ip); |
| 1061 | 1058 |
| 1062 // Even though the first bytecode handler was called, we will never return. | 1059 // Even though the first bytecode handler was called, we will never return. |
| 1063 __ Abort(kUnexpectedReturnFromBytecodeHandler); | 1060 __ Abort(kUnexpectedReturnFromBytecodeHandler); |
| 1064 } | 1061 } |
| 1065 | 1062 |
| 1066 | 1063 |
| 1067 void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { | 1064 void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { |
| 1068 // TODO(rmcilroy): List of things not currently dealt with here but done in | 1065 // TODO(rmcilroy): List of things not currently dealt with here but done in |
| 1069 // fullcodegen's EmitReturnSequence. | 1066 // fullcodegen's EmitReturnSequence. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 MemOperand( | 1175 MemOperand( |
| 1179 kInterpreterRegisterFileRegister, | 1176 kInterpreterRegisterFileRegister, |
| 1180 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); | 1177 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); |
| 1181 __ SmiUntag(kInterpreterBytecodeOffsetRegister); | 1178 __ SmiUntag(kInterpreterBytecodeOffsetRegister); |
| 1182 | 1179 |
| 1183 // Dispatch to the target bytecode. | 1180 // Dispatch to the target bytecode. |
| 1184 __ lbzx(r4, MemOperand(kInterpreterBytecodeArrayRegister, | 1181 __ lbzx(r4, MemOperand(kInterpreterBytecodeArrayRegister, |
| 1185 kInterpreterBytecodeOffsetRegister)); | 1182 kInterpreterBytecodeOffsetRegister)); |
| 1186 __ ShiftLeftImm(ip, r4, Operand(kPointerSizeLog2)); | 1183 __ ShiftLeftImm(ip, r4, Operand(kPointerSizeLog2)); |
| 1187 __ LoadPX(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); | 1184 __ LoadPX(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); |
| 1188 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
| 1189 __ Jump(ip); | 1185 __ Jump(ip); |
| 1190 } | 1186 } |
| 1191 | 1187 |
| 1192 | 1188 |
| 1193 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1189 static void Generate_InterpreterNotifyDeoptimizedHelper( |
| 1194 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1190 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
| 1195 // Enter an internal frame. | 1191 // Enter an internal frame. |
| 1196 { | 1192 { |
| 1197 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1193 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 1198 | 1194 |
| (...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2855 __ bkpt(0); | 2851 __ bkpt(0); |
| 2856 } | 2852 } |
| 2857 } | 2853 } |
| 2858 | 2854 |
| 2859 | 2855 |
| 2860 #undef __ | 2856 #undef __ |
| 2861 } // namespace internal | 2857 } // namespace internal |
| 2862 } // namespace v8 | 2858 } // namespace v8 |
| 2863 | 2859 |
| 2864 #endif // V8_TARGET_ARCH_PPC | 2860 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |