Commit f9861c11 authored by Jaideep Bajwa's avatar Jaideep Bajwa Committed by Commit Bot

[wasm] fix WASM test failures on big endian

WasmGraphBuilder::StoreMem is called with the last argument
as default with machine rep = kNode, which causes
BuildChangeEndiannessStore(val, memtype, type) to fail.

Originally added this fix in https://chromium-review.googlesource.com/633755
which got removed in this refactor https://chromium-review.googlesource.com/640591

R=clemensh@chromium.org, titzer@chromium.org, binji@chromium.org, jyan@ca.ibm.com
BUG=
LOG=N

Change-Id: I441e9b67517a31df780b35d2403c688d667b6789
Reviewed-on: https://chromium-review.googlesource.com/661097Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47984}
parent 6c447496
......@@ -287,7 +287,7 @@ class WasmGraphBuilder {
wasm::WasmCodePosition position);
Node* StoreMem(MachineType memtype, Node* index, uint32_t offset,
uint32_t alignment, Node* val, wasm::WasmCodePosition position,
wasm::ValueType type = wasm::kWasmStmt);
wasm::ValueType type);
static void PrintDebugName(Node* node);
Node* Control() { return *control_; }
......
......@@ -311,7 +311,7 @@ class WasmGraphBuildingInterface {
const MemoryAccessOperand<true>& operand, const Value& index,
const Value& value) {
BUILD(StoreMem, mem_type, index.node, operand.offset, operand.alignment,
value.node, decoder->position());
value.node, decoder->position(), type);
}
void CurrentMemoryPages(Decoder* decoder, Value* result) {
......
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