Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: src/x64/code-stubs-x64.cc

Issue 11818025: Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM fix Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 7dd828136b22afaa5f255977d07618d77f9dc3d5..bf61f75c4bb8cba259054674ba7c33e8f6575f4c 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -5473,16 +5473,32 @@ void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
// Compare lengths (precomputed).
__ bind(&compare_lengths);
__ SmiTest(length_difference);
+#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.
__ Move(rax, Smi::FromInt(EQUAL));
__ 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);
// Unequal comparison of left to right, either character or length.
+#ifndef ENABLE_LATIN_1
__ j(greater, &result_greater, Label::kNear);
+#else
+ __ j(above, &result_greater, Label::kNear);
+ __ bind(&result_less);
+#endif
// Result is LESS.
__ Move(rax, Smi::FromInt(LESS));

Powered by Google App Engine
This is Rietveld 408576698