blob: 32c8b33c7aeca5c7b408233856aab7b58b521527 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <ejit/ejit.h>
#include <assert.h>
#include "do_jit.h"
static uint16_t data = 0xffff;
int main()
{
struct ejit_func *f = ejit_create_func(EJIT_TYPE(unsigned long), 0,
NULL);
ejit_ldi_i16(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(f, 0, NULL) == -1);
ejit_destroy_func(f);
}
|