Index: src/compiler/js-builtin-reducer.cc |
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc |
index 103bb09947103a36012daf7578da944e4a03e799..edf63ba262d55b2afb7dbd2b42886ba83b5b38d2 100644 |
--- a/src/compiler/js-builtin-reducer.cc |
+++ b/src/compiler/js-builtin-reducer.cc |
@@ -1141,9 +1141,16 @@ Reduction JSBuiltinReducer::ReduceStringIteratorNext(Node* node) { |
{ |
vtrue3 = graph()->NewNode( |
simplified()->NumberBitwiseOr(), |
+// Need to swap the order for big-endian platforms |
+#if V8_TARGET_BIG_ENDIAN |
+ graph()->NewNode(simplified()->NumberShiftLeft(), lead, |
+ jsgraph()->Int32Constant(16)), |
+ trail); |
+#else |
graph()->NewNode(simplified()->NumberShiftLeft(), trail, |
jsgraph()->Int32Constant(16)), |
lead); |
+#endif |
} |
Node* if_false3 = graph()->NewNode(common()->IfFalse(), branch3); |