From c671d6612be0fb28eea498246c39bb5032afa872 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 2 Aug 2023 21:19:14 +0300 Subject: add some basic checks --- ops/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ops/common.h') diff --git a/ops/common.h b/ops/common.h index 6b124b3..6d3119a 100644 --- a/ops/common.h +++ b/ops/common.h @@ -17,9 +17,9 @@ typedef reg_t (*op_call)(reg_t *sp, reg_t a, reg_t x, reg_t y, reg_t o); #define JUMP(target, sp, a, x, y, o) \ return CALL(target, sp, a, x, y, o); -#define BRANCH(target, cond, sp, a, x, y, o) \ +#define BRANCH(target, cond, sp, a, x, y, o) \ return ((op_call)((cond) ? (void *)(target) : (void *)&__next_op)) \ - ((sp), (a), (x), (y), (o)); \ + ((sp), (a), (x), (y), (o)); \ #define DEFINE_OP(name) reg_t _op(reg_t *sp, reg_t a, reg_t x, reg_t y, reg_t o) -- cgit v1.3