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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 __ bind(&after_call); | 1079 __ bind(&after_call); |
1080 | 1080 |
1081 #if !ABI_RETURNS_OBJECT_PAIRS_IN_REGS | 1081 #if !ABI_RETURNS_OBJECT_PAIRS_IN_REGS |
1082 // If return value is on the stack, pop it to registers. | 1082 // If return value is on the stack, pop it to registers. |
1083 if (result_size() > 1) { | 1083 if (result_size() > 1) { |
1084 __ LoadP(r4, MemOperand(r3, kPointerSize)); | 1084 __ LoadP(r4, MemOperand(r3, kPointerSize)); |
1085 __ LoadP(r3, MemOperand(r3)); | 1085 __ LoadP(r3, MemOperand(r3)); |
1086 } | 1086 } |
1087 #endif | 1087 #endif |
1088 | 1088 |
1089 // Runtime functions should not return 'the hole'. Allowing it to escape may | |
1090 // lead to crashes in the IC code later. | |
1091 if (FLAG_debug_code) { | |
1092 Label okay; | |
1093 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); | |
1094 __ bne(&okay); | |
1095 __ stop("The hole escaped"); | |
1096 __ bind(&okay); | |
1097 } | |
1098 | |
1099 // Check result for exception sentinel. | 1089 // Check result for exception sentinel. |
1100 Label exception_returned; | 1090 Label exception_returned; |
1101 __ CompareRoot(r3, Heap::kExceptionRootIndex); | 1091 __ CompareRoot(r3, Heap::kExceptionRootIndex); |
1102 __ beq(&exception_returned); | 1092 __ beq(&exception_returned); |
1103 | 1093 |
1104 // Check that there is no pending exception, otherwise we | 1094 // Check that there is no pending exception, otherwise we |
1105 // should have returned the exception sentinel. | 1095 // should have returned the exception sentinel. |
1106 if (FLAG_debug_code) { | 1096 if (FLAG_debug_code) { |
1107 Label okay; | 1097 Label okay; |
1108 ExternalReference pending_exception_address( | 1098 ExternalReference pending_exception_address( |
(...skipping 4491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5600 kStackUnwindSpace, NULL, | 5590 kStackUnwindSpace, NULL, |
5601 MemOperand(fp, 6 * kPointerSize), NULL); | 5591 MemOperand(fp, 6 * kPointerSize), NULL); |
5602 } | 5592 } |
5603 | 5593 |
5604 | 5594 |
5605 #undef __ | 5595 #undef __ |
5606 } | 5596 } |
5607 } // namespace v8::internal | 5597 } // namespace v8::internal |
5608 | 5598 |
5609 #endif // V8_TARGET_ARCH_PPC | 5599 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |