diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-26 17:13:56 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-08-26 17:13:56 +0300 |
| commit | 4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0 (patch) | |
| tree | 3e9cdf4b34f4f2beffa72a837c409e567d84adb2 /lib/imm_defns.h | |
| parent | e8b00dae488e9c9f6f9ef7de99bc340de61541b7 (diff) | |
| download | copyjit-4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0.tar.gz copyjit-4269b6d3d0aeff1cf1bae3eac5f40cceb75576e0.zip | |
apply fixes to make jit-comparison easier
Diffstat (limited to 'lib/imm_defns.h')
| -rw-r--r-- | lib/imm_defns.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/imm_defns.h b/lib/imm_defns.h index 6b9c52a..f3b8baa 100644 --- a/lib/imm_defns.h +++ b/lib/imm_defns.h @@ -64,4 +64,12 @@ void *compile_liy(ctx_t *ctx, unsigned long i) ctx->pc += gen_liy_len; return pc; } +void *compile_bani(ctx_t *ctx, unsigned long i) + { + void *pc = ctx->pc; + memcpy(ctx->pc, gen_bani, gen_bani_len); + *(unsigned long *)(ctx->pc + gen_bani_len - 8) = i; + ctx->pc += gen_bani_len; + return pc; + } #endif /* COPYJIT_DEFNS_H */ |
