| 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
| 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 1038 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
| 1039 __ mov(kInterpreterDispatchTableRegister, | 1039 __ mov(kInterpreterDispatchTableRegister, |
| 1040 Operand(ExternalReference::interpreter_dispatch_table_address( | 1040 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1041 masm->isolate()))); | 1041 masm->isolate()))); |
| 1042 | 1042 |
| 1043 // Dispatch to the first bytecode handler for the function. | 1043 // Dispatch to the first bytecode handler for the function. |
| 1044 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, | 1044 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, |
| 1045 kInterpreterBytecodeOffsetRegister)); | 1045 kInterpreterBytecodeOffsetRegister)); |
| 1046 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); | 1046 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); |
| 1047 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); | 1047 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); |
| 1048 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging | |
| 1049 // and header removal. | |
| 1050 __ AddP(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
| 1051 __ Call(ip); | 1048 __ Call(ip); |
| 1052 | 1049 |
| 1053 // Even though the first bytecode handler was called, we will never return. | 1050 // Even though the first bytecode handler was called, we will never return. |
| 1054 __ Abort(kUnexpectedReturnFromBytecodeHandler); | 1051 __ Abort(kUnexpectedReturnFromBytecodeHandler); |
| 1055 } | 1052 } |
| 1056 | 1053 |
| 1057 void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { | 1054 void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { |
| 1058 // TODO(rmcilroy): List of things not currently dealt with here but done in | 1055 // TODO(rmcilroy): List of things not currently dealt with here but done in |
| 1059 // fullcodegen's EmitReturnSequence. | 1056 // fullcodegen's EmitReturnSequence. |
| 1060 // - Supporting FLAG_trace for Runtime::TraceExit. | 1057 // - Supporting FLAG_trace for Runtime::TraceExit. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 MemOperand( | 1158 MemOperand( |
| 1162 kInterpreterRegisterFileRegister, | 1159 kInterpreterRegisterFileRegister, |
| 1163 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); | 1160 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); |
| 1164 __ SmiUntag(kInterpreterBytecodeOffsetRegister); | 1161 __ SmiUntag(kInterpreterBytecodeOffsetRegister); |
| 1165 | 1162 |
| 1166 // Dispatch to the target bytecode. | 1163 // Dispatch to the target bytecode. |
| 1167 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, | 1164 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, |
| 1168 kInterpreterBytecodeOffsetRegister)); | 1165 kInterpreterBytecodeOffsetRegister)); |
| 1169 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); | 1166 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); |
| 1170 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); | 1167 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); |
| 1171 __ AddP(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | |
| 1172 __ Jump(ip); | 1168 __ Jump(ip); |
| 1173 } | 1169 } |
| 1174 | 1170 |
| 1175 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1171 static void Generate_InterpreterNotifyDeoptimizedHelper( |
| 1176 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1172 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
| 1177 // Enter an internal frame. | 1173 // Enter an internal frame. |
| 1178 { | 1174 { |
| 1179 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1175 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 1180 | 1176 |
| 1181 // Pass the deoptimization type to the runtime system. | 1177 // Pass the deoptimization type to the runtime system. |
| (...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2664 __ bkpt(0); | 2660 __ bkpt(0); |
| 2665 } | 2661 } |
| 2666 } | 2662 } |
| 2667 | 2663 |
| 2668 #undef __ | 2664 #undef __ |
| 2669 | 2665 |
| 2670 } // namespace internal | 2666 } // namespace internal |
| 2671 } // namespace v8 | 2667 } // namespace v8 |
| 2672 | 2668 |
| 2673 #endif // V8_TARGET_ARCH_S390 | 2669 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |