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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 { | 998 { |
999 // Prevent literal pool emission before return address. | 999 // Prevent literal pool emission before return address. |
1000 Assembler::BlockConstPoolScope block_const_pool(masm); | 1000 Assembler::BlockConstPoolScope block_const_pool(masm); |
1001 __ add(lr, pc, Operand(4)); | 1001 __ add(lr, pc, Operand(4)); |
1002 __ str(lr, MemOperand(sp, 0)); | 1002 __ str(lr, MemOperand(sp, 0)); |
1003 __ Call(r5); | 1003 __ Call(r5); |
1004 } | 1004 } |
1005 | 1005 |
1006 __ VFPEnsureFPSCRState(r2); | 1006 __ VFPEnsureFPSCRState(r2); |
1007 | 1007 |
1008 // Runtime functions should not return 'the hole'. Allowing it to escape may | |
1009 // lead to crashes in the IC code later. | |
1010 if (FLAG_debug_code) { | |
1011 Label okay; | |
1012 __ CompareRoot(r0, Heap::kTheHoleValueRootIndex); | |
1013 __ b(ne, &okay); | |
1014 __ stop("The hole escaped"); | |
1015 __ bind(&okay); | |
1016 } | |
1017 | |
1018 // Check result for exception sentinel. | 1008 // Check result for exception sentinel. |
1019 Label exception_returned; | 1009 Label exception_returned; |
1020 __ CompareRoot(r0, Heap::kExceptionRootIndex); | 1010 __ CompareRoot(r0, Heap::kExceptionRootIndex); |
1021 __ b(eq, &exception_returned); | 1011 __ b(eq, &exception_returned); |
1022 | 1012 |
1023 // Check that there is no pending exception, otherwise we | 1013 // Check that there is no pending exception, otherwise we |
1024 // should have returned the exception sentinel. | 1014 // should have returned the exception sentinel. |
1025 if (FLAG_debug_code) { | 1015 if (FLAG_debug_code) { |
1026 Label okay; | 1016 Label okay; |
1027 ExternalReference pending_exception_address( | 1017 ExternalReference pending_exception_address( |
(...skipping 4270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5298 kStackUnwindSpace, NULL, | 5288 kStackUnwindSpace, NULL, |
5299 MemOperand(fp, 6 * kPointerSize), NULL); | 5289 MemOperand(fp, 6 * kPointerSize), NULL); |
5300 } | 5290 } |
5301 | 5291 |
5302 | 5292 |
5303 #undef __ | 5293 #undef __ |
5304 | 5294 |
5305 } } // namespace v8::internal | 5295 } } // namespace v8::internal |
5306 | 5296 |
5307 #endif // V8_TARGET_ARCH_ARM | 5297 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |