summaryrefslogtreecommitdiff
path: root/src/op/unreachable.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-11-26 22:43:30 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-12-29 23:36:21 +0100
commit52c18e60929b64285d4bb333f87482d954c9b2e0 (patch)
tree836ab3a01d160f45cda4f5a28522fc0bf471011c /src/op/unreachable.c
downloadnanowasm-first-step.tar.gz
First commitfirst-step
Diffstat (limited to 'src/op/unreachable.c')
-rw-r--r--src/op/unreachable.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/op/unreachable.c b/src/op/unreachable.c
new file mode 100644
index 0000000..c343052
--- /dev/null
+++ b/src/op/unreachable.c
@@ -0,0 +1,17 @@
+#include <ops.h>
+#include <interp.h>
+#include <interp_private.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+int op_unreachable(struct interp *const i)
+{
+ i->exception = "Unreachable instruction";
+ i->exit = true;
+ return 1;
+}
+
+int check_unreachable(FILE *const f)
+{
+ return 0;
+}