Index: src/x64/regexp-macro-assembler-x64.cc |
diff --git a/src/x64/regexp-macro-assembler-x64.cc b/src/x64/regexp-macro-assembler-x64.cc |
index 152aebb9106db1947ebff4b5de0b14c01b96de1c..f5b5e954ad3bb9f3ba97641df73859473504a4b3 100644 |
--- a/src/x64/regexp-macro-assembler-x64.cc |
+++ b/src/x64/regexp-macro-assembler-x64.cc |
@@ -393,8 +393,17 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase( |
__ j(not_equal, on_no_match); // Definitely not equal. |
__ subb(rax, Immediate('a')); |
__ cmpb(rax, Immediate('z' - 'a')); |
+#ifndef ENABLE_LATIN_1 |
__ j(above, on_no_match); // Weren't letters anyway. |
- |
+#else |
+ __ j(below_equal, &loop_increment); // In range 'a'-'z'. |
+ // Latin-1: Check for values in range [224,254] but not 247. |
+ __ subb(rax, Immediate(224 - 'a')); |
+ __ cmpb(rax, Immediate(254 - 224)); |
+ __ j(above, on_no_match); // Weren't Latin-1 letters. |
+ __ cmpb(rax, Immediate(247 - 224)); // Check for 247. |
+ __ j(equal, on_no_match); |
+#endif |
__ bind(&loop_increment); |
// Increment pointers into match and capture strings. |
__ addq(r11, Immediate(1)); |