aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-09-21 17:51:41 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-09-21 17:51:41 +0200
commit91da5622c92020262d04c5624ff801243e827323 (patch)
tree1ee7b6182c79d2a049b9b457292c844c9eabab2d
parent155e9b30b135a99b42e0f42e9062c266f527df4b (diff)
downloadAGH-engineering-thesis-91da5622c92020262d04c5624ff801243e827323.tar.gz
AGH-engineering-thesis-91da5622c92020262d04c5624ff801243e827323.zip
point out the fact, that only one value type is supported for now
-rw-r--r--tools/parse_module.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/parse_module.c b/tools/parse_module.c
index 7c54144..155fc9c 100644
--- a/tools/parse_module.c
+++ b/tools/parse_module.c
@@ -4,11 +4,21 @@
static inline int is_valid_valtype(char value_type)
{
- return
- value_type == VALTYPE_I32 ||
- value_type == VALTYPE_I64 ||
- value_type == VALTYPE_F32 ||
- value_type == VALTYPE_F64;
+ if (value_type == VALTYPE_I32)
+ return 1;
+
+ if (value_type == VALTYPE_I64 ||
+ value_type == VALTYPE_F32 ||
+ value_type == VALTYPE_F64)
+ PRERR("Only type i32 is recognized for now");
+
+ return -1;
+
+ /* return */
+ /* value_type == VALTYPE_I32 || */
+ /* value_type == VALTYPE_I64 || */
+ /* value_type == VALTYPE_F32 || */
+ /* value_type == VALTYPE_F64; */
}
static inline int is_valid_exportdesc(char desc)