65oo2/vm/jit/jit.h

20 lines
416 B
C
Raw Permalink Normal View History

2024-02-22 04:10:55 +00:00
#ifndef JIT_H
# define JIT_H
# include "lib/register.h"
typedef struct
{
uint32_t registers[REG_MAX];
size_t count;
uint8_t code[];
} JitBuffer;
JitBuffer *jit_buffer_new(void);
void jit_buffer_ins(JitBuffer *buff, int size, uint64_t ins);
void jit_buffer_imm(JitBuffer *buff, int size, void *value);
void jit_buffer_finalize(JitBuffer *buff);
void jit_buffer_destroy(JitBuffer *buff);
#endif /* !JIT_H */