diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-29 14:20:07 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-29 14:20:07 +0300 |
commit | 49aa680ccdac46d1d2a7f9f250999b7ff7099548 (patch) | |
tree | 1de3bd5209feadfd147f7a05d1ac925f98b747b1 /src/common.h | |
parent | 29718f2e84478b296c3198ae6d35cfd5d79efb14 (diff) | |
download | ejit-49aa680ccdac46d1d2a7f9f250999b7ff7099548.tar.gz ejit-49aa680ccdac46d1d2a7f9f250999b7ff7099548.zip |
start adding tests
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/common.h b/src/common.h index 1f2289d..c3442c6 100644 --- a/src/common.h +++ b/src/common.h @@ -57,6 +57,8 @@ enum ejit_opcode { ADDR_F, ADDI, + ABSR_F, + SUBR, SUBR_F, SUBI, @@ -88,10 +90,10 @@ enum ejit_opcode { CALLI, CALLI_F, - RET, - RET_I, - RET_F, - RET_FI, + RETR, + RETI, + RETR_F, + RETI_F, RETVAL, RETVAL_F, @@ -132,7 +134,7 @@ struct ejit_func { union interp_ret { - long r; + int64_t r; double d; }; @@ -142,9 +144,13 @@ struct interp_state { struct vec args; }; -union interp_ret ejit_interp(struct ejit_func *f, size_t argc, struct ejit_arg args[argc], struct interp_state *state, bool run, void ***labels_wb); +union interp_ret ejit_interp(struct ejit_func *f, size_t argc, + struct ejit_arg args[argc], + struct interp_state *state, bool run, + void ***labels_wb); -long ejit_run_interp(struct ejit_func *f, size_t argc, struct ejit_arg args[argc], struct interp_state *state); +int64_t ejit_run_interp(struct ejit_func *f, size_t argc, + struct ejit_arg args[argc], struct interp_state *state); bool ejit_compile(struct ejit_func *f); |