Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 04086586e5083ddb82f1f05e0fc3ea9b99dfa885..3e27fafc476561a7fb19599a1ebf9924846101ac 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -6463,7 +6463,12 @@ void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
// Compare lengths - strings up to min-length are equal. |
__ bind(&compare_lengths); |
__ test(length_delta, length_delta); |
+#ifndef ENABLE_LATIN_1 |
__ j(not_zero, &result_not_equal, Label::kNear); |
+#else |
+ Label length_not_equal; |
+ __ j(not_zero, &length_not_equal, Label::kNear); |
+#endif |
// Result is EQUAL. |
STATIC_ASSERT(EQUAL == 0); |
@@ -6472,8 +6477,19 @@ void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm, |
__ ret(0); |
Label result_greater; |
+#ifdef ENABLE_LATIN_1 |
+ Label result_less; |
+ __ bind(&length_not_equal); |
+ __ j(greater, &result_greater, Label::kNear); |
+ __ jmp(&result_less, Label::kNear); |
+#endif |
__ bind(&result_not_equal); |
+#ifndef ENABLE_LATIN_1 |
__ j(greater, &result_greater, Label::kNear); |
+#else |
+ __ j(above, &result_greater, Label::kNear); |
+ __ bind(&result_less); |
+#endif |
// Result is LESS. |
__ Set(eax, Immediate(Smi::FromInt(LESS))); |