#include #include #include "do_jit.h" int main(int argc, char *argv[]) { (void)argv; bool do_jit = argc > 1; static uint32_t data[] = { 0xffffffff, 0x00000000, 0x42424242 }; struct ejit_func *f = ejit_create_func(EJIT_TYPE(unsigned long), 0, NULL); ejit_ldi_i32(f, EJIT_GPR(0), data); ejit_retr(f, EJIT_GPR(0)); ejit_select_compile_func(f, 1, 0, false, do_jit); assert(ejit_run_func_i(f, 0, NULL) == (int32_t)data[0]); ejit_destroy_func(f); }