Index: src/mips/regexp-macro-assembler-mips.cc |
diff --git a/src/mips/regexp-macro-assembler-mips.cc b/src/mips/regexp-macro-assembler-mips.cc |
index dde4a65a9ead81d51a3078317f69b88c09578837..225d4d02187d5fce89ac74f5e772231c5ff92b90 100644 |
--- a/src/mips/regexp-macro-assembler-mips.cc |
+++ b/src/mips/regexp-macro-assembler-mips.cc |
@@ -461,7 +461,8 @@ void RegExpMacroAssemblerMIPS::CheckCharacterAfterAnd(uint32_t c, |
uint32_t mask, |
Label* on_equal) { |
__ And(a0, current_character(), Operand(mask)); |
- BranchOrBacktrack(on_equal, eq, a0, Operand(c)); |
+ Operand rhs = (c == 0) ? Operand(zero_reg) : Operand(c); |
+ BranchOrBacktrack(on_equal, eq, a0, rhs); |
} |
@@ -469,7 +470,8 @@ void RegExpMacroAssemblerMIPS::CheckNotCharacterAfterAnd(uint32_t c, |
uint32_t mask, |
Label* on_not_equal) { |
__ And(a0, current_character(), Operand(mask)); |
- BranchOrBacktrack(on_not_equal, ne, a0, Operand(c)); |
+ Operand rhs = (c == 0) ? Operand(zero_reg) : Operand(c); |
+ BranchOrBacktrack(on_not_equal, ne, a0, rhs); |
} |