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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/regexp/arm/regexp-macro-assembler-arm.h" | 7 #include "src/regexp/arm/regexp-macro-assembler-arm.h" |
8 | 8 |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/log.h" | 10 #include "src/log.h" |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 void RegExpMacroAssemblerARM::CheckStackLimit() { | 1193 void RegExpMacroAssemblerARM::CheckStackLimit() { |
1194 ExternalReference stack_limit = | 1194 ExternalReference stack_limit = |
1195 ExternalReference::address_of_regexp_stack_limit(isolate()); | 1195 ExternalReference::address_of_regexp_stack_limit(isolate()); |
1196 __ mov(r0, Operand(stack_limit)); | 1196 __ mov(r0, Operand(stack_limit)); |
1197 __ ldr(r0, MemOperand(r0)); | 1197 __ ldr(r0, MemOperand(r0)); |
1198 __ cmp(backtrack_stackpointer(), Operand(r0)); | 1198 __ cmp(backtrack_stackpointer(), Operand(r0)); |
1199 SafeCall(&stack_overflow_label_, ls); | 1199 SafeCall(&stack_overflow_label_, ls); |
1200 } | 1200 } |
1201 | 1201 |
1202 | 1202 |
1203 bool RegExpMacroAssemblerARM::CanReadUnaligned() { | |
1204 return CpuFeatures::IsSupported(UNALIGNED_ACCESSES) && !slow_safe(); | |
1205 } | |
1206 | |
1207 | |
1208 void RegExpMacroAssemblerARM::LoadCurrentCharacterUnchecked(int cp_offset, | 1203 void RegExpMacroAssemblerARM::LoadCurrentCharacterUnchecked(int cp_offset, |
1209 int characters) { | 1204 int characters) { |
1210 Register offset = current_input_offset(); | 1205 Register offset = current_input_offset(); |
1211 if (cp_offset != 0) { | 1206 if (cp_offset != 0) { |
1212 // r4 is not being used to store the capture start index at this point. | 1207 // r4 is not being used to store the capture start index at this point. |
1213 __ add(r4, current_input_offset(), Operand(cp_offset * char_size())); | 1208 __ add(r4, current_input_offset(), Operand(cp_offset * char_size())); |
1214 offset = r4; | 1209 offset = r4; |
1215 } | 1210 } |
1216 // The ldr, str, ldrh, strh instructions can do unaligned accesses, if the CPU | 1211 // The ldr, str, ldrh, strh instructions can do unaligned accesses, if the CPU |
1217 // and the operating system running on the target allow it. | 1212 // and the operating system running on the target allow it. |
(...skipping 25 matching lines...) Expand all Loading... |
1243 | 1238 |
1244 | 1239 |
1245 #undef __ | 1240 #undef __ |
1246 | 1241 |
1247 #endif // V8_INTERPRETED_REGEXP | 1242 #endif // V8_INTERPRETED_REGEXP |
1248 | 1243 |
1249 } // namespace internal | 1244 } // namespace internal |
1250 } // namespace v8 | 1245 } // namespace v8 |
1251 | 1246 |
1252 #endif // V8_TARGET_ARCH_ARM | 1247 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |