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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/regexp/arm64/regexp-macro-assembler-arm64.h" | 7 #include "src/regexp/arm64/regexp-macro-assembler-arm64.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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 CompareAndBranchOrBacktrack(current_input_offset(), | 1356 CompareAndBranchOrBacktrack(current_input_offset(), |
1357 -cp_offset * char_size(), ge, on_outside_input); | 1357 -cp_offset * char_size(), ge, on_outside_input); |
1358 } else { | 1358 } else { |
1359 __ Add(w12, current_input_offset(), Operand(cp_offset * char_size())); | 1359 __ Add(w12, current_input_offset(), Operand(cp_offset * char_size())); |
1360 __ Cmp(w12, string_start_minus_one()); | 1360 __ Cmp(w12, string_start_minus_one()); |
1361 BranchOrBacktrack(le, on_outside_input); | 1361 BranchOrBacktrack(le, on_outside_input); |
1362 } | 1362 } |
1363 } | 1363 } |
1364 | 1364 |
1365 | 1365 |
1366 bool RegExpMacroAssemblerARM64::CanReadUnaligned() { | |
1367 // TODO(pielan): See whether or not we should disable unaligned accesses. | |
1368 return !slow_safe(); | |
1369 } | |
1370 | |
1371 | |
1372 // Private methods: | 1366 // Private methods: |
1373 | 1367 |
1374 void RegExpMacroAssemblerARM64::CallCheckStackGuardState(Register scratch) { | 1368 void RegExpMacroAssemblerARM64::CallCheckStackGuardState(Register scratch) { |
1375 // Allocate space on the stack to store the return address. The | 1369 // Allocate space on the stack to store the return address. The |
1376 // CheckStackGuardState C++ function will override it if the code | 1370 // CheckStackGuardState C++ function will override it if the code |
1377 // moved. Allocate extra space for 2 arguments passed by pointers. | 1371 // moved. Allocate extra space for 2 arguments passed by pointers. |
1378 // AAPCS64 requires the stack to be 16 byte aligned. | 1372 // AAPCS64 requires the stack to be 16 byte aligned. |
1379 int alignment = masm_->ActivationFrameAlignment(); | 1373 int alignment = masm_->ActivationFrameAlignment(); |
1380 DCHECK_EQ(alignment % 16, 0); | 1374 DCHECK_EQ(alignment % 16, 0); |
1381 int align_mask = (alignment / kXRegSize) - 1; | 1375 int align_mask = (alignment / kXRegSize) - 1; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 } | 1655 } |
1662 } | 1656 } |
1663 } | 1657 } |
1664 | 1658 |
1665 #endif // V8_INTERPRETED_REGEXP | 1659 #endif // V8_INTERPRETED_REGEXP |
1666 | 1660 |
1667 } // namespace internal | 1661 } // namespace internal |
1668 } // namespace v8 | 1662 } // namespace v8 |
1669 | 1663 |
1670 #endif // V8_TARGET_ARCH_ARM64 | 1664 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |