| 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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 __ beq(&bytecode_array_not_present); | 1006 __ beq(&bytecode_array_not_present); |
| 1007 | 1007 |
| 1008 if (FLAG_debug_code) { | 1008 if (FLAG_debug_code) { |
| 1009 __ TestIfSmi(kInterpreterBytecodeArrayRegister); | 1009 __ TestIfSmi(kInterpreterBytecodeArrayRegister); |
| 1010 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1010 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
| 1011 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r2, no_reg, | 1011 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r2, no_reg, |
| 1012 BYTECODE_ARRAY_TYPE); | 1012 BYTECODE_ARRAY_TYPE); |
| 1013 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1013 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 // Push new.target, bytecode array and zero for bytecode array offset. | 1016 // Load the initial bytecode offset. |
| 1017 __ LoadImmP(r2, Operand::Zero()); | 1017 __ mov(kInterpreterBytecodeOffsetRegister, |
| 1018 __ Push(r5, kInterpreterBytecodeArrayRegister, r2); | 1018 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
| 1019 |
| 1020 // Push new.target, bytecode array and Smi tagged bytecode array offset. |
| 1021 __ SmiTag(r4, kInterpreterBytecodeOffsetRegister); |
| 1022 __ Push(r5, kInterpreterBytecodeArrayRegister, r4); |
| 1019 | 1023 |
| 1020 // Allocate the local and temporary register file on the stack. | 1024 // Allocate the local and temporary register file on the stack. |
| 1021 { | 1025 { |
| 1022 // Load frame size (word) from the BytecodeArray object. | 1026 // Load frame size (word) from the BytecodeArray object. |
| 1023 __ LoadlW(r4, FieldMemOperand(kInterpreterBytecodeArrayRegister, | 1027 __ LoadlW(r4, FieldMemOperand(kInterpreterBytecodeArrayRegister, |
| 1024 BytecodeArray::kFrameSizeOffset)); | 1028 BytecodeArray::kFrameSizeOffset)); |
| 1025 | 1029 |
| 1026 // Do a stack check to ensure we don't go over the limit. | 1030 // Do a stack check to ensure we don't go over the limit. |
| 1027 Label ok; | 1031 Label ok; |
| 1028 __ SubP(r5, sp, r4); | 1032 __ SubP(r5, sp, r4); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1040 __ LoadAndTestP(r4, r4); | 1044 __ LoadAndTestP(r4, r4); |
| 1041 __ beq(&no_args); | 1045 __ beq(&no_args); |
| 1042 __ LoadRR(r1, r4); | 1046 __ LoadRR(r1, r4); |
| 1043 __ bind(&loop); | 1047 __ bind(&loop); |
| 1044 __ push(r5); | 1048 __ push(r5); |
| 1045 __ SubP(r1, Operand(1)); | 1049 __ SubP(r1, Operand(1)); |
| 1046 __ bne(&loop); | 1050 __ bne(&loop); |
| 1047 __ bind(&no_args); | 1051 __ bind(&no_args); |
| 1048 } | 1052 } |
| 1049 | 1053 |
| 1050 // Load accumulator, register file, bytecode offset, dispatch table into | 1054 // Load accumulator and dispatch table into registers. |
| 1051 // registers. | |
| 1052 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); | 1055 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
| 1053 __ AddP(r4, fp, Operand(InterpreterFrameConstants::kRegisterFileFromFp)); | |
| 1054 __ mov(kInterpreterBytecodeOffsetRegister, | |
| 1055 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | |
| 1056 __ mov(kInterpreterDispatchTableRegister, | 1056 __ mov(kInterpreterDispatchTableRegister, |
| 1057 Operand(ExternalReference::interpreter_dispatch_table_address( | 1057 Operand(ExternalReference::interpreter_dispatch_table_address( |
| 1058 masm->isolate()))); | 1058 masm->isolate()))); |
| 1059 | 1059 |
| 1060 // Dispatch to the first bytecode handler for the function. | 1060 // Dispatch to the first bytecode handler for the function. |
| 1061 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, | 1061 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, |
| 1062 kInterpreterBytecodeOffsetRegister)); | 1062 kInterpreterBytecodeOffsetRegister)); |
| 1063 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); | 1063 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); |
| 1064 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); | 1064 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); |
| 1065 __ Call(ip); | 1065 __ Call(ip); |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2856 __ bkpt(0); | 2856 __ bkpt(0); |
| 2857 } | 2857 } |
| 2858 } | 2858 } |
| 2859 | 2859 |
| 2860 #undef __ | 2860 #undef __ |
| 2861 | 2861 |
| 2862 } // namespace internal | 2862 } // namespace internal |
| 2863 } // namespace v8 | 2863 } // namespace v8 |
| 2864 | 2864 |
| 2865 #endif // V8_TARGET_ARCH_S390 | 2865 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |