Skip to content

Commit 8dbcf33

Browse files
committed
WASM_X86: Support exit
1 parent 8b8f29c commit 8dbcf33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libasr/codegen/wasm_to_x86.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class X86Visitor : public WASMDecoder<X86Visitor>,
2525
wasm_bytes.from_pointer_n(code.data(), code.size());
2626
}
2727

28+
void visit_Unreachable() {}
29+
2830
void visit_Return() {}
2931

3032
void visit_Call(uint32_t func_index) {
@@ -137,7 +139,7 @@ class X86Visitor : public WASMDecoder<X86Visitor>,
137139

138140
// Add runtime library functions
139141
emit_print_int(m_a, "print_i32");
140-
emit_exit(m_a, "exit", 0);
142+
emit_exit2(m_a, "exit");
141143

142144
for (uint32_t i = 0; i < type_indices.size(); i++) {
143145
if (i < type_indices.size() - 1U) {

0 commit comments

Comments
 (0)