aboutsummaryrefslogtreecommitdiff
path: root/ops/common.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-08-02 21:19:14 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-08-02 21:19:14 +0300
commitc671d6612be0fb28eea498246c39bb5032afa872 (patch)
tree9b1ccb07208c5659ed865cbfd299ac40216dc6ab /ops/common.h
parent9251fddfdfb11b9e1b2dff643aa20ec82e9f7036 (diff)
downloadcopyjit-c671d6612be0fb28eea498246c39bb5032afa872.tar.gz
copyjit-c671d6612be0fb28eea498246c39bb5032afa872.zip
add some basic checks
Diffstat (limited to 'ops/common.h')
-rw-r--r--ops/common.h4
1 files changed, 2 insertions, 2 deletions
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)