aboutsummaryrefslogtreecommitdiff
path: root/ops/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'ops/common.h')
-rw-r--r--ops/common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ops/common.h b/ops/common.h
index 6d3119a..d283651 100644
--- a/ops/common.h
+++ b/ops/common.h
@@ -18,8 +18,10 @@ typedef reg_t (*op_call)(reg_t *sp, reg_t a, reg_t x, reg_t y, reg_t o);
return CALL(target, 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)); \
+ do {\
+ if (cond) {JUMP(target, sp, a, x, y, o);}\
+ else {NEXT_OP(sp, a, x, y, o);}\
+ } while (0)
#define DEFINE_OP(name) reg_t _op(reg_t *sp, reg_t a, reg_t x, reg_t y, reg_t o)