OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 // Lower 2 bits of r2 are 0 iff r0 has failure tag. | 2835 // Lower 2 bits of r2 are 0 iff r0 has failure tag. |
2836 __ add(r2, r0, Operand(1)); | 2836 __ add(r2, r0, Operand(1)); |
2837 __ tst(r2, Operand(kFailureTagMask)); | 2837 __ tst(r2, Operand(kFailureTagMask)); |
2838 __ b(eq, &failure_returned); | 2838 __ b(eq, &failure_returned); |
2839 | 2839 |
2840 // Exit C frame and return. | 2840 // Exit C frame and return. |
2841 // r0:r1: result | 2841 // r0:r1: result |
2842 // sp: stack pointer | 2842 // sp: stack pointer |
2843 // fp: frame pointer | 2843 // fp: frame pointer |
2844 // Callee-saved register r4 still holds argc. | 2844 // Callee-saved register r4 still holds argc. |
2845 __ LeaveExitFrame(save_doubles_, r4, true); | 2845 __ LeaveExitFrame(save_doubles_, r4); |
2846 __ mov(pc, lr); | 2846 __ mov(pc, lr); |
2847 | 2847 |
2848 // check if we should retry or throw exception | 2848 // check if we should retry or throw exception |
2849 Label retry; | 2849 Label retry; |
2850 __ bind(&failure_returned); | 2850 __ bind(&failure_returned); |
2851 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); | 2851 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); |
2852 __ tst(r0, Operand(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); | 2852 __ tst(r0, Operand(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); |
2853 __ b(eq, &retry); | 2853 __ b(eq, &retry); |
2854 | 2854 |
2855 // Special handling of out of memory exceptions. | 2855 // Special handling of out of memory exceptions. |
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4064 // Already there | 4064 // Already there |
4065 | 4065 |
4066 // Argument 1 (r0): Subject string. | 4066 // Argument 1 (r0): Subject string. |
4067 __ mov(r0, subject); | 4067 __ mov(r0, subject); |
4068 | 4068 |
4069 // Locate the code entry and call it. | 4069 // Locate the code entry and call it. |
4070 __ add(r7, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); | 4070 __ add(r7, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); |
4071 DirectCEntryStub stub; | 4071 DirectCEntryStub stub; |
4072 stub.GenerateCall(masm, r7); | 4072 stub.GenerateCall(masm, r7); |
4073 | 4073 |
4074 __ LeaveExitFrame(false, no_reg, true); | 4074 __ LeaveExitFrame(false, no_reg); |
4075 | 4075 |
4076 // r0: result | 4076 // r0: result |
4077 // subject: subject string (callee saved) | 4077 // subject: subject string (callee saved) |
4078 // regexp_data: RegExp data (callee saved) | 4078 // regexp_data: RegExp data (callee saved) |
4079 // last_match_info_elements: Last match info elements (callee saved) | 4079 // last_match_info_elements: Last match info elements (callee saved) |
4080 // Check the result. | 4080 // Check the result. |
4081 Label success; | 4081 Label success; |
4082 __ cmp(r0, Operand(1)); | 4082 __ cmp(r0, Operand(1)); |
4083 // We expect exactly one result since we force the called regexp to behave | 4083 // We expect exactly one result since we force the called regexp to behave |
4084 // as non-global. | 4084 // as non-global. |
(...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7154 __ bind(&fast_elements_case); | 7154 __ bind(&fast_elements_case); |
7155 GenerateCase(masm, FAST_ELEMENTS); | 7155 GenerateCase(masm, FAST_ELEMENTS); |
7156 } | 7156 } |
7157 | 7157 |
7158 | 7158 |
7159 #undef __ | 7159 #undef __ |
7160 | 7160 |
7161 } } // namespace v8::internal | 7161 } } // namespace v8::internal |
7162 | 7162 |
7163 #endif // V8_TARGET_ARCH_ARM | 7163 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |