diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-02 21:19:14 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-02 21:19:14 +0300 |
| commit | c671d6612be0fb28eea498246c39bb5032afa872 (patch) | |
| tree | 9b1ccb07208c5659ed865cbfd299ac40216dc6ab /ops | |
| parent | 9251fddfdfb11b9e1b2dff643aa20ec82e9f7036 (diff) | |
| download | copyjit-c671d6612be0fb28eea498246c39bb5032afa872.tar.gz copyjit-c671d6612be0fb28eea498246c39bb5032afa872.zip | |
add some basic checks
Diffstat (limited to 'ops')
| -rw-r--r-- | ops/common.h | 4 |
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) |
