Index: src/arm/regexp-macro-assembler-arm.cc |
diff --git a/src/arm/regexp-macro-assembler-arm.cc b/src/arm/regexp-macro-assembler-arm.cc |
index 608c20990a9c080a4ebaabc7288d10aeddb0f6a3..acb24ef14eeff9e2c28243f5b0982452497c4507 100644 |
--- a/src/arm/regexp-macro-assembler-arm.cc |
+++ b/src/arm/regexp-macro-assembler-arm.cc |
@@ -337,8 +337,17 @@ void RegExpMacroAssemblerARM::CheckNotBackReferenceIgnoreCase( |
__ b(ne, &fail); |
__ sub(r3, r3, Operand('a')); |
__ cmp(r3, Operand('z' - 'a')); // Is r3 a lowercase letter? |
+#ifndef ENABLE_LATIN_1 |
__ b(hi, &fail); |
- |
+#else |
+ __ b(ls, &loop_check); // In range 'a'-'z'. |
+ // Latin-1: Check for values in range [224,254] but not 247. |
+ __ sub(r3, r3, Operand(224 - 'a')); |
+ __ cmp(r3, Operand(254 - 224)); |
+ __ b(hi, &fail); // Weren't Latin-1 letters. |
+ __ cmp(r3, Operand(247 - 224)); // Check for 247. |
+ __ b(eq, &fail); |
+#endif |
__ bind(&loop_check); |
__ cmp(r0, r1); |