diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-30 16:39:24 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-30 16:40:12 +0300 |
commit | e618924df98d4ee5037db86c768a8c8014e49c4c (patch) | |
tree | abf7e2457f49c52d3ea6c6c5fb79577e5a4ad011 /tests/ldi_i64.c | |
parent | 451797936119d8236843c4e9aee4a47dc5cddd56 (diff) | |
download | ejit-e618924df98d4ee5037db86c768a8c8014e49c4c.tar.gz ejit-e618924df98d4ee5037db86c768a8c8014e49c4c.zip |
work through loads and stores
Diffstat (limited to 'tests/ldi_i64.c')
-rw-r--r-- | tests/ldi_i64.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ldi_i64.c b/tests/ldi_i64.c new file mode 100644 index 0000000..a7a8c98 --- /dev/null +++ b/tests/ldi_i64.c @@ -0,0 +1,20 @@ +#include <ejit/ejit.h> +#include <assert.h> +#include "do_jit.h" + +int main() +{ + static uint64_t data[] = { 0xffffffffffffffff, 0x00000000, + 0x42424242 }; + + struct ejit_func *f = ejit_create_func(EJIT_TYPE(unsigned long), 0, + NULL); + ejit_ldi_i64(f, EJIT_GPR(0), data); + ejit_retr(f, EJIT_GPR(0)); + + ejit_select_compile_func(f, 1, 0, true, do_jit); + + assert(ejit_run_func(f, 0, NULL) == -1); + + ejit_destroy_func(f); +} |