summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index 70a593bec..3200e77a7 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -1993,7 +1993,8 @@ void BinaryInstWriter::visitRttCanon(RttCanon* curr) {
}
void BinaryInstWriter::visitRttSub(RttSub* curr) {
- o << int8_t(BinaryConsts::GCPrefix) << U32LEB(BinaryConsts::RttSub);
+ o << int8_t(BinaryConsts::GCPrefix);
+ o << U32LEB(curr->fresh ? BinaryConsts::RttFreshSub : BinaryConsts::RttSub);
parent.writeIndexedHeapType(curr->type.getRtt().heapType);
}