summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2013-08-27 13:27:39 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2013-08-27 13:27:39 +0000
commit0b59be30bb2b6a2bb58ac1c85e51879409d85efa (patch)
treead915f534fc6691fd916e66338e5e238a1a24c52
parentde5f5af3dc3ccfabc3c40236f2bc3cfc45380fa3 (diff)
Added command line option to force DRC C backend [Miodrag Milanovic]
-rw-r--r--src/emu/cpu/arm7/arm7drc.c3
-rw-r--r--src/emu/cpu/drcuml.c2
-rw-r--r--src/emu/cpu/drcuml.h1
-rw-r--r--src/emu/cpu/mips/mips3drc.c3
-rw-r--r--src/emu/cpu/powerpc/ppcdrc.c3
-rw-r--r--src/emu/cpu/rsp/rspdrc.c5
-rw-r--r--src/emu/cpu/sh2/sh2drc.c3
-rw-r--r--src/emu/emuopts.c1
-rw-r--r--src/emu/emuopts.h2
9 files changed, 4 insertions, 19 deletions
diff --git a/src/emu/cpu/arm7/arm7drc.c b/src/emu/cpu/arm7/arm7drc.c
index 2086f2238d1..559d65518a3 100644
--- a/src/emu/cpu/arm7/arm7drc.c
+++ b/src/emu/cpu/arm7/arm7drc.c
@@ -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)
diff --git a/src/emu/cpu/drcuml.c b/src/emu/cpu/drcuml.c
index eaa66d63792..9f9a1533568 100644
--- a/src/emu/cpu/drcuml.c
+++ b/src/emu/cpu/drcuml.c
@@ -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),
diff --git a/src/emu/cpu/drcuml.h b/src/emu/cpu/drcuml.h
index 39ade10059a..5c7e6630316 100644
--- a/src/emu/cpu/drcuml.h
+++ b/src/emu/cpu/drcuml.h
@@ -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
diff --git a/src/emu/cpu/mips/mips3drc.c b/src/emu/cpu/mips/mips3drc.c
index 8ea8c480fa7..bc0bb9c485d 100644
--- a/src/emu/cpu/mips/mips3drc.c
+++ b/src/emu/cpu/mips/mips3drc.c
@@ -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)
diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c
index 8043b04591c..3cf48a88c5a 100644
--- a/src/emu/cpu/powerpc/ppcdrc.c
+++ b/src/emu/cpu/powerpc/ppcdrc.c
@@ -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)
diff --git a/src/emu/cpu/rsp/rspdrc.c b/src/emu/cpu/rsp/rspdrc.c
index 8a0f749e597..479d10d3786 100644
--- a/src/emu/cpu/rsp/rspdrc.c
+++ b/src/emu/cpu/rsp/rspdrc.c
@@ -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;
diff --git a/src/emu/cpu/sh2/sh2drc.c b/src/emu/cpu/sh2/sh2drc.c
index 84fec6dc472..9fe50771481 100644
--- a/src/emu/cpu/sh2/sh2drc.c
+++ b/src/emu/cpu/sh2/sh2drc.c
@@ -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)
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index c03415b82ed..099b9cbe68c 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -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" },
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index bd48404e602..d95ce2c8409 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -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); }