aboutsummaryrefslogtreecommitdiff
path: root/tools/translate_xmacro.h
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-10-03 21:45:24 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-10-05 10:13:38 +0200
commit7a61f213fb9be8ab7f9bd0fb33940b21fa143b05 (patch)
tree1bd5beab68c778d4d3a2543cf3661bfcb23445c2 /tools/translate_xmacro.h
parentc548c0ce5b2e7ca2784257966ebdd386e1f31218 (diff)
downloadAGH-engineering-thesis-7a61f213fb9be8ab7f9bd0fb33940b21fa143b05.tar.gz
AGH-engineering-thesis-7a61f213fb9be8ab7f9bd0fb33940b21fa143b05.zip
fixes, conditional if-not jump and translation of if-else instruction from wasm
Diffstat (limited to 'tools/translate_xmacro.h')
-rw-r--r--tools/translate_xmacro.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/translate_xmacro.h b/tools/translate_xmacro.h
index 5e5bd79..b271e75 100644
--- a/tools/translate_xmacro.h
+++ b/tools/translate_xmacro.h
@@ -15,6 +15,11 @@ TLS(WASM_I32_STORE, store_p, i32_i32, empty)
TLS(WASM_I32_STORE8, storeb_p, i32_i32, empty)
TLS(WASM_I32_STORE16, storew_p, i32_i32, empty)
+/*
+ * There are more checks to be performed in case of if, but we do them
+ * another way and only check for the i32 condition value here.
+ */
+TC (WASM_IF, if, i32, custom)
TC (WASM_CALL, call, custom, custom)
TC (WASM_LOCAL_GET, local_get, empty, custom)
TC (WASM_I32_CONST, const, empty, i32)