diff --git a/src/tools/wasm2c.cc b/src/tools/wasm2c.cc index 656e53126e..ef45caadea 100644 --- a/src/tools/wasm2c.cc +++ b/src/tools/wasm2c.cc @@ -94,6 +94,7 @@ static void ParseOptions(int argc, char** argv) { exit(1); } s_features.disable_bulk_memory(); + s_features.enable_multi_memory(); } // TODO(binji): copied from binary-writer-spec.cc, probably should share. diff --git a/test/run-spec-wasm2c.py b/test/run-spec-wasm2c.py index c918ef3ad7..8c82d32db3 100755 --- a/test/run-spec-wasm2c.py +++ b/test/run-spec-wasm2c.py @@ -386,6 +386,7 @@ def main(args): error_cmdline=options.error_cmdline) wast2json.verbose = options.print_cmd wast2json.AppendOptionalArgs({'-v': options.verbose}) + wast2json.AppendArg('--enable-multi-memory') json_file_path = utils.ChangeDir( utils.ChangeExt(options.file, '.json'), out_dir) diff --git a/test/wasm2c/spec/multi-memory/binary.txt b/test/wasm2c/spec/multi-memory/binary.txt new file mode 100644 index 0000000000..1478a30647 --- /dev/null +++ b/test/wasm2c/spec/multi-memory/binary.txt @@ -0,0 +1,5 @@ +;;; TOOL: run-spec-wasm2c +;;; STDIN_FILE: third_party/testsuite/proposals/multi-memory/binary.wast +(;; STDOUT ;;; +0/0 tests passed. +;;; STDOUT ;;) diff --git a/test/wasm2c/spec/multi-memory/data.txt b/test/wasm2c/spec/multi-memory/data.txt new file mode 100644 index 0000000000..e2fdea4287 --- /dev/null +++ b/test/wasm2c/spec/multi-memory/data.txt @@ -0,0 +1,5 @@ +;;; TOOL: run-spec-wasm2c +;;; STDIN_FILE: third_party/testsuite/proposals/multi-memory/data.wast +(;; STDOUT ;;; +14/14 tests passed. +;;; STDOUT ;;) diff --git a/test/wasm2c/spec/multi-memory/memory.txt b/test/wasm2c/spec/multi-memory/memory.txt new file mode 100644 index 0000000000..ac7adaaf87 --- /dev/null +++ b/test/wasm2c/spec/multi-memory/memory.txt @@ -0,0 +1,5 @@ +;;; TOOL: run-spec-wasm2c +;;; STDIN_FILE: third_party/testsuite/proposals/multi-memory/memory.wast +(;; STDOUT ;;; +45/45 tests passed. +;;; STDOUT ;;) diff --git a/test/wasm2c/spec/multi-memory/memory_grow.txt b/test/wasm2c/spec/multi-memory/memory_grow.txt new file mode 100644 index 0000000000..351e5a8d73 --- /dev/null +++ b/test/wasm2c/spec/multi-memory/memory_grow.txt @@ -0,0 +1,5 @@ +;;; TOOL: run-spec-wasm2c +;;; STDIN_FILE: third_party/testsuite/proposals/multi-memory/memory_grow.wast +(;; STDOUT ;;; +131/131 tests passed. +;;; STDOUT ;;) diff --git a/test/wasm2c/spec/multi-memory/memory_size.txt b/test/wasm2c/spec/multi-memory/memory_size.txt new file mode 100644 index 0000000000..cbb63bc74a --- /dev/null +++ b/test/wasm2c/spec/multi-memory/memory_size.txt @@ -0,0 +1,5 @@ +;;; TOOL: run-spec-wasm2c +;;; STDIN_FILE: third_party/testsuite/proposals/multi-memory/memory_size.wast +(;; STDOUT ;;; +40/40 tests passed. +;;; STDOUT ;;)