1 // license:BSD-3-Clause 2 // copyright-holders:Vas Crabb 3 /*************************************************************************** 4 5 WE|AT&T DSP16 series recompiler 6 7 ***************************************************************************/ 8 #ifndef MAME_CPU_DSP16_DSP16RC_H 9 #define MAME_CPU_DSP16_DSP16RC_H 10 11 #pragma once 12 13 #include "dsp16.h" 14 #include "dsp16fe.h" 15 16 #include "cpu/drcuml.h" 17 18 19 class dsp16_device_base::recompiler 20 { 21 public: 22 // construction/destruction 23 recompiler(dsp16_device_base &host, u32 flags); 24 ~recompiler(); 25 26 private: 27 // compilation boundaries 28 enum : u32 29 { 30 COMPILE_BACKWARDS_BYTES = 64, 31 COMPILE_FORWARDS_BYTES = 256, 32 COMPILE_MAX_INSTRUCTIONS = (COMPILE_BACKWARDS_BYTES / 2) + (COMPILE_FORWARDS_BYTES / 2), 33 COMPILE_MAX_SEQUENCE = 64 34 }; 35 36 // exit codes for recompiled blocks 37 enum : int 38 { 39 EXEC_OUT_OF_CYCLES, 40 EXEC_MISSING_CODE, 41 EXEC_UNMAPPED_CODE, 42 EXEC_RESET_CACHE 43 }; 44 45 // host CPU device, frontend to describe instructions, and UML engine 46 dsp16_device_base &m_host; 47 core_state &m_core; 48 frontend m_frontend; 49 drcuml_state m_uml; 50 }; 51 52 #endif // MAME_CPU_DSP16_DSP16RC_H 53