| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 masm->mov(t9, s2); // Function pointer to t9 to conform to ABI for PIC. | 1152 masm->mov(t9, s2); // Function pointer to t9 to conform to ABI for PIC. |
| 1153 masm->jalr(t9); | 1153 masm->jalr(t9); |
| 1154 // Set up sp in the delay slot. | 1154 // Set up sp in the delay slot. |
| 1155 masm->addiu(sp, sp, -kCArgsSlotsSize); | 1155 masm->addiu(sp, sp, -kCArgsSlotsSize); |
| 1156 // Make sure the stored 'ra' points to this position. | 1156 // Make sure the stored 'ra' points to this position. |
| 1157 DCHECK_EQ(kNumInstructionsToJump, | 1157 DCHECK_EQ(kNumInstructionsToJump, |
| 1158 masm->InstructionsGeneratedSince(&find_ra)); | 1158 masm->InstructionsGeneratedSince(&find_ra)); |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 | 1161 |
| 1162 // Runtime functions should not return 'the hole'. Allowing it to escape may | |
| 1163 // lead to crashes in the IC code later. | |
| 1164 if (FLAG_debug_code) { | |
| 1165 Label okay; | |
| 1166 __ LoadRoot(t0, Heap::kTheHoleValueRootIndex); | |
| 1167 __ Branch(&okay, ne, v0, Operand(t0)); | |
| 1168 __ stop("The hole escaped"); | |
| 1169 __ bind(&okay); | |
| 1170 } | |
| 1171 | |
| 1172 // Check result for exception sentinel. | 1162 // Check result for exception sentinel. |
| 1173 Label exception_returned; | 1163 Label exception_returned; |
| 1174 __ LoadRoot(t0, Heap::kExceptionRootIndex); | 1164 __ LoadRoot(t0, Heap::kExceptionRootIndex); |
| 1175 __ Branch(&exception_returned, eq, t0, Operand(v0)); | 1165 __ Branch(&exception_returned, eq, t0, Operand(v0)); |
| 1176 | 1166 |
| 1177 // Check that there is no pending exception, otherwise we | 1167 // Check that there is no pending exception, otherwise we |
| 1178 // should have returned the exception sentinel. | 1168 // should have returned the exception sentinel. |
| 1179 if (FLAG_debug_code) { | 1169 if (FLAG_debug_code) { |
| 1180 Label okay; | 1170 Label okay; |
| 1181 ExternalReference pending_exception_address( | 1171 ExternalReference pending_exception_address( |
| (...skipping 4082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5264 kStackUnwindSpace, kInvalidStackOffset, | 5254 kStackUnwindSpace, kInvalidStackOffset, |
| 5265 MemOperand(fp, 6 * kPointerSize), NULL); | 5255 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5266 } | 5256 } |
| 5267 | 5257 |
| 5268 | 5258 |
| 5269 #undef __ | 5259 #undef __ |
| 5270 | 5260 |
| 5271 } } // namespace v8::internal | 5261 } } // namespace v8::internal |
| 5272 | 5262 |
| 5273 #endif // V8_TARGET_ARCH_MIPS | 5263 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |