diff options
author | Thomas Lively <tlively@google.com> | 2023-09-18 12:42:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 19:42:45 +0000 |
commit | 003a6ffa56d7d1aa4918170236daaded6211d13b (patch) | |
tree | 11e933aaa4a563957487ebc5ed52c75eedf61427 /src/wasm/wasm-stack.cpp | |
parent | cd94f8af963ea8233fc15db35ff8d9e70aff22cf (diff) | |
download | binaryen-003a6ffa56d7d1aa4918170236daaded6211d13b.tar.gz binaryen-003a6ffa56d7d1aa4918170236daaded6211d13b.tar.bz2 binaryen-003a6ffa56d7d1aa4918170236daaded6211d13b.zip |
Implement table.fill (#5949)
This instruction was standardized as part of the bulk memory proposal, but we
never implemented it until now. Leave similar instructions like table.copy as
future work.
Fixes #5939.
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r-- | src/wasm/wasm-stack.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 1ddf69d41..2042189fd 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -1909,6 +1909,11 @@ void BinaryInstWriter::visitTableGrow(TableGrow* curr) { o << U32LEB(parent.getTableIndex(curr->table)); } +void BinaryInstWriter::visitTableFill(TableFill* curr) { + o << int8_t(BinaryConsts::MiscPrefix) << U32LEB(BinaryConsts::TableFill); + o << U32LEB(parent.getTableIndex(curr->table)); +} + void BinaryInstWriter::visitTry(Try* curr) { breakStack.push_back(curr->name); o << int8_t(BinaryConsts::Try); |