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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 __ bind(&after_call); | 1131 __ bind(&after_call); |
1132 | 1132 |
1133 #if !ABI_RETURNS_OBJECT_PAIRS_IN_REGS | 1133 #if !ABI_RETURNS_OBJECT_PAIRS_IN_REGS |
1134 // If return value is on the stack, pop it to registers. | 1134 // If return value is on the stack, pop it to registers. |
1135 if (result_size() > 1) { | 1135 if (result_size() > 1) { |
1136 __ LoadP(r4, MemOperand(r3, kPointerSize)); | 1136 __ LoadP(r4, MemOperand(r3, kPointerSize)); |
1137 __ LoadP(r3, MemOperand(r3)); | 1137 __ LoadP(r3, MemOperand(r3)); |
1138 } | 1138 } |
1139 #endif | 1139 #endif |
1140 | 1140 |
1141 // Runtime functions should not return 'the hole'. Allowing it to escape may | |
1142 // lead to crashes in the IC code later. | |
1143 if (FLAG_debug_code) { | |
1144 Label okay; | |
1145 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); | |
1146 __ bne(&okay); | |
1147 __ stop("The hole escaped"); | |
1148 __ bind(&okay); | |
1149 } | |
1150 | |
1151 // Check result for exception sentinel. | 1141 // Check result for exception sentinel. |
1152 Label exception_returned; | 1142 Label exception_returned; |
1153 __ CompareRoot(r3, Heap::kExceptionRootIndex); | 1143 __ CompareRoot(r3, Heap::kExceptionRootIndex); |
1154 __ beq(&exception_returned); | 1144 __ beq(&exception_returned); |
1155 | 1145 |
1156 // Check that there is no pending exception, otherwise we | 1146 // Check that there is no pending exception, otherwise we |
1157 // should have returned the exception sentinel. | 1147 // should have returned the exception sentinel. |
1158 if (FLAG_debug_code) { | 1148 if (FLAG_debug_code) { |
1159 Label okay; | 1149 Label okay; |
1160 ExternalReference pending_exception_address( | 1150 ExternalReference pending_exception_address( |
(...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5342 kStackUnwindSpace, NULL, | 5332 kStackUnwindSpace, NULL, |
5343 MemOperand(fp, 6 * kPointerSize), NULL); | 5333 MemOperand(fp, 6 * kPointerSize), NULL); |
5344 } | 5334 } |
5345 | 5335 |
5346 | 5336 |
5347 #undef __ | 5337 #undef __ |
5348 } | 5338 } |
5349 } // namespace v8::internal | 5339 } // namespace v8::internal |
5350 | 5340 |
5351 #endif // V8_TARGET_ARCH_PPC | 5341 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |