summaryrefslogtreecommitdiff
path: root/deps/v8/src/x64/regexp-macro-assembler-x64.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/x64/regexp-macro-assembler-x64.cc')
-rw-r--r--deps/v8/src/x64/regexp-macro-assembler-x64.cc56
1 files changed, 6 insertions, 50 deletions
diff --git a/deps/v8/src/x64/regexp-macro-assembler-x64.cc b/deps/v8/src/x64/regexp-macro-assembler-x64.cc
index bf232bff9b..837c2543c3 100644
--- a/deps/v8/src/x64/regexp-macro-assembler-x64.cc
+++ b/deps/v8/src/x64/regexp-macro-assembler-x64.cc
@@ -542,13 +542,9 @@ void RegExpMacroAssemblerX64::CheckNotCharacter(uint32_t c,
void RegExpMacroAssemblerX64::CheckCharacterAfterAnd(uint32_t c,
uint32_t mask,
Label* on_equal) {
- if (c == 0) {
- __ testl(current_character(), Immediate(mask));
- } else {
- __ movl(rax, Immediate(mask));
- __ and_(rax, current_character());
- __ cmpl(rax, Immediate(c));
- }
+ __ movl(rax, current_character());
+ __ and_(rax, Immediate(mask));
+ __ cmpl(rax, Immediate(c));
BranchOrBacktrack(equal, on_equal);
}
@@ -556,13 +552,9 @@ void RegExpMacroAssemblerX64::CheckCharacterAfterAnd(uint32_t c,
void RegExpMacroAssemblerX64::CheckNotCharacterAfterAnd(uint32_t c,
uint32_t mask,
Label* on_not_equal) {
- if (c == 0) {
- __ testl(current_character(), Immediate(mask));
- } else {
- __ movl(rax, Immediate(mask));
- __ and_(rax, current_character());
- __ cmpl(rax, Immediate(c));
- }
+ __ movl(rax, current_character());
+ __ and_(rax, Immediate(mask));
+ __ cmpl(rax, Immediate(c));
BranchOrBacktrack(not_equal, on_not_equal);
}
@@ -580,42 +572,6 @@ void RegExpMacroAssemblerX64::CheckNotCharacterAfterMinusAnd(
}
-void RegExpMacroAssemblerX64::CheckCharacterInRange(
- uc16 from,
- uc16 to,
- Label* on_in_range) {
- __ leal(rax, Operand(current_character(), -from));
- __ cmpl(rax, Immediate(to - from));
- BranchOrBacktrack(below_equal, on_in_range);
-}
-
-
-void RegExpMacroAssemblerX64::CheckCharacterNotInRange(
- uc16 from,
- uc16 to,
- Label* on_not_in_range) {
- __ leal(rax, Operand(current_character(), -from));
- __ cmpl(rax, Immediate(to - from));
- BranchOrBacktrack(above, on_not_in_range);
-}
-
-
-void RegExpMacroAssemblerX64::CheckBitInTable(
- Handle<ByteArray> table,
- Label* on_bit_set) {
- __ Move(rax, table);
- Register index = current_character();
- if (mode_ != ASCII || kTableMask != String::kMaxAsciiCharCode) {
- __ movq(rbx, current_character());
- __ and_(rbx, Immediate(kTableMask));
- index = rbx;
- }
- __ cmpb(FieldOperand(rax, index, times_1, ByteArray::kHeaderSize),
- Immediate(0));
- BranchOrBacktrack(not_equal, on_bit_set);
-}
-
-
bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type,
Label* on_no_match) {
// Range checks (c in min..max) are generally implemented by an unsigned