diff options
Diffstat (limited to 'src/devices/cpu/mb86235/mb86235drc.cpp')
-rw-r--r-- | src/devices/cpu/mb86235/mb86235drc.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/devices/cpu/mb86235/mb86235drc.cpp b/src/devices/cpu/mb86235/mb86235drc.cpp index 12e0ab60650..e45b07ba0a8 100644 --- a/src/devices/cpu/mb86235/mb86235drc.cpp +++ b/src/devices/cpu/mb86235/mb86235drc.cpp @@ -13,7 +13,6 @@ #include "cpu/drcfe.h" #include "cpu/drcuml.h" #include "cpu/drcumlsh.h" -#include "debugger.h" #include "mb86235defs.h" @@ -189,7 +188,7 @@ inline void mb86235_device::load_fast_iregs(drcuml_block &block) { int regnum; - for (regnum = 0; regnum < ARRAY_LENGTH(m_regmap); regnum++) + for (regnum = 0; regnum < std::size(m_regmap); regnum++) { if (m_regmap[regnum].is_int_register()) { @@ -207,7 +206,7 @@ void mb86235_device::save_fast_iregs(drcuml_block &block) { int regnum; - for (regnum = 0; regnum < ARRAY_LENGTH(m_regmap); regnum++) + for (regnum = 0; regnum < std::size(m_regmap); regnum++) { if (m_regmap[regnum].is_int_register()) { @@ -529,7 +528,7 @@ void mb86235_device::generate_sequence_instruction(drcuml_block &block, compiler UML_MAPVAR(block, MAPVAR_CYCLES, compiler.cycles); // mapvar CYCLES,compiler.cycles /* if we are debugging, call the debugger */ - if ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0) + if (debugger_enabled()) { UML_MOV(block, mem(&m_core->pc), desc->pc); // mov [pc],desc->pc save_fast_iregs(block); // <save fastregs> @@ -1530,7 +1529,7 @@ void mb86235_device::generate_control(drcuml_block &block, compiler_state &compi int ef1 = (op >> 16) & 0x3f; int ef2 = op & 0xffff; int cop = (op >> 22) & 0x1f; -// int rel12 = (op & 0x800) ? (0xfffff000 | (op & 0xfff)) : (op & 0xfff); +// int rel12 = util::sext<int>(op, 12); switch (cop) { @@ -1719,8 +1718,7 @@ void mb86235_device::generate_xfer2(drcuml_block &block, compiler_state &compile int ary = (opcode >> 4) & 7; int md = opcode & 0xf; - int disp14 = (opcode >> 7) & 0x3fff; - if (disp14 & 0x2000) disp14 |= 0xffffc000; + int disp14 = util::sext((opcode >> 7) & 0x3fff, 14); if (op == 0) // MOV2 { @@ -1812,8 +1810,7 @@ void mb86235_device::generate_xfer3(drcuml_block &block, compiler_state &compile int ary = (opcode >> 4) & 7; int md = opcode & 0xf; - int disp = (opcode >> 7) & 0xfff; - if (disp & 0x800) disp |= 0xfffff800; + int disp = util::sext<int>((opcode >> 7) & 0xfff, 12); switch (dr >> 5) { |