summaryrefslogtreecommitdiff
path: root/src/binary-writer.cc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-01-29 14:09:50 -0600
committerBen Smith <binjimin@gmail.com>2019-01-29 12:09:50 -0800
commit4c95f0e9fbedd922b7161a0a00c90c8eb7dac694 (patch)
treed87917832f45b9ba95adee96fb017182ad3e072f /src/binary-writer.cc
parent12e8de7f5b3a5be01e3e6347c64168ea34b85a38 (diff)
downloadwabt-4c95f0e9fbedd922b7161a0a00c90c8eb7dac694.tar.gz
wabt-4c95f0e9fbedd922b7161a0a00c90c8eb7dac694.tar.bz2
wabt-4c95f0e9fbedd922b7161a0a00c90c8eb7dac694.zip
Update bulk memory instruction binary encodings (#999)
This commit updates wabt wrt to two recent PRs: * WebAssembly/bulk-memory-operations#43 * WebAssembly/bulk-memory-operations#45
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r--src/binary-writer.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc
index b6c33ccc..be117869 100644
--- a/src/binary-writer.cc
+++ b/src/binary-writer.cc
@@ -566,6 +566,7 @@ void BinaryWriter::WriteExpr(const Func* func, const Expr* expr) {
case ExprType::MemoryCopy:
WriteOpcode(stream_, Opcode::MemoryCopy);
WriteU32Leb128(stream_, 0, "memory.copy reserved");
+ WriteU32Leb128(stream_, 0, "memory.copy reserved");
break;
case ExprType::MemoryDrop: {
Index index =
@@ -586,8 +587,8 @@ void BinaryWriter::WriteExpr(const Func* func, const Expr* expr) {
Index index =
module_->GetDataSegmentIndex(cast<MemoryInitExpr>(expr)->var);
WriteOpcode(stream_, Opcode::MemoryInit);
- WriteU32Leb128(stream_, 0, "memory.init reserved");
WriteU32Leb128(stream_, index, "memory.init segment");
+ WriteU32Leb128(stream_, 0, "memory.init reserved");
break;
}
case ExprType::MemorySize:
@@ -597,6 +598,7 @@ void BinaryWriter::WriteExpr(const Func* func, const Expr* expr) {
case ExprType::TableCopy:
WriteOpcode(stream_, Opcode::TableCopy);
WriteU32Leb128(stream_, 0, "table.copy reserved");
+ WriteU32Leb128(stream_, 0, "table.copy reserved");
break;
case ExprType::TableDrop: {
Index index =
@@ -609,8 +611,8 @@ void BinaryWriter::WriteExpr(const Func* func, const Expr* expr) {
Index index =
module_->GetElemSegmentIndex(cast<TableInitExpr>(expr)->var);
WriteOpcode(stream_, Opcode::TableInit);
- WriteU32Leb128(stream_, 0, "table.init reserved");
WriteU32Leb128(stream_, index, "table.init segment");
+ WriteU32Leb128(stream_, 0, "table.init reserved");
break;
}
case ExprType::Nop: