dingusppc/cpu/ppc/jittables.h

49 lines
959 B
C
Raw Normal View History

2020-11-15 22:11:40 +00:00
#ifndef JIT_TABLES_H
#define JIT_TABLES_H
#include <cinttypes>
#include "ppcemu.h"
/** Instruction operands formats. */
enum class InstrOps {
opNone,
opDA,
opDAB,
opDASimm,
opSAUimm,
opSASh,
opRot,
opSSpr,
opBrRel,
opBrLink,
};
/* Control flow kind. */
enum class CFlowType {
CFL_NONE,
CFL_COND_BRANCH,
CFL_UNCOND_BRANCH,
CFL_TRAP,
};
struct InstrInfo {
InstrOps ops_fmt; // describes operands format
CFlowType cflow_type; // control flow type
int num_cycles;
// Required by JIT
//int flags; // flags updated by this instruction
};
extern uint16_t main_index_tab[];
extern uint16_t subgrp16_index_tab[];
extern uint16_t subgrp18_index_tab[];
extern uint16_t subgrp19_index_tab[];
extern uint16_t subgrp31_index_tab[];
extern uint16_t subgrp59_index_tab[];
extern uint16_t subgrp63_index_tab[];
void init_jit_tables(void);
#endif /* JIT_TABLES_H */