nanowasm/src/op/constants/i64_const.c

30 lines
486 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)
{
varint64 value;
if (varint64_read(f, &value))
{
LOG("%s: varint32_read failed\n", __func__);
return -1;
}
return 0;
}
int op_i64_const(struct nw_interp *const i, FILE *const f)
{
return op(i, f);
}
int check_i64_const(FILE *const f)
{
return op(NULL, f);
}