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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0); | 1042 __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0); |
1043 __ StoreP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * | 1043 __ StoreP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * |
1044 kPointerSize + | 1044 kPointerSize + |
1045 TypeFeedbackVector::kHeaderSize), | 1045 TypeFeedbackVector::kHeaderSize), |
1046 r0); | 1046 r0); |
1047 | 1047 |
1048 // Check function data field is actually a BytecodeArray object. | 1048 // Check function data field is actually a BytecodeArray object. |
1049 | 1049 |
1050 if (FLAG_debug_code) { | 1050 if (FLAG_debug_code) { |
1051 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); | 1051 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); |
1052 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1052 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, cr0); |
1053 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg, | 1053 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg, |
1054 BYTECODE_ARRAY_TYPE); | 1054 BYTECODE_ARRAY_TYPE); |
1055 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1055 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
1056 } | 1056 } |
1057 | 1057 |
1058 // Reset code age. | 1058 // Reset code age. |
1059 __ mov(r8, Operand(BytecodeArray::kNoAgeBytecodeAge)); | 1059 __ mov(r8, Operand(BytecodeArray::kNoAgeBytecodeAge)); |
1060 __ StoreByte(r8, FieldMemOperand(kInterpreterBytecodeArrayRegister, | 1060 __ StoreByte(r8, FieldMemOperand(kInterpreterBytecodeArrayRegister, |
1061 BytecodeArray::kBytecodeAgeOffset), | 1061 BytecodeArray::kBytecodeAgeOffset), |
1062 r0); | 1062 r0); |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 Operand(ExternalReference::interpreter_dispatch_table_address( | 1296 Operand(ExternalReference::interpreter_dispatch_table_address( |
1297 masm->isolate()))); | 1297 masm->isolate()))); |
1298 | 1298 |
1299 // Get the bytecode array pointer from the frame. | 1299 // Get the bytecode array pointer from the frame. |
1300 __ LoadP(kInterpreterBytecodeArrayRegister, | 1300 __ LoadP(kInterpreterBytecodeArrayRegister, |
1301 MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp)); | 1301 MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp)); |
1302 | 1302 |
1303 if (FLAG_debug_code) { | 1303 if (FLAG_debug_code) { |
1304 // Check function data field is actually a BytecodeArray object. | 1304 // Check function data field is actually a BytecodeArray object. |
1305 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); | 1305 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); |
1306 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1306 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, cr0); |
1307 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r4, no_reg, | 1307 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r4, no_reg, |
1308 BYTECODE_ARRAY_TYPE); | 1308 BYTECODE_ARRAY_TYPE); |
1309 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1309 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
1310 } | 1310 } |
1311 | 1311 |
1312 // Get the target bytecode offset from the frame. | 1312 // Get the target bytecode offset from the frame. |
1313 __ LoadP(kInterpreterBytecodeOffsetRegister, | 1313 __ LoadP(kInterpreterBytecodeOffsetRegister, |
1314 MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); | 1314 MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); |
1315 __ SmiUntag(kInterpreterBytecodeOffsetRegister); | 1315 __ SmiUntag(kInterpreterBytecodeOffsetRegister); |
1316 | 1316 |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2952 __ CallRuntime(Runtime::kThrowStackOverflow); | 2952 __ CallRuntime(Runtime::kThrowStackOverflow); |
2953 __ bkpt(0); | 2953 __ bkpt(0); |
2954 } | 2954 } |
2955 } | 2955 } |
2956 | 2956 |
2957 #undef __ | 2957 #undef __ |
2958 } // namespace internal | 2958 } // namespace internal |
2959 } // namespace v8 | 2959 } // namespace v8 |
2960 | 2960 |
2961 #endif // V8_TARGET_ARCH_PPC | 2961 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |