OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2848 | 2848 |
2849 // Return last match info. | 2849 // Return last match info. |
2850 __ Peek(x0, kLastMatchInfoOffset); | 2850 __ Peek(x0, kLastMatchInfoOffset); |
2851 __ PopCPURegList(used_callee_saved_registers); | 2851 __ PopCPURegList(used_callee_saved_registers); |
2852 // Drop the 4 arguments of the stub from the stack. | 2852 // Drop the 4 arguments of the stub from the stack. |
2853 __ Drop(4); | 2853 __ Drop(4); |
2854 __ Ret(); | 2854 __ Ret(); |
2855 | 2855 |
2856 __ Bind(&exception); | 2856 __ Bind(&exception); |
2857 Register exception_value = x0; | 2857 Register exception_value = x0; |
2858 // A stack overflow (on the backtrack stack) may have occured | 2858 // Result must now be exception. |
2859 // in the RegExp code but no exception has been created yet. | |
2860 // If there is no pending exception, handle that in the runtime system. | |
2861 __ Mov(x10, Operand(isolate()->factory()->the_hole_value())); | 2859 __ Mov(x10, Operand(isolate()->factory()->the_hole_value())); |
2862 __ Mov(x11, | 2860 __ Mov(x11, |
2863 Operand(ExternalReference(Isolate::kPendingExceptionAddress, | 2861 Operand(ExternalReference(Isolate::kPendingExceptionAddress, |
2864 isolate()))); | 2862 isolate()))); |
2865 __ Ldr(exception_value, MemOperand(x11)); | 2863 __ Ldr(exception_value, MemOperand(x11)); |
2866 __ Cmp(x10, exception_value); | |
2867 __ B(eq, &runtime); | |
2868 | |
2869 __ Str(x10, MemOperand(x11)); // Clear pending exception. | 2864 __ Str(x10, MemOperand(x11)); // Clear pending exception. |
2870 | 2865 |
2871 // Check if the exception is a termination. If so, throw as uncatchable. | 2866 // Check if the exception is a termination. If so, throw as uncatchable. |
2872 Label termination_exception; | 2867 Label termination_exception; |
2873 __ JumpIfRoot(exception_value, | 2868 __ JumpIfRoot(exception_value, |
2874 Heap::kTerminationExceptionRootIndex, | 2869 Heap::kTerminationExceptionRootIndex, |
2875 &termination_exception); | 2870 &termination_exception); |
2876 | 2871 |
2877 __ Throw(exception_value, x10, x11, x12, x13); | 2872 __ Throw(exception_value, x10, x11, x12, x13); |
2878 | 2873 |
(...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5428 MemOperand(fp, 6 * kPointerSize), | 5423 MemOperand(fp, 6 * kPointerSize), |
5429 NULL); | 5424 NULL); |
5430 } | 5425 } |
5431 | 5426 |
5432 | 5427 |
5433 #undef __ | 5428 #undef __ |
5434 | 5429 |
5435 } } // namespace v8::internal | 5430 } } // namespace v8::internal |
5436 | 5431 |
5437 #endif // V8_TARGET_ARCH_ARM64 | 5432 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |