Commit f81f301f authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Fix BinOp tests for big endian systems

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: I0f82f60dae124167d5dfb05b3ecb6f8b0be7c2f4
Reviewed-on: https://chromium-review.googlesource.com/995458Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52360}
parent 7aa7c5dd
...@@ -3197,11 +3197,11 @@ void BinOpOnDifferentRegisters(WasmExecutionMode execution_mode, ValueType type, ...@@ -3197,11 +3197,11 @@ void BinOpOnDifferentRegisters(WasmExecutionMode execution_mode, ValueType type,
for (ctype lhs_value : inputs) { for (ctype lhs_value : inputs) {
for (ctype rhs_value : inputs) { for (ctype rhs_value : inputs) {
if (lhs == rhs) lhs_value = rhs_value; if (lhs == rhs) lhs_value = rhs_value;
memory[lhs] = lhs_value; WriteLittleEndianValue<ctype>(&memory[lhs], lhs_value);
memory[rhs] = rhs_value; WriteLittleEndianValue<ctype>(&memory[rhs], rhs_value);
int64_t expect = expect_fn(lhs_value, rhs_value); int64_t expect = expect_fn(lhs_value, rhs_value);
CHECK_EQ(0, r.Call()); CHECK_EQ(0, r.Call());
CHECK_EQ(expect, memory[0]); CHECK_EQ(expect, ReadLittleEndianValue<ctype>(&memory[0]));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment