| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 // Call the C routine. | 1096 // Call the C routine. |
| 1097 masm->mov(t9, s2); // Function pointer to t9 to conform to ABI for PIC. | 1097 masm->mov(t9, s2); // Function pointer to t9 to conform to ABI for PIC. |
| 1098 masm->jalr(t9); | 1098 masm->jalr(t9); |
| 1099 // Set up sp in the delay slot. | 1099 // Set up sp in the delay slot. |
| 1100 masm->daddiu(sp, sp, -kCArgsSlotsSize); | 1100 masm->daddiu(sp, sp, -kCArgsSlotsSize); |
| 1101 // Make sure the stored 'ra' points to this position. | 1101 // Make sure the stored 'ra' points to this position. |
| 1102 DCHECK_EQ(kNumInstructionsToJump, | 1102 DCHECK_EQ(kNumInstructionsToJump, |
| 1103 masm->InstructionsGeneratedSince(&find_ra)); | 1103 masm->InstructionsGeneratedSince(&find_ra)); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 // Runtime functions should not return 'the hole'. Allowing it to escape may | |
| 1107 // lead to crashes in the IC code later. | |
| 1108 if (FLAG_debug_code) { | |
| 1109 Label okay; | |
| 1110 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); | |
| 1111 __ Branch(&okay, ne, v0, Operand(a4)); | |
| 1112 __ stop("The hole escaped"); | |
| 1113 __ bind(&okay); | |
| 1114 } | |
| 1115 | |
| 1116 // Check result for exception sentinel. | 1106 // Check result for exception sentinel. |
| 1117 Label exception_returned; | 1107 Label exception_returned; |
| 1118 __ LoadRoot(a4, Heap::kExceptionRootIndex); | 1108 __ LoadRoot(a4, Heap::kExceptionRootIndex); |
| 1119 __ Branch(&exception_returned, eq, a4, Operand(v0)); | 1109 __ Branch(&exception_returned, eq, a4, Operand(v0)); |
| 1120 | 1110 |
| 1121 // Check that there is no pending exception, otherwise we | 1111 // Check that there is no pending exception, otherwise we |
| 1122 // should have returned the exception sentinel. | 1112 // should have returned the exception sentinel. |
| 1123 if (FLAG_debug_code) { | 1113 if (FLAG_debug_code) { |
| 1124 Label okay; | 1114 Label okay; |
| 1125 ExternalReference pending_exception_address( | 1115 ExternalReference pending_exception_address( |
| (...skipping 4431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5557 kStackUnwindSpace, kInvalidStackOffset, | 5547 kStackUnwindSpace, kInvalidStackOffset, |
| 5558 MemOperand(fp, 6 * kPointerSize), NULL); | 5548 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5559 } | 5549 } |
| 5560 | 5550 |
| 5561 | 5551 |
| 5562 #undef __ | 5552 #undef __ |
| 5563 | 5553 |
| 5564 } } // namespace v8::internal | 5554 } } // namespace v8::internal |
| 5565 | 5555 |
| 5566 #endif // V8_TARGET_ARCH_MIPS64 | 5556 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |