Added command line option to force DRC C backend [Miodrag Milanovic]

This commit is contained in:
Miodrag Milanovic 2013-08-27 13:27:39 +00:00
parent de5f5af3dc
commit 0b59be30bb
9 changed files with 4 additions and 19 deletions

View File

@ -41,7 +41,6 @@
DEBUGGING
***************************************************************************/
#define FORCE_C_BACKEND (0)
#define LOG_UML (0)
#define LOG_NATIVE (0)
@ -155,8 +154,6 @@ void arm7_cpu_device::arm7_drc_init()
m_impstate.cache = cache;
/* initialize the UML generator */
if (FORCE_C_BACKEND)
flags |= DRCUML_OPTION_USE_C;
if (LOG_UML)
flags |= DRCUML_OPTION_LOG_UML;
if (LOG_NATIVE)

View File

@ -150,7 +150,7 @@ drcbe_interface::~drcbe_interface()
drcuml_state::drcuml_state(device_t &device, drc_cache &cache, UINT32 flags, int modes, int addrbits, int ignorebits)
: m_device(device),
m_cache(cache),
m_beintf((flags & DRCUML_OPTION_USE_C) ?
m_beintf((device.machine().options().drc_use_c()) ?
*static_cast<drcbe_interface *>(auto_alloc(device.machine(), drcbe_c(*this, device, cache, flags, modes, addrbits, ignorebits))) :
*static_cast<drcbe_interface *>(auto_alloc(device.machine(), drcbe_native(*this, device, cache, flags, modes, addrbits, ignorebits)))),
m_umllog(NULL),

View File

@ -51,7 +51,6 @@
//**************************************************************************
// these options are passed into drcuml_alloc() and control global behaviors
const UINT32 DRCUML_OPTION_USE_C = 0x0001; // always use the C back-end
const UINT32 DRCUML_OPTION_LOG_UML = 0x0002; // generate a UML disassembly of each block
const UINT32 DRCUML_OPTION_LOG_NATIVE = 0x0004; // tell the back-end to generate a native disassembly of each block

View File

@ -68,7 +68,6 @@ using namespace uml;
DEBUGGING
***************************************************************************/
#define FORCE_C_BACKEND (0)
#define LOG_UML (0)
#define LOG_NATIVE (0)
@ -407,8 +406,6 @@ static void mips3_init(mips3_flavor flavor, int bigendian, legacy_cpu_device *de
mips3->impstate->cache = cache;
/* initialize the UML generator */
if (FORCE_C_BACKEND)
flags |= DRCUML_OPTION_USE_C;
if (LOG_UML)
flags |= DRCUML_OPTION_LOG_UML;
if (LOG_NATIVE)

View File

@ -34,7 +34,6 @@ extern offs_t ppc_dasm_one(char *buffer, UINT32 pc, UINT32 op);
DEBUGGING
***************************************************************************/
#define FORCE_C_BACKEND (0)
#define LOG_UML (0)
#define LOG_NATIVE (0)
@ -569,8 +568,6 @@ static void ppcdrc_init(powerpc_flavor flavor, UINT32 cap, int tb_divisor, legac
ppc->impstate->cache = cache;
/* initialize the UML generator */
if (FORCE_C_BACKEND)
flags |= DRCUML_OPTION_USE_C;
if (LOG_UML)
flags |= DRCUML_OPTION_LOG_UML;
if (LOG_NATIVE)

View File

@ -37,7 +37,6 @@ extern offs_t rsp_dasm_one(char *buffer, offs_t pc, UINT32 op);
DEBUGGING
***************************************************************************/
#define FORCE_C_BACKEND (0)
#define LOG_UML (0)
#define LOG_NATIVE (0)
@ -719,10 +718,6 @@ static CPU_INIT( rsp )
rsp->impstate->cache = cache;
/* initialize the UML generator */
if (FORCE_C_BACKEND)
{
flags |= DRCUML_OPTION_USE_C;
}
if (LOG_UML)
{
flags |= DRCUML_OPTION_LOG_UML;

View File

@ -23,7 +23,6 @@ using namespace uml;
DEBUGGING
***************************************************************************/
#define FORCE_C_BACKEND (0) // use the C backend even when a native one is available
#define LOG_UML (0) // log UML assembly
#define LOG_NATIVE (0) // log native assembly
@ -675,8 +674,6 @@ static CPU_INIT( sh2 )
sh2->pcfsel = 0;
/* initialize the UML generator */
if (FORCE_C_BACKEND)
flags |= DRCUML_OPTION_USE_C;
if (LOG_UML)
flags |= DRCUML_OPTION_LOG_UML;
if (LOG_NATIVE)

View File

@ -190,6 +190,7 @@ const options_entry emu_options::s_option_entries[] =
// misc options
{ NULL, NULL, OPTION_HEADER, "CORE MISC OPTIONS" },
{ OPTION_DRC, "1", OPTION_BOOLEAN, "enable DRC cpu core if available" },
{ OPTION_DRC_USE_C, "0", OPTION_BOOLEAN, "force DRC use C backend" },
{ OPTION_BIOS, NULL, OPTION_STRING, "select the system BIOS to use" },
{ OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" },
{ OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },

View File

@ -192,6 +192,7 @@ enum
// core misc options
#define OPTION_DRC "drc"
#define OPTION_DRC_USE_C "drc_use_c"
#define OPTION_BIOS "bios"
#define OPTION_CHEAT "cheat"
#define OPTION_SKIP_GAMEINFO "skip_gameinfo"
@ -355,6 +356,7 @@ public:
// core misc options
bool drc() const { return bool_value(OPTION_DRC); }
bool drc_use_c() const { return bool_value(OPTION_DRC_USE_C); }
const char *bios() const { return value(OPTION_BIOS); }
bool cheat() const { return bool_value(OPTION_CHEAT); }
bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); }