diff options
Diffstat (limited to 'src/emu/cpu/sh2/sh2comn.h')
-rw-r--r-- | src/emu/cpu/sh2/sh2comn.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/emu/cpu/sh2/sh2comn.h b/src/emu/cpu/sh2/sh2comn.h index e70ea929ed0..cf72e90df48 100644 --- a/src/emu/cpu/sh2/sh2comn.h +++ b/src/emu/cpu/sh2/sh2comn.h @@ -21,6 +21,7 @@ #include "cpu/drcfe.h" #include "cpu/drcuml.h" #include "cpu/drcumlsh.h" +class sh2_frontend; #endif #define SH2_CODE_XOR(a) ((a) ^ NATIVE_ENDIAN_VALUE_LE_BE(2,0)) @@ -155,7 +156,7 @@ typedef struct #ifdef USE_SH2DRC drccache * cache; /* pointer to the DRC code cache */ drcuml_state * drcuml; /* DRC UML generator state */ - drcfe_state * drcfe; /* pointer to the DRC front-end state */ + sh2_frontend * drcfe; /* pointer to the DRC front-end state */ UINT32 drcoptions; /* configurable DRC options */ /* internal stuff */ @@ -184,6 +185,28 @@ typedef struct #endif } sh2_state; +#ifdef USE_SH2DRC +class sh2_frontend : public drc_frontend +{ +public: + sh2_frontend(sh2_state &state, UINT32 window_start, UINT32 window_end, UINT32 max_sequence); + +protected: + virtual bool describe(opcode_desc &desc, const opcode_desc *prev); + +private: + bool describe_group_0(opcode_desc &desc, const opcode_desc *prev, UINT16 opcode); + bool describe_group_2(opcode_desc &desc, const opcode_desc *prev, UINT16 opcode); + bool describe_group_3(opcode_desc &desc, const opcode_desc *prev, UINT16 opcode); + bool describe_group_4(opcode_desc &desc, const opcode_desc *prev, UINT16 opcode); + bool describe_group_6(opcode_desc &desc, const opcode_desc *prev, UINT16 opcode); + bool describe_group_8(opcode_desc &desc, const opcode_desc *prev, UINT16 opcode); + bool describe_group_12(opcode_desc &desc, const opcode_desc *prev, UINT16 opcode); + + sh2_state &m_context; +}; +#endif + void sh2_common_init(sh2_state *sh2, legacy_cpu_device *device, device_irq_callback irqcallback); void sh2_recalc_irq(sh2_state *sh2); void sh2_set_irq_line(sh2_state *sh2, int irqline, int state); |