20 lines
416 B
C
20 lines
416 B
C
#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 */
|