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

Unified Diff: src/builtins/builtins-string.cc

Issue 2431223010: [builtins] fix load of surrogate pair for BE platform (Closed)
Patch Set: addressed comment Created 4 years, 2 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
« no previous file with comments | « no previous file | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-string.cc
diff --git a/src/builtins/builtins-string.cc b/src/builtins/builtins-string.cc
index 6b14e2510b773ea5f5004334041e174b043e3846..49fc6c28070186b6d713fd22aab4b147aa0943ab 100644
--- a/src/builtins/builtins-string.cc
+++ b/src/builtins/builtins-string.cc
@@ -1380,7 +1380,12 @@ compiler::Node* LoadSurrogatePairInternal(CodeStubAssembler* assembler,
switch (encoding) {
case UnicodeEncoding::UTF16:
var_result.Bind(assembler->WordOr(
+// Need to swap the order for big-endian platforms
+#if V8_TARGET_BIG_ENDIAN
+ assembler->WordShl(lead, assembler->Int32Constant(16)), trail));
+#else
assembler->WordShl(trail, assembler->Int32Constant(16)), lead));
+#endif
break;
case UnicodeEncoding::UTF32: {
« no previous file with comments | « no previous file | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698