nanowasm/src/op/memory/i32_store.c

35 lines
629 B
C

#include <log.h>
#include <ops.h>
#include <nanowasm/nw.h>
#include <wasm_types.h>
#include <stddef.h>
#include <stdio.h>
static int op(struct nw_interp *const i, FILE *const f)
{
varint32 flags, offset;
if (varint32_read(f, &flags))
{
LOG("%s: varint32_read flags failed\n", __func__);
return 1;
}
else if (varint32_read(f, &offset))
{
LOG("%s: varint32_read offset failed\n", __func__);
return 1;
}
return 0;
}
int op_i32_store(struct nw_interp *const i, FILE *const f)
{
return op(i, f);
}
int check_i32_store(FILE *const f)
{
return op(NULL, f);
}