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/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
10 #include "src/unicode.h" | 10 #include "src/unicode.h" |
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 Backtrack(); | 1453 Backtrack(); |
1454 return; | 1454 return; |
1455 } | 1455 } |
1456 __ B(to); | 1456 __ B(to); |
1457 return; | 1457 return; |
1458 } | 1458 } |
1459 if (to == NULL) { | 1459 if (to == NULL) { |
1460 to = &backtrack_label_; | 1460 to = &backtrack_label_; |
1461 } | 1461 } |
1462 // TODO(ulan): do direct jump when jump distance is known and fits in imm19. | 1462 // TODO(ulan): do direct jump when jump distance is known and fits in imm19. |
1463 Condition inverted_condition = InvertCondition(condition); | 1463 Condition inverted_condition = NegateCondition(condition); |
1464 Label no_branch; | 1464 Label no_branch; |
1465 __ B(inverted_condition, &no_branch); | 1465 __ B(inverted_condition, &no_branch); |
1466 __ B(to); | 1466 __ B(to); |
1467 __ Bind(&no_branch); | 1467 __ Bind(&no_branch); |
1468 } | 1468 } |
1469 | 1469 |
1470 void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg, | 1470 void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg, |
1471 int immediate, | 1471 int immediate, |
1472 Condition condition, | 1472 Condition condition, |
1473 Label* to) { | 1473 Label* to) { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 break; | 1594 break; |
1595 default: | 1595 default: |
1596 UNREACHABLE(); | 1596 UNREACHABLE(); |
1597 break; | 1597 break; |
1598 } | 1598 } |
1599 } | 1599 } |
1600 | 1600 |
1601 | 1601 |
1602 void RegExpMacroAssemblerARM64::CallIf(Label* to, Condition condition) { | 1602 void RegExpMacroAssemblerARM64::CallIf(Label* to, Condition condition) { |
1603 Label skip_call; | 1603 Label skip_call; |
1604 if (condition != al) __ B(&skip_call, InvertCondition(condition)); | 1604 if (condition != al) __ B(&skip_call, NegateCondition(condition)); |
1605 __ Bl(to); | 1605 __ Bl(to); |
1606 __ Bind(&skip_call); | 1606 __ Bind(&skip_call); |
1607 } | 1607 } |
1608 | 1608 |
1609 | 1609 |
1610 void RegExpMacroAssemblerARM64::RestoreLinkRegister() { | 1610 void RegExpMacroAssemblerARM64::RestoreLinkRegister() { |
1611 ASSERT(csp.Is(__ StackPointer())); | 1611 ASSERT(csp.Is(__ StackPointer())); |
1612 __ Pop(lr, xzr); | 1612 __ Pop(lr, xzr); |
1613 __ Add(lr, lr, Operand(masm_->CodeObject())); | 1613 __ Add(lr, lr, Operand(masm_->CodeObject())); |
1614 } | 1614 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 __ Ldrh(current_character(), MemOperand(input_end(), offset, SXTW)); | 1697 __ Ldrh(current_character(), MemOperand(input_end(), offset, SXTW)); |
1698 } | 1698 } |
1699 } | 1699 } |
1700 } | 1700 } |
1701 | 1701 |
1702 #endif // V8_INTERPRETED_REGEXP | 1702 #endif // V8_INTERPRETED_REGEXP |
1703 | 1703 |
1704 }} // namespace v8::internal | 1704 }} // namespace v8::internal |
1705 | 1705 |
1706 #endif // V8_TARGET_ARCH_ARM64 | 1706 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |