diff options
Diffstat (limited to 'src/devices/cpu/v60')
-rw-r--r-- | src/devices/cpu/v60/v60.cpp | 15 | ||||
-rw-r--r-- | src/devices/cpu/v60/v60.h | 9 | ||||
-rw-r--r-- | src/devices/cpu/v60/v60d.cpp | 1445 | ||||
-rw-r--r-- | src/devices/cpu/v60/v60d.h | 359 |
4 files changed, 1075 insertions, 753 deletions
diff --git a/src/devices/cpu/v60/v60.cpp b/src/devices/cpu/v60/v60.cpp index dbe8ed08599..7891f5daa25 100644 --- a/src/devices/cpu/v60/v60.cpp +++ b/src/devices/cpu/v60/v60.cpp @@ -75,6 +75,7 @@ Package: 132-pin PGA, 200-pin QFP #include "emu.h" #include "v60.h" +#include "v60d.h" #include "debugger.h" DEFINE_DEVICE_TYPE(V60, v60_device, "v60", "V60") @@ -115,17 +116,9 @@ device_memory_interface::space_config_vector v60_device::memory_space_config() c } -offs_t v60_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) +util::disasm_interface *v60_device::create_disassembler() { - extern CPU_DISASSEMBLE( v60 ); - return CPU_DISASSEMBLE_NAME(v60)(this, stream, pc, oprom, opram, options); -} - - -offs_t v70_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) -{ - extern CPU_DISASSEMBLE( v70 ); - return CPU_DISASSEMBLE_NAME(v70)(this, stream, pc, oprom, opram, options); + return new v60_disassembler; } @@ -428,7 +421,7 @@ void v60_device::device_start() m_moddim = 0; m_program = &space(AS_PROGRAM); - m_direct = &m_program->direct(); + m_direct = m_program->direct<0>(); m_io = &space(AS_IO); save_item(NAME(m_fetch_xor)); diff --git a/src/devices/cpu/v60/v60.h b/src/devices/cpu/v60/v60.h index b891630f048..727972d7d99 100644 --- a/src/devices/cpu/v60/v60.h +++ b/src/devices/cpu/v60/v60.h @@ -110,9 +110,7 @@ protected: virtual void state_export(const device_state_entry &entry) override; // device_disasm_interface overrides - virtual uint32_t disasm_min_opcode_bytes() const override { return 1; } - virtual uint32_t disasm_max_opcode_bytes() const override { return 22; } - virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; + virtual util::disasm_interface *create_disassembler() override; private: typedef uint32_t (v60_device::*am_func)(); @@ -164,7 +162,7 @@ private: uint8_t m_irq_line; uint8_t m_nmi_line; address_space *m_program; - direct_read_data * m_direct; + direct_read_data<0> *m_direct; address_space *m_io; uint32_t m_PPC; int m_icount; @@ -777,9 +775,6 @@ class v70_device : public v60_device public: // construction/destruction v70_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - -protected: - virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; }; diff --git a/src/devices/cpu/v60/v60d.cpp b/src/devices/cpu/v60/v60d.cpp index 70fcdab8296..2a14f65436f 100644 --- a/src/devices/cpu/v60/v60d.cpp +++ b/src/devices/cpu/v60/v60d.cpp @@ -2,11 +2,10 @@ // copyright-holders:Farfetch'd, R. Belmont #include "emu.h" -#include "debugger.h" -#include "v60.h" +#include "v60d.h" // Register names -static const char *const v60_reg_names[69] = { +const char *const v60_disassembler::v60_reg_names[69] = { "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R10", "R11", @@ -26,39 +25,19 @@ static const char *const v60_reg_names[69] = { "ADTMR1","Reserved","Reserved","Reserved" }; -static const uint8_t *rombase; -static offs_t pcbase; - -#define readop(a) rombase[(a) - pcbase] - -static signed char read8(unsigned pc) -{ - return readop(pc); -} - -static signed short read16(unsigned pc) -{ - return readop(pc) | (readop(pc+1) << 8); -} - -static signed int read32(unsigned pc) -{ - return readop(pc) | (readop(pc+1) << 8)| (readop(pc+2) << 16)| (readop(pc+3) << 24); -} - -static void out_AM_Register(int reg, std::ostream &stream) +void v60_disassembler::out_AM_Register(int reg, std::ostream &stream) { stream << v60_reg_names[reg]; } -static void out_AM_RegisterIndirect(int reg, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_RegisterIndirect(int reg, int opsize, std::ostream &stream) { if(opsize & 0x80) stream << '@'; util::stream_format(stream, "[%s]", v60_reg_names[reg]); } -static void out_AM_RegisterIndirectIndexed(int rn, int rx, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_RegisterIndirectIndexed(int rn, int rx, int opsize, std::ostream &stream) { if(opsize & 0x80) util::stream_format(stream, "%s@[%s]", v60_reg_names[rx], v60_reg_names[rn]); @@ -67,21 +46,21 @@ static void out_AM_RegisterIndirectIndexed(int rn, int rx, int opsize, std::ostr } -static void out_AM_Autoincrement(int reg, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_Autoincrement(int reg, int opsize, std::ostream &stream) { if(opsize & 0x80) stream << '@'; util::stream_format(stream, "[%s+]", v60_reg_names[reg]); } -static void out_AM_Autodecrement(int reg, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_Autodecrement(int reg, int opsize, std::ostream &stream) { if(opsize & 0x80) stream << '@'; util::stream_format(stream, "[-%s]", v60_reg_names[reg]); } -static void out_AM_Displacement(int reg, int disp, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_Displacement(int reg, int disp, int opsize, std::ostream &stream) { util::stream_format(stream, "%s%X%s[%s]", disp >= 0 ? "" : "-", disp >= 0 ? disp : -disp, @@ -89,7 +68,7 @@ static void out_AM_Displacement(int reg, int disp, int opsize, std::ostream &str v60_reg_names[reg]); } -static void out_AM_DisplacementIndexed(int rn, int rx, int disp, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DisplacementIndexed(int rn, int rx, int disp, int opsize, std::ostream &stream) { if(opsize & 0x80) util::stream_format(stream, "%s@%s%X[%s]", v60_reg_names[rx], disp >= 0 ? "" : "-", disp >= 0 ? disp : -disp,v60_reg_names[rn]); @@ -97,12 +76,12 @@ static void out_AM_DisplacementIndexed(int rn, int rx, int disp, int opsize, std util::stream_format(stream, "%s%X[%s](%s)", disp >= 0 ? "" : "-", disp >= 0 ? disp : -disp,v60_reg_names[rn], v60_reg_names[rx]); } -static void out_AM_PCDisplacement(unsigned pc, int disp, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_PCDisplacement(offs_t pc, int disp, int opsize, std::ostream &stream) { util::stream_format(stream, "%X%s[PC]", pc+disp, opsize & 0x80 ? "@" : ""); } -static void out_AM_PCDisplacementIndexed(unsigned pc, int disp, int rx, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_PCDisplacementIndexed(offs_t pc, int disp, int rx, int opsize, std::ostream &stream) { if(opsize & 0x80) util::stream_format(stream, "%s@%X[PC]", v60_reg_names[rx], pc+disp); @@ -110,7 +89,7 @@ static void out_AM_PCDisplacementIndexed(unsigned pc, int disp, int rx, int opsi util::stream_format(stream, "%X[PC](%s)", pc+disp, v60_reg_names[rx]); } -static void out_AM_DisplacementIndirect(int reg, int disp, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DisplacementIndirect(int reg, int disp, int opsize, std::ostream &stream) { util::stream_format(stream, "%s[%s%X[%s]]", opsize & 0x80 ? "@" : "", @@ -118,7 +97,7 @@ static void out_AM_DisplacementIndirect(int reg, int disp, int opsize, std::ostr v60_reg_names[reg]); } -static void out_AM_DisplacementIndirectIndexed(int rn, int rx, int disp, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DisplacementIndirectIndexed(int rn, int rx, int disp, int opsize, std::ostream &stream) { if(opsize & 0x80) util::stream_format(stream, "%s@[%s%X[%s]]", v60_reg_names[rx], disp >= 0 ? "" : "-", disp >= 0 ? disp : -disp,v60_reg_names[rn]); @@ -126,12 +105,12 @@ static void out_AM_DisplacementIndirectIndexed(int rn, int rx, int disp, int ops util::stream_format(stream, "[%s%X[%s]](%s)", disp >= 0 ? "" : "-", disp >= 0 ? disp : -disp,v60_reg_names[rn], v60_reg_names[rx]); } -static void out_AM_PCDisplacementIndirect(unsigned pc, int disp, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_PCDisplacementIndirect(offs_t pc, int disp, int opsize, std::ostream &stream) { util::stream_format(stream, "%s[%X[PC]]", opsize & 0x80 ? "@" : "", pc+disp); } -static void out_AM_PCDisplacementIndirectIndexed(unsigned pc, int disp, int rx, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_PCDisplacementIndirectIndexed(offs_t pc, int disp, int rx, int opsize, std::ostream &stream) { if(opsize & 0x80) util::stream_format(stream, "%s@[%X[PC]]", v60_reg_names[rx], pc+disp); @@ -139,7 +118,7 @@ static void out_AM_PCDisplacementIndirectIndexed(unsigned pc, int disp, int rx, util::stream_format(stream, "[%X[PC]](%s)", pc+disp, v60_reg_names[rx]); } -static void out_AM_DoubleDisplacement(int reg, int disp2, int disp1, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DoubleDisplacement(int reg, int disp2, int disp1, int opsize, std::ostream &stream) { util::stream_format(stream, "%s%X%s[%s%X[%s]]", disp1 >= 0 ? "" : "-", disp1 >= 0 ? disp1 : -disp1, @@ -148,7 +127,7 @@ static void out_AM_DoubleDisplacement(int reg, int disp2, int disp1, int opsize, v60_reg_names[reg]); } -static void out_AM_PCDoubleDisplacement(unsigned pc, int disp2, int disp1, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_PCDoubleDisplacement(offs_t pc, int disp2, int disp1, int opsize, std::ostream &stream) { util::stream_format(stream, "%s%X%s[%X[PC]]", disp1 >= 0 ? "" : "-", disp1 >= 0 ? disp1 : -disp1, @@ -156,14 +135,14 @@ static void out_AM_PCDoubleDisplacement(unsigned pc, int disp2, int disp1, int o disp2 + pc); } -static void out_AM_DirectAddress(unsigned addr, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DirectAddress(unsigned addr, int opsize, std::ostream &stream) { if(opsize & 0x80) stream << '@'; util::stream_format(stream, "%X", addr); } -static void out_AM_DirectAddressIndexed(unsigned addr, int rx, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DirectAddressIndexed(unsigned addr, int rx, int opsize, std::ostream &stream) { if(opsize & 0x80) util::stream_format(stream, "%s@%X", v60_reg_names[rx], addr); @@ -171,14 +150,14 @@ static void out_AM_DirectAddressIndexed(unsigned addr, int rx, int opsize, std:: util::stream_format(stream, "%X(%s)", addr, v60_reg_names[rx]); } -static void out_AM_DirectAddressDeferred(unsigned addr, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DirectAddressDeferred(unsigned addr, int opsize, std::ostream &stream) { if(opsize & 0x80) stream << '@'; util::stream_format(stream, "[%X]", addr); } -static void out_AM_DirectAddressDeferredIndexed(unsigned addr, int rx, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_DirectAddressDeferredIndexed(unsigned addr, int rx, int opsize, std::ostream &stream) { if(opsize & 0x80) util::stream_format(stream, "%s@[%X]", v60_reg_names[rx], addr); @@ -186,7 +165,7 @@ static void out_AM_DirectAddressDeferredIndexed(unsigned addr, int rx, int opsiz util::stream_format(stream, "[%X](%s)", addr, v60_reg_names[rx]); } -static void out_AM_Immediate(unsigned value, int opsize, std::ostream &stream) +void v60_disassembler::out_AM_Immediate(unsigned value, int opsize, std::ostream &stream) { if(opsize == 0) value &= 0xff; @@ -196,21 +175,21 @@ static void out_AM_Immediate(unsigned value, int opsize, std::ostream &stream) util::stream_format(stream, "#%X", value); } -static int decode_AM(unsigned ipc, unsigned pc, int m, int opsize, std::ostream &stream) +u32 v60_disassembler::decode_AM(unsigned ipc, offs_t pc, int m, int opsize, const data_buffer &opcodes, std::ostream &stream) { - unsigned char mod = readop(pc); + unsigned char mod = opcodes.r8(pc); if(m) { switch(mod>>5) { case 0: // Double displacement (8 bit) - out_AM_DoubleDisplacement(mod&0x1F, read8(pc+1), read8(pc+2), opsize, stream); + out_AM_DoubleDisplacement(mod&0x1F, opcodes.r8(pc+1), opcodes.r8(pc+2), opsize, stream); return 3; case 1: // Double displacement (16 bit) - out_AM_DoubleDisplacement(mod&0x1F, read16(pc+1), read16(pc+3), opsize, stream); + out_AM_DoubleDisplacement(mod&0x1F, opcodes.r16(pc+1), opcodes.r16(pc+3), opsize, stream); return 5; case 2: // Double displacement (32 bit) - out_AM_DoubleDisplacement(mod&0x1F, read32(pc+1), read32(pc+5), opsize, stream); + out_AM_DoubleDisplacement(mod&0x1F, opcodes.r32(pc+1), opcodes.r32(pc+5), opsize, stream); return 9; case 3: // Register @@ -226,69 +205,69 @@ static int decode_AM(unsigned ipc, unsigned pc, int m, int opsize, std::ostream return 1; case 6: - switch (readop(pc+1)>>5) + switch (opcodes.r8(pc+1)>>5) { case 0: // Displacement indexed (8 bit) - out_AM_DisplacementIndexed(readop(pc+1)&0x1F, mod&0x1F, read8(pc+2), opsize, stream); + out_AM_DisplacementIndexed(opcodes.r8(pc+1)&0x1F, mod&0x1F, opcodes.r8(pc+2), opsize, stream); return 3; case 1: // Displacement indexed (16 bit) - out_AM_DisplacementIndexed(readop(pc+1)&0x1F, mod&0x1F, read16(pc+2), opsize, stream); + out_AM_DisplacementIndexed(opcodes.r8(pc+1)&0x1F, mod&0x1F, opcodes.r16(pc+2), opsize, stream); return 4; case 2: // Displacement indexed (32 bit) - out_AM_DisplacementIndexed(readop(pc+1)&0x1F, mod&0x1F, read32(pc+2), opsize, stream); + out_AM_DisplacementIndexed(opcodes.r8(pc+1)&0x1F, mod&0x1F, opcodes.r32(pc+2), opsize, stream); return 6; case 3: // Register indirect indexed - out_AM_RegisterIndirectIndexed(readop(pc+1)&0x1F, mod&0x1F, opsize, stream); + out_AM_RegisterIndirectIndexed(opcodes.r8(pc+1)&0x1F, mod&0x1F, opsize, stream); return 2; case 4: // Displacement indirect indexed (8 bit) - out_AM_DisplacementIndirectIndexed(readop(pc+1)&0x1F, mod&0x1F, read8(pc+2), opsize, stream); + out_AM_DisplacementIndirectIndexed(opcodes.r8(pc+1)&0x1F, mod&0x1F, opcodes.r8(pc+2), opsize, stream); return 3; case 5: // Displacement indirect indexed (16 bit) - out_AM_DisplacementIndirectIndexed(readop(pc+1)&0x1F, mod&0x1F, read16(pc+2), opsize, stream); + out_AM_DisplacementIndirectIndexed(opcodes.r8(pc+1)&0x1F, mod&0x1F, opcodes.r16(pc+2), opsize, stream); return 4; case 6: // Displacement indirect indexed (32 bit) - out_AM_DisplacementIndirectIndexed(readop(pc+1)&0x1F, mod&0x1F, read32(pc+2), opsize, stream); + out_AM_DisplacementIndirectIndexed(opcodes.r8(pc+1)&0x1F, mod&0x1F, opcodes.r32(pc+2), opsize, stream); return 6; case 7: - switch (readop(pc+1)&0x1F) + switch (opcodes.r8(pc+1)&0x1F) { case 16: // PC Displacement Indexed (8 bit) - out_AM_PCDisplacementIndexed(ipc, read8(pc+2), mod&0x1F, opsize, stream); + out_AM_PCDisplacementIndexed(ipc, opcodes.r8(pc+2), mod&0x1F, opsize, stream); return 3; case 17: // PC Displacement Indexed (16 bit) - out_AM_PCDisplacementIndexed(ipc, read16(pc+2), mod&0x1F, opsize, stream); + out_AM_PCDisplacementIndexed(ipc, opcodes.r16(pc+2), mod&0x1F, opsize, stream); return 4; case 18: // PC Displacement Indexed (32 bit) - out_AM_PCDisplacementIndexed(ipc, read32(pc+2), mod&0x1F, opsize, stream); + out_AM_PCDisplacementIndexed(ipc, opcodes.r32(pc+2), mod&0x1F, opsize, stream); return 6; case 19: // Direct Address Indexed - out_AM_DirectAddressIndexed(read32(pc+2), mod&0x1F, opsize, stream); + out_AM_DirectAddressIndexed(opcodes.r32(pc+2), mod&0x1F, opsize, stream); return 6; case 24: // PC Displacement Indirect Indexed(8 bit) - out_AM_PCDisplacementIndirectIndexed(ipc, read8(pc+2), mod&0x1F, opsize, stream); + out_AM_PCDisplacementIndirectIndexed(ipc, opcodes.r8(pc+2), mod&0x1F, opsize, stream); return 3; case 25: // PC Displacement Indirect Indexed (16 bit) - out_AM_PCDisplacementIndirectIndexed(ipc, read16(pc+2), mod&0x1F, opsize, stream); + out_AM_PCDisplacementIndirectIndexed(ipc, opcodes.r16(pc+2), mod&0x1F, opsize, stream); return 4; case 26: // PC Displacement Indirect Indexed (32 bit) - out_AM_PCDisplacementIndirectIndexed(ipc, read32(pc+2), mod&0x1F, opsize, stream); + out_AM_PCDisplacementIndirectIndexed(ipc, opcodes.r32(pc+2), mod&0x1F, opsize, stream); return 6; case 27: // Direct Address Deferred Indexed - out_AM_DirectAddressDeferredIndexed(read32(pc+2), mod&0x1F, opsize, stream); + out_AM_DirectAddressDeferredIndexed(opcodes.r32(pc+2), mod&0x1F, opsize, stream); return 6; default: @@ -308,15 +287,15 @@ static int decode_AM(unsigned ipc, unsigned pc, int m, int opsize, std::ostream } else { switch(mod>>5) { case 0: // Displacement (8 bit) - out_AM_Displacement(mod&0x1F, read8(pc+1), opsize, stream); + out_AM_Displacement(mod&0x1F, opcodes.r8(pc+1), opsize, stream); return 2; case 1: // Displacement (16 bit) - out_AM_Displacement(mod&0x1F, read16(pc+1), opsize, stream); + out_AM_Displacement(mod&0x1F, opcodes.r16(pc+1), opsize, stream); return 3; case 2: // Displacement (32 bit) - out_AM_Displacement(mod&0x1F, read32(pc+1), opsize, stream); + out_AM_Displacement(mod&0x1F, opcodes.r32(pc+1), opsize, stream); return 5; case 3: // Register indirect @@ -324,15 +303,15 @@ static int decode_AM(unsigned ipc, unsigned pc, int m, int opsize, std::ostream return 1; case 4: // Displacement indirect (8 bit) - out_AM_DisplacementIndirect(mod&0x1F, read8(pc+1), opsize, stream); + out_AM_DisplacementIndirect(mod&0x1F, opcodes.r8(pc+1), opsize, stream); return 2; case 5: // Displacement indirect (16 bit) - out_AM_DisplacementIndirect(mod&0x1F, read16(pc+1), opsize, stream); + out_AM_DisplacementIndirect(mod&0x1F, opcodes.r16(pc+1), opsize, stream); return 3; case 6: // Displacement indirect (32 bit) - out_AM_DisplacementIndirect(mod&0x1F, read32(pc+1), opsize, stream); + out_AM_DisplacementIndirect(mod&0x1F, opcodes.r32(pc+1), opsize, stream); return 5; case 7: @@ -357,34 +336,34 @@ static int decode_AM(unsigned ipc, unsigned pc, int m, int opsize, std::ostream return 1; case 16: // PC Displacement (8 bit) - out_AM_PCDisplacement(ipc, read8(pc+1), opsize, stream); + out_AM_PCDisplacement(ipc, opcodes.r8(pc+1), opsize, stream); return 2; case 17: // PC Displacement (16 bit) - out_AM_PCDisplacement(ipc, read16(pc+1), opsize, stream); + out_AM_PCDisplacement(ipc, opcodes.r16(pc+1), opsize, stream); return 3; case 18: // PC Displacement (32 bit) - out_AM_PCDisplacement(ipc, read32(pc+1), opsize, stream); + out_AM_PCDisplacement(ipc, opcodes.r32(pc+1), opsize, stream); return 5; case 19: // Direct Address - out_AM_DirectAddress(read32(pc+1), opsize, stream); + out_AM_DirectAddress(opcodes.r32(pc+1), opsize, stream); return 5; case 20: switch(opsize&0x7F) { case 0: // Immediate (8 bit) - out_AM_Immediate(read8(pc+1), opsize, stream); + out_AM_Immediate(opcodes.r8(pc+1), opsize, stream); return 2; case 1: // Immediate (16 bit) - out_AM_Immediate(read16(pc+1), opsize, stream); + out_AM_Immediate(opcodes.r16(pc+1), opsize, stream); return 3; case 2: // Immediate (32 bit) - out_AM_Immediate(read32(pc+1), opsize, stream); + out_AM_Immediate(opcodes.r32(pc+1), opsize, stream); return 5; default: @@ -393,31 +372,31 @@ static int decode_AM(unsigned ipc, unsigned pc, int m, int opsize, std::ostream } case 24: // PC Displacement Indirect (8 bit) - out_AM_PCDisplacementIndirect(ipc, read8(pc+1), opsize, stream); + out_AM_PCDisplacementIndirect(ipc, opcodes.r8(pc+1), opsize, stream); return 2; case 25: // PC Displacement Indirect (16 bit) - out_AM_PCDisplacementIndirect(ipc, read16(pc+1), opsize, stream); + out_AM_PCDisplacementIndirect(ipc, opcodes.r16(pc+1), opsize, stream); return 3; case 26: // PC Displacement Indirect (32 bit) - out_AM_PCDisplacementIndirect(ipc, read32(pc+1), opsize, stream); + out_AM_PCDisplacementIndirect(ipc, opcodes.r32(pc+1), opsize, stream); return 5; case 27: // Direct Address Deferred - out_AM_DirectAddressDeferred(read32(pc+1), opsize, stream); + out_AM_DirectAddressDeferred(opcodes.r32(pc+1), opsize, stream); return 5; case 28: // PC Double Displacement (8 bit) - out_AM_PCDoubleDisplacement(ipc, read8(pc+1), read8(pc+2), opsize, stream); + out_AM_PCDoubleDisplacement(ipc, opcodes.r8(pc+1), opcodes.r8(pc+2), opsize, stream); return 3; case 29: // PC Double Displacement (16 bit) - out_AM_PCDoubleDisplacement(ipc, read16(pc+1), read16(pc+3), opsize, stream); + out_AM_PCDoubleDisplacement(ipc, opcodes.r16(pc+1), opcodes.r16(pc+3), opsize, stream); return 5; case 30: // PC Double Displacement (32 bit) - out_AM_PCDoubleDisplacement(ipc, read32(pc+1), read32(pc+5), opsize, stream); + out_AM_PCDoubleDisplacement(ipc, opcodes.r32(pc+1), opcodes.r32(pc+5), opsize, stream); return 9; default: @@ -433,92 +412,92 @@ static int decode_AM(unsigned ipc, unsigned pc, int m, int opsize, std::ostream } -static int decode_F1(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F1(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - unsigned char code = readop(pc); + unsigned char code = opcodes.r8(pc); util::stream_format(stream, "%-8s", opnm); if(code & 0x20) { - int ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, stream) + 2; + int ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, opcodes, stream) + 2; stream << ", "; out_AM_Register(code & 0x1f, stream); return ret; } else { out_AM_Register(code & 0x1f, stream); stream << ", "; - return decode_AM(ipc, pc+1, code & 0x40, opsize1, stream) + 2; + return decode_AM(ipc, pc+1, code & 0x40, opsize1, opcodes, stream) + 2; } } -static int decode_F2(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F2(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { int ret; - unsigned char code = readop(pc); + unsigned char code = opcodes.r8(pc); util::stream_format(stream, "%-8s", opnm); - ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, stream); + ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, opcodes, stream); stream << ", "; - ret += decode_AM(ipc, pc+1+ret, code & 0x20, opsize2, stream); + ret += decode_AM(ipc, pc+1+ret, code & 0x20, opsize2, opcodes, stream); return ret+2; } -static int decode_F1F2(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F1F2(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - if(readop(pc) & 0x80) - return decode_F2(opnm, opsize1, opsize2, ipc, pc, stream); + if(opcodes.r8(pc) & 0x80) + return decode_F2(opnm, opsize1, opsize2, ipc, pc, opcodes, stream); else - return decode_F1(opnm, opsize1, opsize2, ipc, pc, stream); + return decode_F1(opnm, opsize1, opsize2, ipc, pc, opcodes, stream); } -static int decode_F3(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F3(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "%-8s", opnm); - return decode_AM(ipc, pc, readop(pc-1) & 1, opsize1, stream) + 1; + return decode_AM(ipc, pc, opcodes.r8(pc-1) & 1, opsize1, opcodes, stream) + 1; } -static int decode_F4a(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F4a(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - util::stream_format(stream, "%-8s%X", opnm, ipc+read8(pc)); + util::stream_format(stream, "%-8s%X", opnm, ipc+opcodes.r8(pc)); return 2; } -static int decode_F4b(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F4b(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - util::stream_format(stream, "%-8s%X", opnm, ipc+read16(pc)); + util::stream_format(stream, "%-8s%X", opnm, ipc+opcodes.r16(pc)); return 3; } -static int decode_F5(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F5(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { stream << opnm; return 1; } -static int decode_F6(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F6(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - util::stream_format(stream, "%-8s%s, %X[PC]", opnm, v60_reg_names[readop(pc) & 0x1f], ipc+read16(pc+1)); + util::stream_format(stream, "%-8s%s, %X[PC]", opnm, v60_reg_names[opcodes.r8(pc) & 0x1f], ipc+opcodes.r16(pc+1)); return 4; } -static int decode_F7a(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F7a(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { int ret; - unsigned char code = readop(pc); + unsigned char code = opcodes.r8(pc); unsigned char code2; util::stream_format(stream, "%-8s", opnm); - ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, stream); + ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, opcodes, stream); stream << ", "; - code2 = readop(pc+1+ret); + code2 = opcodes.r8(pc+1+ret); if(code2 & 0x80) out_AM_Register(code2 & 0x1f, stream); else out_AM_Immediate(code2, 1, stream); stream << ", "; - ret += decode_AM(ipc, pc+2+ret, code & 0x20, opsize2, stream); + ret += decode_AM(ipc, pc+2+ret, code & 0x20, opsize2, opcodes, stream); stream << ", "; - code2 = readop(pc+2+ret); + code2 = opcodes.r8(pc+2+ret); if(code2 & 0x80) out_AM_Register(code2 & 0x1f, stream); else @@ -527,42 +506,42 @@ static int decode_F7a(const char *opnm, int opsize1, int opsize2, unsigned ipc, return ret+4; } -static int decode_F7b(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F7b(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { int ret; - unsigned char code = readop(pc); + unsigned char code = opcodes.r8(pc); unsigned char code2; util::stream_format(stream, "%-8s", opnm); - ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, stream); + ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, opcodes, stream); stream << ", "; - code2 = readop(pc+1+ret); + code2 = opcodes.r8(pc+1+ret); if(code2 & 0x80) out_AM_Register(code2 & 0x1f, stream); else out_AM_Immediate(code2, 1, stream); stream << ", "; - ret += decode_AM(ipc, pc+2+ret, code & 0x20, opsize2, stream); + ret += decode_AM(ipc, pc+2+ret, code & 0x20, opsize2, opcodes, stream); return ret+3; } -static int decode_F7c(const char *opnm, int opsize1, int opsize2, unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::decode_F7c(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { int ret; - unsigned char code = readop(pc); + unsigned char code = opcodes.r8(pc); unsigned char code2; util::stream_format(stream, "%-8s", opnm); - ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, stream); + ret = decode_AM(ipc, pc+1, code & 0x40, opsize1, opcodes, stream); stream << ", "; - ret += decode_AM(ipc, pc+1+ret, code & 0x20, opsize2, stream); + ret += decode_AM(ipc, pc+1+ret, code & 0x20, opsize2, opcodes, stream); stream << ", "; - code2 = readop(pc+1+ret); + code2 = opcodes.r8(pc+1+ret); if(code2 & 0x80) out_AM_Register(code2 & 0x1f, stream); else @@ -571,70 +550,70 @@ static int decode_F7c(const char *opnm, int opsize1, int opsize2, unsigned ipc, return ret+3; } -static int dopUNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dopUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - util::stream_format(stream, "$%02X", readop(pc)); + util::stream_format(stream, "$%02X", opcodes.r8(pc)); return 1; } -static int dop58UNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop58UNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$58"); return 1; } -static int dop59UNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop59UNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$59"); return 1; } -static int dop5AUNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5AUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$5A"); return 1; } -static int dop5BUNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5BUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$5B"); return 1; } -static int dop5CUNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5CUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$5C"); return 1; } -static int dop5DUNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5DUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$5D"); return 1; } -static int dop5EUNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5EUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$5E"); return 1; } -static int dop5FUNHANDLED(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5FUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { util::stream_format(stream, "$5F"); return 1; } #define DEFINE_EASY_OPCODE(name, opnm, ftype, opsize1, opsize2) \ - static int dop ## name(unsigned ipc, unsigned pc, std::ostream &stream) \ + u32 v60_disassembler::dop ## name(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) \ { \ - return decode_ ## ftype(opnm, opsize1, opsize2, ipc, pc, stream); \ + return decode_ ## ftype(opnm, opsize1, opsize2, ipc, pc, opcodes, stream); \ } #define DEFINE_EASY_OPCODE_EX(name, opnm, ftype, opsize1, opsize2, flags) \ - static int dop ## name(unsigned ipc, unsigned pc, std::ostream &stream) \ + u32 v60_disassembler::dop ## name(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) \ { \ - return decode_ ## ftype(opnm, opsize1, opsize2, ipc, pc, stream) | (flags); \ + return decode_ ## ftype(opnm, opsize1, opsize2, ipc, pc, opcodes, stream) | (flags); \ } #define DEFINE_TRIPLE_OPCODE(name, string, ftype) \ @@ -693,8 +672,8 @@ DEFINE_EASY_OPCODE(BR8, "br", F4a, 0, 0) DEFINE_EASY_OPCODE(BR16, "br", F4b, 0, 0) DEFINE_EASY_OPCODE(BRK, "brk", F5, 0, 0) DEFINE_EASY_OPCODE(BRKV, "brkv", F5, 0, 0) -DEFINE_EASY_OPCODE_EX(BSR, "bsr", F4b, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(CALL, "call", F1F2, 0, 2, DASMFLAG_STEP_OVER) +DEFINE_EASY_OPCODE_EX(BSR, "bsr", F4b, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(CALL, "call", F1F2, 0, 2, STEP_OVER) DEFINE_EASY_OPCODE(CAXI, "caxi", F1, 2, 2) DEFINE_EASY_OPCODE(CHKAR, "chkar", F1F2, 0, 0) // ? DEFINE_EASY_OPCODE(CHKAW, "chkaw", F1F2, 0, 0) // ? @@ -719,21 +698,21 @@ DEFINE_EASY_OPCODE(CVTSW, "cvt.sw", F2, 0, 2) DEFINE_EASY_OPCODE(CVTLW, "cvt.lw", F2, 1, 2) DEFINE_EASY_OPCODE(CVTDPZ, "cvtd.pz", F7c, 0, 1) DEFINE_EASY_OPCODE(CVTDZP, "cvtd.zp", F7c, 1, 0) -DEFINE_EASY_OPCODE_EX(DBGT, "dbgt", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBGE, "dbge", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBLT, "dbgt", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBLE, "dbge", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBH, "dbh", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBNL, "dbnl", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBL, "dbl", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBNH, "dbnh", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBE, "dbe", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBNE, "dbne", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBV, "dbe", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBNV, "dbne", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBN, "dbn", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBP, "dbp", F6, 0, 0, DASMFLAG_STEP_OVER) -DEFINE_EASY_OPCODE_EX(DBR, "dbr", F6, 0, 0, DASMFLAG_STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBGT, "dbgt", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBGE, "dbge", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBLT, "dbgt", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBLE, "dbge", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBH, "dbh", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBNL, "dbnl", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBL, "dbl", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBNH, "dbnh", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBE, "dbe", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBNE, "dbne", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBV, "dbe", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBNV, "dbne", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBN, "dbn", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBP, "dbp", F6, 0, 0, STEP_OVER) +DEFINE_EASY_OPCODE_EX(DBR, "dbr", F6, 0, 0, STEP_OVER) DEFINE_TRIPLE_OPCODE(DEC, "dec", F3) DEFINE_EASY_OPCODE(DISPOSE, "dispose", F5, 0, 0) DEFINE_TRIPLE_OPCODE(DIV, "div", F1F2) @@ -754,7 +733,7 @@ DEFINE_TRIPLE_OPCODE(INC, "inc", F3) DEFINE_EASY_OPCODE(INSBFL, "insbfl", F7c, 2, 0x82) DEFINE_EASY_OPCODE(INSBFR, "insbfr", F7c, 2, 0x82) DEFINE_EASY_OPCODE(JMP, "jmp", F3, 0, 0) -DEFINE_EASY_OPCODE_EX(JSR, "jsr", F3, 0, 0, DASMFLAG_STEP_OVER) +DEFINE_EASY_OPCODE_EX(JSR, "jsr", F3, 0, 0, STEP_OVER) DEFINE_EASY_OPCODE(LDPR, "ldpr", F1F2, 2, 2) DEFINE_EASY_OPCODE(LDTASK, "ldtask", F1F2, 2, 2) DEFINE_TRIPLE_OPCODE(MOV, "mov", F1F2) @@ -804,16 +783,16 @@ DEFINE_EASY_OPCODE(PUSH, "push", F3, 2, 0) DEFINE_EASY_OPCODE(PUSHM, "pushm", F3, 2, 0) DEFINE_TRIPLE_OPCODE(REM, "rem", F1F2) DEFINE_TRIPLE_OPCODE(REMU, "remu", F1F2) -DEFINE_EASY_OPCODE_EX(RET, "ret", F3, 2, 0, DASMFLAG_STEP_OUT) -DEFINE_EASY_OPCODE_EX(RETIU, "retiu", F3, 1, 0, DASMFLAG_STEP_OUT) -DEFINE_EASY_OPCODE_EX(RETIS, "retis", F3, 1, 0, DASMFLAG_STEP_OUT) +DEFINE_EASY_OPCODE_EX(RET, "ret", F3, 2, 0, STEP_OUT) +DEFINE_EASY_OPCODE_EX(RETIU, "retiu", F3, 1, 0, STEP_OUT) +DEFINE_EASY_OPCODE_EX(RETIS, "retis", F3, 1, 0, STEP_OUT) DEFINE_EASY_OPCODE(ROTB, "rot.b", F1F2, 0, 0) DEFINE_EASY_OPCODE(ROTH, "rot.h", F1F2, 0, 1) DEFINE_EASY_OPCODE(ROTW, "rot.w", F1F2, 0, 2) DEFINE_EASY_OPCODE(ROTCB, "rotc.b", F1F2, 0, 0) DEFINE_EASY_OPCODE(ROTCH, "rotc.h", F1F2, 0, 1) DEFINE_EASY_OPCODE(ROTCW, "rotc.w", F1F2, 0, 2) -DEFINE_EASY_OPCODE_EX(RSR, "rsr", F5, 0, 0, DASMFLAG_STEP_OUT) +DEFINE_EASY_OPCODE_EX(RSR, "rsr", F5, 0, 0, STEP_OUT) DEFINE_EASY_OPCODE(RVBIT, "rvbit", F1F2, 0, 0) DEFINE_EASY_OPCODE(RVBYT, "rvbyt", F1F2, 2, 2) DEFINE_EASY_OPCODE(SCH0BSU, "sch0bsu", F7b, 0x80, 2) @@ -849,7 +828,7 @@ DEFINE_EASY_OPCODE(TASI, "tasi", F3, 0, 0) DEFINE_EASY_OPCODE(TB, "tb", F6, 0, 0) DEFINE_TRIPLE_OPCODE(TEST, "test", F3) DEFINE_EASY_OPCODE(TEST1, "test1", F1F2, 2, 2) -DEFINE_EASY_OPCODE_EX(TRAP, "trap", F3, 0, 0, DASMFLAG_STEP_OVER) +DEFINE_EASY_OPCODE_EX(TRAP, "trap", F3, 0, 0, STEP_OVER) DEFINE_EASY_OPCODE(TRAPFL, "trapfl", F5, 0, 0) DEFINE_EASY_OPCODE(UPDATE, "update", F1F2, 0, 3) // ? DEFINE_EASY_OPCODE(UPDPSWH, "updpsw.h", F1F2, 2, 2) @@ -862,638 +841,634 @@ DEFINE_EASY_OPCODE(XORBSD, "xorbsd", F7b, 0x80, 0x80) DEFINE_EASY_OPCODE(XORNBSU, "xornbsu", F7b, 0x80, 0x80) DEFINE_EASY_OPCODE(XORNBSD, "xornbsd", F7b, 0x80, 0x80) -static int (*const dasm_optable_58[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopCMPCB, - /* 0x01 */ dopCMPCFB, - /* 0x02 */ dopCMPCSB, - /* 0x03 */ dop58UNHANDLED, - /* 0x04 */ dop58UNHANDLED, - /* 0x05 */ dop58UNHANDLED, - /* 0x06 */ dop58UNHANDLED, - /* 0x07 */ dop58UNHANDLED, - /* 0x08 */ dopMOVCUB, - /* 0x09 */ dopMOVCDB, - /* 0x0A */ dopMOVCFUB, - /* 0x0B */ dopMOVCFDB, - /* 0x0C */ dopMOVCSB, - /* 0x0D */ dop58UNHANDLED, - /* 0x0E */ dop58UNHANDLED, - /* 0x0F */ dop58UNHANDLED, - /* 0x10 */ dop58UNHANDLED, - /* 0x11 */ dop58UNHANDLED, - /* 0x12 */ dop58UNHANDLED, - /* 0x13 */ dop58UNHANDLED, - /* 0x14 */ dop58UNHANDLED, - /* 0x15 */ dop58UNHANDLED, - /* 0x16 */ dop58UNHANDLED, - /* 0x17 */ dop58UNHANDLED, - /* 0x18 */ dopSCHCUB, - /* 0x19 */ dopSCHCDB, - /* 0x1A */ dopSKPCUB, - /* 0x1B */ dopSKPCDB, - /* 0x1C */ dop58UNHANDLED, - /* 0x1D */ dop58UNHANDLED, - /* 0x1E */ dop58UNHANDLED, - /* 0x1F */ dop58UNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_58[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopCMPCB, + /* 0x01 */ &v60_disassembler::dopCMPCFB, + /* 0x02 */ &v60_disassembler::dopCMPCSB, + /* 0x03 */ &v60_disassembler::dop58UNHANDLED, + /* 0x04 */ &v60_disassembler::dop58UNHANDLED, + /* 0x05 */ &v60_disassembler::dop58UNHANDLED, + /* 0x06 */ &v60_disassembler::dop58UNHANDLED, + /* 0x07 */ &v60_disassembler::dop58UNHANDLED, + /* 0x08 */ &v60_disassembler::dopMOVCUB, + /* 0x09 */ &v60_disassembler::dopMOVCDB, + /* 0x0A */ &v60_disassembler::dopMOVCFUB, + /* 0x0B */ &v60_disassembler::dopMOVCFDB, + /* 0x0C */ &v60_disassembler::dopMOVCSB, + /* 0x0D */ &v60_disassembler::dop58UNHANDLED, + /* 0x0E */ &v60_disassembler::dop58UNHANDLED, + /* 0x0F */ &v60_disassembler::dop58UNHANDLED, + /* 0x10 */ &v60_disassembler::dop58UNHANDLED, + /* 0x11 */ &v60_disassembler::dop58UNHANDLED, + /* 0x12 */ &v60_disassembler::dop58UNHANDLED, + /* 0x13 */ &v60_disassembler::dop58UNHANDLED, + /* 0x14 */ &v60_disassembler::dop58UNHANDLED, + /* 0x15 */ &v60_disassembler::dop58UNHANDLED, + /* 0x16 */ &v60_disassembler::dop58UNHANDLED, + /* 0x17 */ &v60_disassembler::dop58UNHANDLED, + /* 0x18 */ &v60_disassembler::dopSCHCUB, + /* 0x19 */ &v60_disassembler::dopSCHCDB, + /* 0x1A */ &v60_disassembler::dopSKPCUB, + /* 0x1B */ &v60_disassembler::dopSKPCDB, + /* 0x1C */ &v60_disassembler::dop58UNHANDLED, + /* 0x1D */ &v60_disassembler::dop58UNHANDLED, + /* 0x1E */ &v60_disassembler::dop58UNHANDLED, + /* 0x1F */ &v60_disassembler::dop58UNHANDLED }; -static int (*const dasm_optable_59[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopADDDC, - /* 0x01 */ dopSUBDC, - /* 0x02 */ dopSUBRDC, - /* 0x03 */ dop59UNHANDLED, - /* 0x04 */ dop59UNHANDLED, - /* 0x05 */ dop59UNHANDLED, - /* 0x06 */ dop59UNHANDLED, - /* 0x07 */ dop59UNHANDLED, - /* 0x08 */ dop59UNHANDLED, - /* 0x09 */ dop59UNHANDLED, - /* 0x0A */ dop59UNHANDLED, - /* 0x0B */ dop59UNHANDLED, - /* 0x0C */ dop59UNHANDLED, - /* 0x0D */ dop59UNHANDLED, - /* 0x0E */ dop59UNHANDLED, - /* 0x0F */ dop59UNHANDLED, - /* 0x10 */ dopCVTDPZ, - /* 0x11 */ dop59UNHANDLED, - /* 0x12 */ dop59UNHANDLED, - /* 0x13 */ dop59UNHANDLED, - /* 0x14 */ dop59UNHANDLED, - /* 0x15 */ dop59UNHANDLED, - /* 0x16 */ dop59UNHANDLED, - /* 0x17 */ dop59UNHANDLED, - /* 0x18 */ dopCVTDZP, - /* 0x19 */ dop59UNHANDLED, - /* 0x1A */ dop59UNHANDLED, - /* 0x1B */ dop59UNHANDLED, - /* 0x1C */ dop59UNHANDLED, - /* 0x1D */ dop59UNHANDLED, - /* 0x1E */ dop59UNHANDLED, - /* 0x1F */ dop59UNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_59[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopADDDC, + /* 0x01 */ &v60_disassembler::dopSUBDC, + /* 0x02 */ &v60_disassembler::dopSUBRDC, + /* 0x03 */ &v60_disassembler::dop59UNHANDLED, + /* 0x04 */ &v60_disassembler::dop59UNHANDLED, + /* 0x05 */ &v60_disassembler::dop59UNHANDLED, + /* 0x06 */ &v60_disassembler::dop59UNHANDLED, + /* 0x07 */ &v60_disassembler::dop59UNHANDLED, + /* 0x08 */ &v60_disassembler::dop59UNHANDLED, + /* 0x09 */ &v60_disassembler::dop59UNHANDLED, + /* 0x0A */ &v60_disassembler::dop59UNHANDLED, + /* 0x0B */ &v60_disassembler::dop59UNHANDLED, + /* 0x0C */ &v60_disassembler::dop59UNHANDLED, + /* 0x0D */ &v60_disassembler::dop59UNHANDLED, + /* 0x0E */ &v60_disassembler::dop59UNHANDLED, + /* 0x0F */ &v60_disassembler::dop59UNHANDLED, + /* 0x10 */ &v60_disassembler::dopCVTDPZ, + /* 0x11 */ &v60_disassembler::dop59UNHANDLED, + /* 0x12 */ &v60_disassembler::dop59UNHANDLED, + /* 0x13 */ &v60_disassembler::dop59UNHANDLED, + /* 0x14 */ &v60_disassembler::dop59UNHANDLED, + /* 0x15 */ &v60_disassembler::dop59UNHANDLED, + /* 0x16 */ &v60_disassembler::dop59UNHANDLED, + /* 0x17 */ &v60_disassembler::dop59UNHANDLED, + /* 0x18 */ &v60_disassembler::dopCVTDZP, + /* 0x19 */ &v60_disassembler::dop59UNHANDLED, + /* 0x1A */ &v60_disassembler::dop59UNHANDLED, + /* 0x1B */ &v60_disassembler::dop59UNHANDLED, + /* 0x1C */ &v60_disassembler::dop59UNHANDLED, + /* 0x1D */ &v60_disassembler::dop59UNHANDLED, + /* 0x1E */ &v60_disassembler::dop59UNHANDLED, + /* 0x1F */ &v60_disassembler::dop59UNHANDLED }; -static int (*const dasm_optable_5A[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopCMPCH, - /* 0x01 */ dopCMPCFH, - /* 0x02 */ dopCMPCSH, - /* 0x03 */ dop5AUNHANDLED, - /* 0x04 */ dop5AUNHANDLED, - /* 0x05 */ dop5AUNHANDLED, - /* 0x06 */ dop5AUNHANDLED, - /* 0x07 */ dop5AUNHANDLED, - /* 0x08 */ dopMOVCUH, - /* 0x09 */ dopMOVCDH, - /* 0x0A */ dopMOVCFUH, - /* 0x0B */ dopMOVCFDH, - /* 0x0C */ dopMOVCSH, - /* 0x0D */ dop5AUNHANDLED, - /* 0x0E */ dop5AUNHANDLED, - /* 0x0F */ dop5AUNHANDLED, - /* 0x10 */ dop5AUNHANDLED, - /* 0x11 */ dop5AUNHANDLED, - /* 0x12 */ dop5AUNHANDLED, - /* 0x13 */ dop5AUNHANDLED, - /* 0x14 */ dop5AUNHANDLED, - /* 0x15 */ dop5AUNHANDLED, - /* 0x16 */ dop5AUNHANDLED, - /* 0x17 */ dop5AUNHANDLED, - /* 0x18 */ dopSCHCUH, - /* 0x19 */ dopSCHCDH, - /* 0x1A */ dopSKPCUH, - /* 0x1B */ dopSKPCDH, - /* 0x1C */ dop5AUNHANDLED, - /* 0x1D */ dop5AUNHANDLED, - /* 0x1E */ dop5AUNHANDLED, - /* 0x1F */ dop5AUNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_5A[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopCMPCH, + /* 0x01 */ &v60_disassembler::dopCMPCFH, + /* 0x02 */ &v60_disassembler::dopCMPCSH, + /* 0x03 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x04 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x05 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x06 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x07 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x08 */ &v60_disassembler::dopMOVCUH, + /* 0x09 */ &v60_disassembler::dopMOVCDH, + /* 0x0A */ &v60_disassembler::dopMOVCFUH, + /* 0x0B */ &v60_disassembler::dopMOVCFDH, + /* 0x0C */ &v60_disassembler::dopMOVCSH, + /* 0x0D */ &v60_disassembler::dop5AUNHANDLED, + /* 0x0E */ &v60_disassembler::dop5AUNHANDLED, + /* 0x0F */ &v60_disassembler::dop5AUNHANDLED, + /* 0x10 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x11 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x12 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x13 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x14 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x15 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x16 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x17 */ &v60_disassembler::dop5AUNHANDLED, + /* 0x18 */ &v60_disassembler::dopSCHCUH, + /* 0x19 */ &v60_disassembler::dopSCHCDH, + /* 0x1A */ &v60_disassembler::dopSKPCUH, + /* 0x1B */ &v60_disassembler::dopSKPCDH, + /* 0x1C */ &v60_disassembler::dop5AUNHANDLED, + /* 0x1D */ &v60_disassembler::dop5AUNHANDLED, + /* 0x1E */ &v60_disassembler::dop5AUNHANDLED, + /* 0x1F */ &v60_disassembler::dop5AUNHANDLED }; -static int (*const dasm_optable_5B[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopSCH0BSU, - /* 0x01 */ dopSCH0BSD, - /* 0x02 */ dopSCH1BSU, - /* 0x03 */ dopSCH1BSD, - /* 0x04 */ dop5BUNHANDLED, - /* 0x05 */ dop5BUNHANDLED, - /* 0x06 */ dop5BUNHANDLED, - /* 0x07 */ dop5BUNHANDLED, - /* 0x08 */ dopMOVBSU, - /* 0x09 */ dopMOVBSD, - /* 0x0A */ dopNOTBSU, - /* 0x0B */ dopNOTBSD, - /* 0x0C */ dop5BUNHANDLED, - /* 0x0D */ dop5BUNHANDLED, - /* 0x0E */ dop5BUNHANDLED, - /* 0x0F */ dop5BUNHANDLED, - /* 0x10 */ dopANDBSU, - /* 0x11 */ dopANDBSD, - /* 0x12 */ dopANDNBSU, - /* 0x13 */ dopANDNBSD, - /* 0x14 */ dopORBSU, - /* 0x15 */ dopORBSD, - /* 0x16 */ dopORNBSU, - /* 0x17 */ dopORNBSD, - /* 0x18 */ dopXORBSU, - /* 0x19 */ dopXORBSD, - /* 0x1A */ dopXORNBSU, - /* 0x1B */ dopXORNBSD, - /* 0x1C */ dop5BUNHANDLED, - /* 0x1D */ dop5BUNHANDLED, - /* 0x1E */ dop5BUNHANDLED, - /* 0x1F */ dop5BUNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_5B[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopSCH0BSU, + /* 0x01 */ &v60_disassembler::dopSCH0BSD, + /* 0x02 */ &v60_disassembler::dopSCH1BSU, + /* 0x03 */ &v60_disassembler::dopSCH1BSD, + /* 0x04 */ &v60_disassembler::dop5BUNHANDLED, + /* 0x05 */ &v60_disassembler::dop5BUNHANDLED, + /* 0x06 */ &v60_disassembler::dop5BUNHANDLED, + /* 0x07 */ &v60_disassembler::dop5BUNHANDLED, + /* 0x08 */ &v60_disassembler::dopMOVBSU, + /* 0x09 */ &v60_disassembler::dopMOVBSD, + /* 0x0A */ &v60_disassembler::dopNOTBSU, + /* 0x0B */ &v60_disassembler::dopNOTBSD, + /* 0x0C */ &v60_disassembler::dop5BUNHANDLED, + /* 0x0D */ &v60_disassembler::dop5BUNHANDLED, + /* 0x0E */ &v60_disassembler::dop5BUNHANDLED, + /* 0x0F */ &v60_disassembler::dop5BUNHANDLED, + /* 0x10 */ &v60_disassembler::dopANDBSU, + /* 0x11 */ &v60_disassembler::dopANDBSD, + /* 0x12 */ &v60_disassembler::dopANDNBSU, + /* 0x13 */ &v60_disassembler::dopANDNBSD, + /* 0x14 */ &v60_disassembler::dopORBSU, + /* 0x15 */ &v60_disassembler::dopORBSD, + /* 0x16 */ &v60_disassembler::dopORNBSU, + /* 0x17 */ &v60_disassembler::dopORNBSD, + /* 0x18 */ &v60_disassembler::dopXORBSU, + /* 0x19 */ &v60_disassembler::dopXORBSD, + /* 0x1A */ &v60_disassembler::dopXORNBSU, + /* 0x1B */ &v60_disassembler::dopXORNBSD, + /* 0x1C */ &v60_disassembler::dop5BUNHANDLED, + /* 0x1D */ &v60_disassembler::dop5BUNHANDLED, + /* 0x1E */ &v60_disassembler::dop5BUNHANDLED, + /* 0x1F */ &v60_disassembler::dop5BUNHANDLED }; -static int (*const dasm_optable_5C[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopCMPFS, - /* 0x01 */ dop5CUNHANDLED, - /* 0x02 */ dop5CUNHANDLED, - /* 0x03 */ dop5CUNHANDLED, - /* 0x04 */ dop5CUNHANDLED, - /* 0x05 */ dop5CUNHANDLED, - /* 0x06 */ dop5CUNHANDLED, - /* 0x07 */ dop5CUNHANDLED, - /* 0x08 */ dopMOVFS, - /* 0x09 */ dopNEGFS, - /* 0x0A */ dopABSFS, - /* 0x0B */ dop5CUNHANDLED, - /* 0x0C */ dop5CUNHANDLED, - /* 0x0D */ dop5CUNHANDLED, - /* 0x0E */ dop5CUNHANDLED, - /* 0x0F */ dop5CUNHANDLED, - /* 0x10 */ dopSCLFS, - /* 0x11 */ dop5CUNHANDLED, - /* 0x12 */ dop5CUNHANDLED, - /* 0x13 */ dop5CUNHANDLED, - /* 0x14 */ dop5CUNHANDLED, - /* 0x15 */ dop5CUNHANDLED, - /* 0x16 */ dop5CUNHANDLED, - /* 0x17 */ dop5CUNHANDLED, - /* 0x18 */ dopADDFS, - /* 0x19 */ dopSUBFS, - /* 0x1A */ dopMULFS, - /* 0x1B */ dopDIVFS, - /* 0x1C */ dop5CUNHANDLED, - /* 0x1D */ dop5CUNHANDLED, - /* 0x1E */ dop5CUNHANDLED, - /* 0x1F */ dop5CUNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_5C[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopCMPFS, + /* 0x01 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x02 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x03 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x04 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x05 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x06 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x07 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x08 */ &v60_disassembler::dopMOVFS, + /* 0x09 */ &v60_disassembler::dopNEGFS, + /* 0x0A */ &v60_disassembler::dopABSFS, + /* 0x0B */ &v60_disassembler::dop5CUNHANDLED, + /* 0x0C */ &v60_disassembler::dop5CUNHANDLED, + /* 0x0D */ &v60_disassembler::dop5CUNHANDLED, + /* 0x0E */ &v60_disassembler::dop5CUNHANDLED, + /* 0x0F */ &v60_disassembler::dop5CUNHANDLED, + /* 0x10 */ &v60_disassembler::dopSCLFS, + /* 0x11 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x12 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x13 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x14 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x15 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x16 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x17 */ &v60_disassembler::dop5CUNHANDLED, + /* 0x18 */ &v60_disassembler::dopADDFS, + /* 0x19 */ &v60_disassembler::dopSUBFS, + /* 0x1A */ &v60_disassembler::dopMULFS, + /* 0x1B */ &v60_disassembler::dopDIVFS, + /* 0x1C */ &v60_disassembler::dop5CUNHANDLED, + /* 0x1D */ &v60_disassembler::dop5CUNHANDLED, + /* 0x1E */ &v60_disassembler::dop5CUNHANDLED, + /* 0x1F */ &v60_disassembler::dop5CUNHANDLED }; -static int (*const dasm_optable_5D[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopCMPBFS, - /* 0x01 */ dopCMPBFZ, - /* 0x02 */ dopCMPBFL, - /* 0x03 */ dop5DUNHANDLED, - /* 0x04 */ dop5DUNHANDLED, - /* 0x05 */ dop5DUNHANDLED, - /* 0x06 */ dop5DUNHANDLED, - /* 0x07 */ dop5DUNHANDLED, - /* 0x08 */ dopEXTBFS, - /* 0x09 */ dopEXTBFZ, - /* 0x0A */ dopEXTBFL, - /* 0x0B */ dop5DUNHANDLED, - /* 0x0C */ dop5DUNHANDLED, - /* 0x0D */ dop5DUNHANDLED, - /* 0x0E */ dop5DUNHANDLED, - /* 0x0F */ dop5DUNHANDLED, - /* 0x10 */ dop5DUNHANDLED, - /* 0x11 */ dop5DUNHANDLED, - /* 0x12 */ dop5DUNHANDLED, - /* 0x13 */ dop5DUNHANDLED, - /* 0x14 */ dop5DUNHANDLED, - /* 0x15 */ dop5DUNHANDLED, - /* 0x16 */ dop5DUNHANDLED, - /* 0x17 */ dop5DUNHANDLED, - /* 0x18 */ dopINSBFR, - /* 0x19 */ dopINSBFL, - /* 0x1A */ dop5DUNHANDLED, - /* 0x1B */ dop5DUNHANDLED, - /* 0x1C */ dop5DUNHANDLED, - /* 0x1D */ dop5DUNHANDLED, - /* 0x1E */ dop5DUNHANDLED, - /* 0x1F */ dop5DUNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_5D[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopCMPBFS, + /* 0x01 */ &v60_disassembler::dopCMPBFZ, + /* 0x02 */ &v60_disassembler::dopCMPBFL, + /* 0x03 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x04 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x05 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x06 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x07 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x08 */ &v60_disassembler::dopEXTBFS, + /* 0x09 */ &v60_disassembler::dopEXTBFZ, + /* 0x0A */ &v60_disassembler::dopEXTBFL, + /* 0x0B */ &v60_disassembler::dop5DUNHANDLED, + /* 0x0C */ &v60_disassembler::dop5DUNHANDLED, + /* 0x0D */ &v60_disassembler::dop5DUNHANDLED, + /* 0x0E */ &v60_disassembler::dop5DUNHANDLED, + /* 0x0F */ &v60_disassembler::dop5DUNHANDLED, + /* 0x10 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x11 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x12 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x13 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x14 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x15 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x16 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x17 */ &v60_disassembler::dop5DUNHANDLED, + /* 0x18 */ &v60_disassembler::dopINSBFR, + /* 0x19 */ &v60_disassembler::dopINSBFL, + /* 0x1A */ &v60_disassembler::dop5DUNHANDLED, + /* 0x1B */ &v60_disassembler::dop5DUNHANDLED, + /* 0x1C */ &v60_disassembler::dop5DUNHANDLED, + /* 0x1D */ &v60_disassembler::dop5DUNHANDLED, + /* 0x1E */ &v60_disassembler::dop5DUNHANDLED, + /* 0x1F */ &v60_disassembler::dop5DUNHANDLED }; -static int (*const dasm_optable_5E[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopCMPFL, - /* 0x01 */ dop5EUNHANDLED, - /* 0x02 */ dop5EUNHANDLED, - /* 0x03 */ dop5EUNHANDLED, - /* 0x04 */ dop5EUNHANDLED, - /* 0x05 */ dop5EUNHANDLED, - /* 0x06 */ dop5EUNHANDLED, - /* 0x07 */ dop5EUNHANDLED, - /* 0x08 */ dopMOVFL, - /* 0x09 */ dopNEGFL, - /* 0x0A */ dopABSFL, - /* 0x0B */ dop5EUNHANDLED, - /* 0x0C */ dop5EUNHANDLED, - /* 0x0D */ dop5EUNHANDLED, - /* 0x0E */ dop5EUNHANDLED, - /* 0x0F */ dop5EUNHANDLED, - /* 0x10 */ dopSCLFL, - /* 0x11 */ dop5EUNHANDLED, - /* 0x12 */ dop5EUNHANDLED, - /* 0x13 */ dop5EUNHANDLED, - /* 0x14 */ dop5EUNHANDLED, - /* 0x15 */ dop5EUNHANDLED, - /* 0x16 */ dop5EUNHANDLED, - /* 0x17 */ dop5EUNHANDLED, - /* 0x18 */ dopADDFL, - /* 0x19 */ dopSUBFL, - /* 0x1A */ dopMULFL, - /* 0x1B */ dopDIVFL, - /* 0x1C */ dop5EUNHANDLED, - /* 0x1D */ dop5EUNHANDLED, - /* 0x1E */ dop5EUNHANDLED, - /* 0x1F */ dop5EUNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_5E[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopCMPFL, + /* 0x01 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x02 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x03 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x04 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x05 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x06 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x07 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x08 */ &v60_disassembler::dopMOVFL, + /* 0x09 */ &v60_disassembler::dopNEGFL, + /* 0x0A */ &v60_disassembler::dopABSFL, + /* 0x0B */ &v60_disassembler::dop5EUNHANDLED, + /* 0x0C */ &v60_disassembler::dop5EUNHANDLED, + /* 0x0D */ &v60_disassembler::dop5EUNHANDLED, + /* 0x0E */ &v60_disassembler::dop5EUNHANDLED, + /* 0x0F */ &v60_disassembler::dop5EUNHANDLED, + /* 0x10 */ &v60_disassembler::dopSCLFL, + /* 0x11 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x12 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x13 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x14 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x15 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x16 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x17 */ &v60_disassembler::dop5EUNHANDLED, + /* 0x18 */ &v60_disassembler::dopADDFL, + /* 0x19 */ &v60_disassembler::dopSUBFL, + /* 0x1A */ &v60_disassembler::dopMULFL, + /* 0x1B */ &v60_disassembler::dopDIVFL, + /* 0x1C */ &v60_disassembler::dop5EUNHANDLED, + /* 0x1D */ &v60_disassembler::dop5EUNHANDLED, + /* 0x1E */ &v60_disassembler::dop5EUNHANDLED, + /* 0x1F */ &v60_disassembler::dop5EUNHANDLED }; -static int (*const dasm_optable_5F[32])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopCVTWS, - /* 0x01 */ dopCVTSW, - /* 0x02 */ dop5FUNHANDLED, - /* 0x03 */ dop5FUNHANDLED, - /* 0x04 */ dop5FUNHANDLED, - /* 0x05 */ dop5FUNHANDLED, - /* 0x06 */ dop5FUNHANDLED, - /* 0x07 */ dop5FUNHANDLED, - /* 0x08 */ dopCVTLS, - /* 0x09 */ dopCVTLW, - /* 0x0A */ dop5FUNHANDLED, - /* 0x0B */ dop5FUNHANDLED, - /* 0x0C */ dop5FUNHANDLED, - /* 0x0D */ dop5FUNHANDLED, - /* 0x0E */ dop5FUNHANDLED, - /* 0x0F */ dop5FUNHANDLED, - /* 0x10 */ dopCVTSL, - /* 0x11 */ dopCVTWL, - /* 0x12 */ dop5FUNHANDLED, - /* 0x13 */ dop5FUNHANDLED, - /* 0x14 */ dop5FUNHANDLED, - /* 0x15 */ dop5FUNHANDLED, - /* 0x16 */ dop5FUNHANDLED, - /* 0x17 */ dop5FUNHANDLED, - /* 0x18 */ dop5FUNHANDLED, - /* 0x19 */ dop5FUNHANDLED, - /* 0x1A */ dop5FUNHANDLED, - /* 0x1B */ dop5FUNHANDLED, - /* 0x1C */ dop5FUNHANDLED, - /* 0x1D */ dop5FUNHANDLED, - /* 0x1E */ dop5FUNHANDLED, - /* 0x1F */ dop5FUNHANDLED +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_5F[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopCVTWS, + /* 0x01 */ &v60_disassembler::dopCVTSW, + /* 0x02 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x03 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x04 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x05 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x06 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x07 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x08 */ &v60_disassembler::dopCVTLS, + /* 0x09 */ &v60_disassembler::dopCVTLW, + /* 0x0A */ &v60_disassembler::dop5FUNHANDLED, + /* 0x0B */ &v60_disassembler::dop5FUNHANDLED, + /* 0x0C */ &v60_disassembler::dop5FUNHANDLED, + /* 0x0D */ &v60_disassembler::dop5FUNHANDLED, + /* 0x0E */ &v60_disassembler::dop5FUNHANDLED, + /* 0x0F */ &v60_disassembler::dop5FUNHANDLED, + /* 0x10 */ &v60_disassembler::dopCVTSL, + /* 0x11 */ &v60_disassembler::dopCVTWL, + /* 0x12 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x13 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x14 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x15 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x16 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x17 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x18 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x19 */ &v60_disassembler::dop5FUNHANDLED, + /* 0x1A */ &v60_disassembler::dop5FUNHANDLED, + /* 0x1B */ &v60_disassembler::dop5FUNHANDLED, + /* 0x1C */ &v60_disassembler::dop5FUNHANDLED, + /* 0x1D */ &v60_disassembler::dop5FUNHANDLED, + /* 0x1E */ &v60_disassembler::dop5FUNHANDLED, + /* 0x1F */ &v60_disassembler::dop5FUNHANDLED }; -static int (*const dasm_optable_C6[8])(unsigned ipc, unsigned pc, std::ostream &stream) = +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_C6[8])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = { - /* 0x0 */ dopDBV, - /* 0x1 */ dopDBL, - /* 0x2 */ dopDBE, - /* 0x3 */ dopDBNH, - /* 0x4 */ dopDBN, - /* 0x5 */ dopDBR, - /* 0x6 */ dopDBLT, - /* 0x7 */ dopDBLE + /* 0x0 */ &v60_disassembler::dopDBV, + /* 0x1 */ &v60_disassembler::dopDBL, + /* 0x2 */ &v60_disassembler::dopDBE, + /* 0x3 */ &v60_disassembler::dopDBNH, + /* 0x4 */ &v60_disassembler::dopDBN, + /* 0x5 */ &v60_disassembler::dopDBR, + /* 0x6 */ &v60_disassembler::dopDBLT, + /* 0x7 */ &v60_disassembler::dopDBLE }; -static int (*const dasm_optable_C7[8])(unsigned ipc, unsigned pc, std::ostream &stream) = +u32 (v60_disassembler::*const v60_disassembler::dasm_optable_C7[8])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = { - /* 0x0 */ dopDBNV, - /* 0x1 */ dopDBNL, - /* 0x2 */ dopDBNE, - /* 0x3 */ dopDBH, - /* 0x4 */ dopDBP, - /* 0x5 */ dopTB, - /* 0x6 */ dopDBGE, - /* 0x7 */ dopDBGT + /* 0x0 */ &v60_disassembler::dopDBNV, + /* 0x1 */ &v60_disassembler::dopDBNL, + /* 0x2 */ &v60_disassembler::dopDBNE, + /* 0x3 */ &v60_disassembler::dopDBH, + /* 0x4 */ &v60_disassembler::dopDBP, + /* 0x5 */ &v60_disassembler::dopTB, + /* 0x6 */ &v60_disassembler::dopDBGE, + /* 0x7 */ &v60_disassembler::dopDBGT }; -static int dop58(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop58(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_58[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_58[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dop59(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop59(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_59[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_59[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dop5A(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5A(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_5A[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_5A[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dop5B(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5B(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_5B[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_5B[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dop5C(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5C(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_5C[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_5C[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dop5D(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5D(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_5D[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_5D[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dop5E(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5E(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_5E[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_5E[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dop5F(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dop5F(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_5F[readop(pc) & 0x1f](ipc, pc, stream); + return (this->*dasm_optable_5F[opcodes.r8(pc) & 0x1f])(ipc, pc, opcodes, stream); } -static int dopC6(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dopC6(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_C6[readop(pc) >> 5](ipc, pc, stream); + return (this->*dasm_optable_C6[opcodes.r8(pc) >> 5])(ipc, pc, opcodes, stream); } -static int dopC7(unsigned ipc, unsigned pc, std::ostream &stream) +u32 v60_disassembler::dopC7(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) { - return dasm_optable_C7[readop(pc) >> 5](ipc, pc, stream); + return (this->*dasm_optable_C7[opcodes.r8(pc) >> 5])(ipc, pc, opcodes, stream); } -static int (*const dasm_optable[256])(unsigned ipc, unsigned pc, std::ostream &stream) = -{ - /* 0x00 */ dopHALT, - /* 0x01 */ dopLDTASK, - /* 0x02 */ dopSTPR, - /* 0x03 */ dopGETRA, - /* 0x04 */ dopGETPTE, - /* 0x05 */ dopGETATE, - /* 0x06 */ dopUNHANDLED, - /* 0x07 */ dopUNHANDLED, - /* 0x08 */ dopRVBIT, - /* 0x09 */ dopMOVB, - /* 0x0A */ dopMOVSBH, - /* 0x0B */ dopMOVZBH, - /* 0x0C */ dopMOVSBW, - /* 0x0D */ dopMOVZBW, - /* 0x0E */ dopUNHANDLED, - /* 0x0F */ dopUNHANDLED, - /* 0x10 */ dopCLRTLBA, - /* 0x11 */ dopUNHANDLED, - /* 0x12 */ dopLDPR, - /* 0x13 */ dopUPDPSWW, - /* 0x14 */ dopUPDPTE, - /* 0x15 */ dopUPDATE, - /* 0x16 */ dopUNHANDLED, - /* 0x17 */ dopUNHANDLED, - /* 0x18 */ dopUNHANDLED, - /* 0x19 */ dopMOVTHB, - /* 0x1A */ dopUNHANDLED, - /* 0x1B */ dopMOVH, - /* 0x1C */ dopMOVSHW, - /* 0x1D */ dopMOVZHW, - /* 0x1E */ dopUNHANDLED, - /* 0x1F */ dopUNHANDLED, - /* 0x20 */ dopINB, - /* 0x21 */ dopOUTB, - /* 0x22 */ dopINH, - /* 0x23 */ dopOUTH, - /* 0x24 */ dopINW, - /* 0x25 */ dopOUTW, - /* 0x26 */ dopUNHANDLED, - /* 0x27 */ dopUNHANDLED, - /* 0x28 */ dopUNHANDLED, - /* 0x29 */ dopMOVTWB, - /* 0x2A */ dopUNHANDLED, - /* 0x2B */ dopMOVTWH, - /* 0x2C */ dopRVBYT, - /* 0x2D */ dopMOVW, - /* 0x2E */ dopUNHANDLED, - /* 0x2F */ dopUNHANDLED, - /* 0x30 */ dopUNHANDLED, - /* 0x31 */ dopUNHANDLED, - /* 0x32 */ dopUNHANDLED, - /* 0x33 */ dopUNHANDLED, - /* 0x34 */ dopUNHANDLED, - /* 0x35 */ dopUNHANDLED, - /* 0x36 */ dopUNHANDLED, - /* 0x37 */ dopUNHANDLED, - /* 0x38 */ dopNOTB, - /* 0x39 */ dopNEGB, - /* 0x3A */ dopNOTH, - /* 0x3B */ dopNEGH, - /* 0x3C */ dopNOTW, - /* 0x3D */ dopNEGW, - /* 0x3E */ dopUNHANDLED, - /* 0x3F */ dopMOVD, - /* 0x40 */ dopMOVEAB, - /* 0x41 */ dopXCHB, - /* 0x42 */ dopMOVEAH, - /* 0x43 */ dopXCHH, - /* 0x44 */ dopMOVEAW, - /* 0x45 */ dopXCHW, - /* 0x46 */ dopUNHANDLED, - /* 0x47 */ dopSETF, - /* 0x48 */ dopBSR, - /* 0x49 */ dopCALL, - /* 0x4A */ dopUPDPSWH, - /* 0x4B */ dopCHLVL, - /* 0x4C */ dopCAXI, - /* 0x4D */ dopCHKAR, - /* 0x4E */ dopCHKAW, - /* 0x4F */ dopCHKAE, - /* 0x50 */ dopREMB, - /* 0x51 */ dopREMUB, - /* 0x52 */ dopREMH, - /* 0x53 */ dopREMUH, - /* 0x54 */ dopREMW, - /* 0x55 */ dopREMUW, - /* 0x56 */ dopUNHANDLED, - /* 0x57 */ dopUNHANDLED, - /* 0x58 */ dop58, - /* 0x59 */ dop59, - /* 0x5A */ dop5A, - /* 0x5B */ dop5B, - /* 0x5C */ dop5C, - /* 0x5D */ dop5D, - /* 0x5E */ dop5E, - /* 0x5F */ dop5F, - /* 0x60 */ dopBV8, - /* 0x61 */ dopBNV8, - /* 0x62 */ dopBL8, - /* 0x63 */ dopBNL8, - /* 0x64 */ dopBE8, - /* 0x65 */ dopBNE8, - /* 0x66 */ dopBNH8, - /* 0x67 */ dopBH8, - /* 0x68 */ dopBN8, - /* 0x69 */ dopBP8, - /* 0x6A */ dopBR8, - /* 0x6B */ dopUNHANDLED, - /* 0x6C */ dopBLT8, - /* 0x6D */ dopBGE8, - /* 0x6E */ dopBLE8, - /* 0x6F */ dopBGT8, - /* 0x70 */ dopBV16, - /* 0x71 */ dopBNV16, - /* 0x72 */ dopBL16, - /* 0x73 */ dopBNL16, - /* 0x74 */ dopBE16, - /* 0x75 */ dopBNE16, - /* 0x76 */ dopBNH16, - /* 0x77 */ dopBH16, - /* 0x78 */ dopBN16, - /* 0x79 */ dopBP16, - /* 0x7A */ dopBR16, - /* 0x7B */ dopUNHANDLED, - /* 0x7C */ dopBLT16, - /* 0x7D */ dopBGE16, - /* 0x7E */ dopBLE16, - /* 0x7F */ dopBGT16, - /* 0x80 */ dopADDB, - /* 0x81 */ dopMULB, - /* 0x82 */ dopADDH, - /* 0x83 */ dopMULH, - /* 0x84 */ dopADDW, - /* 0x85 */ dopMULW, - /* 0x86 */ dopMULX, - /* 0x87 */ dopTEST1, - /* 0x88 */ dopORB, - /* 0x89 */ dopROTB, - /* 0x8A */ dopORH, - /* 0x8B */ dopROTH, - /* 0x8C */ dopORW, - /* 0x8D */ dopROTW, - /* 0x8E */ dopUNHANDLED, - /* 0x8F */ dopUNHANDLED, - /* 0x90 */ dopADDCB, - /* 0x91 */ dopMULUB, - /* 0x92 */ dopADDCH, - /* 0x93 */ dopMULUH, - /* 0x94 */ dopADDCW, - /* 0x95 */ dopMULUW, - /* 0x96 */ dopMULUX, - /* 0x97 */ dopSET1, - /* 0x98 */ dopSUBCB, - /* 0x99 */ dopROTCB, - /* 0x9A */ dopSUBCH, - /* 0x9B */ dopROTCH, - /* 0x9C */ dopSUBCW, - /* 0x9D */ dopROTCW, - /* 0x9E */ dopUNHANDLED, - /* 0x9F */ dopUNHANDLED, - /* 0xA0 */ dopANDB, - /* 0xA1 */ dopDIVB, - /* 0xA2 */ dopANDH, - /* 0xA3 */ dopDIVH, - /* 0xA4 */ dopANDW, - /* 0xA5 */ dopDIVW, - /* 0xA6 */ dopDIVX, - /* 0xA7 */ dopCLR1, - /* 0xA8 */ dopSUBB, - /* 0xA9 */ dopSHLB, - /* 0xAA */ dopSUBH, - /* 0xAB */ dopSHLH, - /* 0xAC */ dopSUBW, - /* 0xAD */ dopSHLW, - /* 0xAE */ dopUNHANDLED, - /* 0xAF */ dopUNHANDLED, - /* 0xB0 */ dopXORB, - /* 0xB1 */ dopDIVUB, - /* 0xB2 */ dopXORH, - /* 0xB3 */ dopDIVUH, - /* 0xB4 */ dopXORW, - /* 0xB5 */ dopDIVUW, - /* 0xB6 */ dopDIVUX, - /* 0xB7 */ dopNOT1, - /* 0xB8 */ dopCMPB, - /* 0xB9 */ dopSHAB, - /* 0xBA */ dopCMPH, - /* 0xBB */ dopSHAH, - /* 0xBC */ dopCMPW, - /* 0xBD */ dopSHAW, - /* 0xBE */ dopUNHANDLED, - /* 0xBF */ dopUNHANDLED, - /* 0xC0 */ dopUNHANDLED, - /* 0xC1 */ dopUNHANDLED, - /* 0xC2 */ dopUNHANDLED, - /* 0xC3 */ dopUNHANDLED, - /* 0xC4 */ dopUNHANDLED, - /* 0xC5 */ dopUNHANDLED, - /* 0xC6 */ dopC6, - /* 0xC7 */ dopC7, - /* 0xC8 */ dopBRK, - /* 0xC9 */ dopBRKV, - /* 0xCA */ dopRSR, - /* 0xCB */ dopTRAPFL, - /* 0xCC */ dopDISPOSE, - /* 0xCD */ dopNOP, - /* 0xCE */ dopUNHANDLED, - /* 0xCF */ dopUNHANDLED, - /* 0xD0 */ dopDECB, - /* 0xD1 */ dopDECB, - /* 0xD2 */ dopDECH, - /* 0xD3 */ dopDECH, - /* 0xD4 */ dopDECW, - /* 0xD5 */ dopDECW, - /* 0xD6 */ dopJMP, - /* 0xD7 */ dopJMP, - /* 0xD8 */ dopINCB, - /* 0xD9 */ dopINCB, - /* 0xDA */ dopINCH, - /* 0xDB */ dopINCH, - /* 0xDC */ dopINCW, - /* 0xDD */ dopINCW, - /* 0xDE */ dopPREPARE, - /* 0xDF */ dopPREPARE, - /* 0xE0 */ dopTASI, - /* 0xE1 */ dopTASI, - /* 0xE2 */ dopRET, - /* 0xE3 */ dopRET, - /* 0xE4 */ dopPOPM, - /* 0xE5 */ dopPOPM, - /* 0xE6 */ dopPOP, - /* 0xE7 */ dopPOP, - /* 0xE8 */ dopJSR, - /* 0xE9 */ dopJSR, - /* 0xEA */ dopRETIU, - /* 0xEB */ dopRETIU, - /* 0xEC */ dopPUSHM, - /* 0xED */ dopPUSHM, - /* 0xEE */ dopPUSH, - /* 0xEF */ dopPUSH, - /* 0xF0 */ dopTESTB, - /* 0xF1 */ dopTESTB, - /* 0xF2 */ dopTESTH, - /* 0xF3 */ dopTESTH, - /* 0xF4 */ dopTESTW, - /* 0xF5 */ dopTESTW, - /* 0xF6 */ dopGETPSW, - /* 0xF7 */ dopGETPSW, - /* 0xF8 */ dopTRAP, - /* 0xF9 */ dopTRAP, - /* 0xFA */ dopRETIS, - /* 0xFB */ dopRETIS, - /* 0xFC */ dopSTTASK, - /* 0xFD */ dopSTTASK, - /* 0xFE */ dopCLRTLB, - /* 0xFF */ dopCLRTLB +u32 (v60_disassembler::*const v60_disassembler::dasm_optable[256])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream) = +{ + /* 0x00 */ &v60_disassembler::dopHALT, + /* 0x01 */ &v60_disassembler::dopLDTASK, + /* 0x02 */ &v60_disassembler::dopSTPR, + /* 0x03 */ &v60_disassembler::dopGETRA, + /* 0x04 */ &v60_disassembler::dopGETPTE, + /* 0x05 */ &v60_disassembler::dopGETATE, + /* 0x06 */ &v60_disassembler::dopUNHANDLED, + /* 0x07 */ &v60_disassembler::dopUNHANDLED, + /* 0x08 */ &v60_disassembler::dopRVBIT, + /* 0x09 */ &v60_disassembler::dopMOVB, + /* 0x0A */ &v60_disassembler::dopMOVSBH, + /* 0x0B */ &v60_disassembler::dopMOVZBH, + /* 0x0C */ &v60_disassembler::dopMOVSBW, + /* 0x0D */ &v60_disassembler::dopMOVZBW, + /* 0x0E */ &v60_disassembler::dopUNHANDLED, + /* 0x0F */ &v60_disassembler::dopUNHANDLED, + /* 0x10 */ &v60_disassembler::dopCLRTLBA, + /* 0x11 */ &v60_disassembler::dopUNHANDLED, + /* 0x12 */ &v60_disassembler::dopLDPR, + /* 0x13 */ &v60_disassembler::dopUPDPSWW, + /* 0x14 */ &v60_disassembler::dopUPDPTE, + /* 0x15 */ &v60_disassembler::dopUPDATE, + /* 0x16 */ &v60_disassembler::dopUNHANDLED, + /* 0x17 */ &v60_disassembler::dopUNHANDLED, + /* 0x18 */ &v60_disassembler::dopUNHANDLED, + /* 0x19 */ &v60_disassembler::dopMOVTHB, + /* 0x1A */ &v60_disassembler::dopUNHANDLED, + /* 0x1B */ &v60_disassembler::dopMOVH, + /* 0x1C */ &v60_disassembler::dopMOVSHW, + /* 0x1D */ &v60_disassembler::dopMOVZHW, + /* 0x1E */ &v60_disassembler::dopUNHANDLED, + /* 0x1F */ &v60_disassembler::dopUNHANDLED, + /* 0x20 */ &v60_disassembler::dopINB, + /* 0x21 */ &v60_disassembler::dopOUTB, + /* 0x22 */ &v60_disassembler::dopINH, + /* 0x23 */ &v60_disassembler::dopOUTH, + /* 0x24 */ &v60_disassembler::dopINW, + /* 0x25 */ &v60_disassembler::dopOUTW, + /* 0x26 */ &v60_disassembler::dopUNHANDLED, + /* 0x27 */ &v60_disassembler::dopUNHANDLED, + /* 0x28 */ &v60_disassembler::dopUNHANDLED, + /* 0x29 */ &v60_disassembler::dopMOVTWB, + /* 0x2A */ &v60_disassembler::dopUNHANDLED, + /* 0x2B */ &v60_disassembler::dopMOVTWH, + /* 0x2C */ &v60_disassembler::dopRVBYT, + /* 0x2D */ &v60_disassembler::dopMOVW, + /* 0x2E */ &v60_disassembler::dopUNHANDLED, + /* 0x2F */ &v60_disassembler::dopUNHANDLED, + /* 0x30 */ &v60_disassembler::dopUNHANDLED, + /* 0x31 */ &v60_disassembler::dopUNHANDLED, + /* 0x32 */ &v60_disassembler::dopUNHANDLED, + /* 0x33 */ &v60_disassembler::dopUNHANDLED, + /* 0x34 */ &v60_disassembler::dopUNHANDLED, + /* 0x35 */ &v60_disassembler::dopUNHANDLED, + /* 0x36 */ &v60_disassembler::dopUNHANDLED, + /* 0x37 */ &v60_disassembler::dopUNHANDLED, + /* 0x38 */ &v60_disassembler::dopNOTB, + /* 0x39 */ &v60_disassembler::dopNEGB, + /* 0x3A */ &v60_disassembler::dopNOTH, + /* 0x3B */ &v60_disassembler::dopNEGH, + /* 0x3C */ &v60_disassembler::dopNOTW, + /* 0x3D */ &v60_disassembler::dopNEGW, + /* 0x3E */ &v60_disassembler::dopUNHANDLED, + /* 0x3F */ &v60_disassembler::dopMOVD, + /* 0x40 */ &v60_disassembler::dopMOVEAB, + /* 0x41 */ &v60_disassembler::dopXCHB, + /* 0x42 */ &v60_disassembler::dopMOVEAH, + /* 0x43 */ &v60_disassembler::dopXCHH, + /* 0x44 */ &v60_disassembler::dopMOVEAW, + /* 0x45 */ &v60_disassembler::dopXCHW, + /* 0x46 */ &v60_disassembler::dopUNHANDLED, + /* 0x47 */ &v60_disassembler::dopSETF, + /* 0x48 */ &v60_disassembler::dopBSR, + /* 0x49 */ &v60_disassembler::dopCALL, + /* 0x4A */ &v60_disassembler::dopUPDPSWH, + /* 0x4B */ &v60_disassembler::dopCHLVL, + /* 0x4C */ &v60_disassembler::dopCAXI, + /* 0x4D */ &v60_disassembler::dopCHKAR, + /* 0x4E */ &v60_disassembler::dopCHKAW, + /* 0x4F */ &v60_disassembler::dopCHKAE, + /* 0x50 */ &v60_disassembler::dopREMB, + /* 0x51 */ &v60_disassembler::dopREMUB, + /* 0x52 */ &v60_disassembler::dopREMH, + /* 0x53 */ &v60_disassembler::dopREMUH, + /* 0x54 */ &v60_disassembler::dopREMW, + /* 0x55 */ &v60_disassembler::dopREMUW, + /* 0x56 */ &v60_disassembler::dopUNHANDLED, + /* 0x57 */ &v60_disassembler::dopUNHANDLED, + /* 0x58 */ &v60_disassembler::dop58, + /* 0x59 */ &v60_disassembler::dop59, + /* 0x5A */ &v60_disassembler::dop5A, + /* 0x5B */ &v60_disassembler::dop5B, + /* 0x5C */ &v60_disassembler::dop5C, + /* 0x5D */ &v60_disassembler::dop5D, + /* 0x5E */ &v60_disassembler::dop5E, + /* 0x5F */ &v60_disassembler::dop5F, + /* 0x60 */ &v60_disassembler::dopBV8, + /* 0x61 */ &v60_disassembler::dopBNV8, + /* 0x62 */ &v60_disassembler::dopBL8, + /* 0x63 */ &v60_disassembler::dopBNL8, + /* 0x64 */ &v60_disassembler::dopBE8, + /* 0x65 */ &v60_disassembler::dopBNE8, + /* 0x66 */ &v60_disassembler::dopBNH8, + /* 0x67 */ &v60_disassembler::dopBH8, + /* 0x68 */ &v60_disassembler::dopBN8, + /* 0x69 */ &v60_disassembler::dopBP8, + /* 0x6A */ &v60_disassembler::dopBR8, + /* 0x6B */ &v60_disassembler::dopUNHANDLED, + /* 0x6C */ &v60_disassembler::dopBLT8, + /* 0x6D */ &v60_disassembler::dopBGE8, + /* 0x6E */ &v60_disassembler::dopBLE8, + /* 0x6F */ &v60_disassembler::dopBGT8, + /* 0x70 */ &v60_disassembler::dopBV16, + /* 0x71 */ &v60_disassembler::dopBNV16, + /* 0x72 */ &v60_disassembler::dopBL16, + /* 0x73 */ &v60_disassembler::dopBNL16, + /* 0x74 */ &v60_disassembler::dopBE16, + /* 0x75 */ &v60_disassembler::dopBNE16, + /* 0x76 */ &v60_disassembler::dopBNH16, + /* 0x77 */ &v60_disassembler::dopBH16, + /* 0x78 */ &v60_disassembler::dopBN16, + /* 0x79 */ &v60_disassembler::dopBP16, + /* 0x7A */ &v60_disassembler::dopBR16, + /* 0x7B */ &v60_disassembler::dopUNHANDLED, + /* 0x7C */ &v60_disassembler::dopBLT16, + /* 0x7D */ &v60_disassembler::dopBGE16, + /* 0x7E */ &v60_disassembler::dopBLE16, + /* 0x7F */ &v60_disassembler::dopBGT16, + /* 0x80 */ &v60_disassembler::dopADDB, + /* 0x81 */ &v60_disassembler::dopMULB, + /* 0x82 */ &v60_disassembler::dopADDH, + /* 0x83 */ &v60_disassembler::dopMULH, + /* 0x84 */ &v60_disassembler::dopADDW, + /* 0x85 */ &v60_disassembler::dopMULW, + /* 0x86 */ &v60_disassembler::dopMULX, + /* 0x87 */ &v60_disassembler::dopTEST1, + /* 0x88 */ &v60_disassembler::dopORB, + /* 0x89 */ &v60_disassembler::dopROTB, + /* 0x8A */ &v60_disassembler::dopORH, + /* 0x8B */ &v60_disassembler::dopROTH, + /* 0x8C */ &v60_disassembler::dopORW, + /* 0x8D */ &v60_disassembler::dopROTW, + /* 0x8E */ &v60_disassembler::dopUNHANDLED, + /* 0x8F */ &v60_disassembler::dopUNHANDLED, + /* 0x90 */ &v60_disassembler::dopADDCB, + /* 0x91 */ &v60_disassembler::dopMULUB, + /* 0x92 */ &v60_disassembler::dopADDCH, + /* 0x93 */ &v60_disassembler::dopMULUH, + /* 0x94 */ &v60_disassembler::dopADDCW, + /* 0x95 */ &v60_disassembler::dopMULUW, + /* 0x96 */ &v60_disassembler::dopMULUX, + /* 0x97 */ &v60_disassembler::dopSET1, + /* 0x98 */ &v60_disassembler::dopSUBCB, + /* 0x99 */ &v60_disassembler::dopROTCB, + /* 0x9A */ &v60_disassembler::dopSUBCH, + /* 0x9B */ &v60_disassembler::dopROTCH, + /* 0x9C */ &v60_disassembler::dopSUBCW, + /* 0x9D */ &v60_disassembler::dopROTCW, + /* 0x9E */ &v60_disassembler::dopUNHANDLED, + /* 0x9F */ &v60_disassembler::dopUNHANDLED, + /* 0xA0 */ &v60_disassembler::dopANDB, + /* 0xA1 */ &v60_disassembler::dopDIVB, + /* 0xA2 */ &v60_disassembler::dopANDH, + /* 0xA3 */ &v60_disassembler::dopDIVH, + /* 0xA4 */ &v60_disassembler::dopANDW, + /* 0xA5 */ &v60_disassembler::dopDIVW, + /* 0xA6 */ &v60_disassembler::dopDIVX, + /* 0xA7 */ &v60_disassembler::dopCLR1, + /* 0xA8 */ &v60_disassembler::dopSUBB, + /* 0xA9 */ &v60_disassembler::dopSHLB, + /* 0xAA */ &v60_disassembler::dopSUBH, + /* 0xAB */ &v60_disassembler::dopSHLH, + /* 0xAC */ &v60_disassembler::dopSUBW, + /* 0xAD */ &v60_disassembler::dopSHLW, + /* 0xAE */ &v60_disassembler::dopUNHANDLED, + /* 0xAF */ &v60_disassembler::dopUNHANDLED, + /* 0xB0 */ &v60_disassembler::dopXORB, + /* 0xB1 */ &v60_disassembler::dopDIVUB, + /* 0xB2 */ &v60_disassembler::dopXORH, + /* 0xB3 */ &v60_disassembler::dopDIVUH, + /* 0xB4 */ &v60_disassembler::dopXORW, + /* 0xB5 */ &v60_disassembler::dopDIVUW, + /* 0xB6 */ &v60_disassembler::dopDIVUX, + /* 0xB7 */ &v60_disassembler::dopNOT1, + /* 0xB8 */ &v60_disassembler::dopCMPB, + /* 0xB9 */ &v60_disassembler::dopSHAB, + /* 0xBA */ &v60_disassembler::dopCMPH, + /* 0xBB */ &v60_disassembler::dopSHAH, + /* 0xBC */ &v60_disassembler::dopCMPW, + /* 0xBD */ &v60_disassembler::dopSHAW, + /* 0xBE */ &v60_disassembler::dopUNHANDLED, + /* 0xBF */ &v60_disassembler::dopUNHANDLED, + /* 0xC0 */ &v60_disassembler::dopUNHANDLED, + /* 0xC1 */ &v60_disassembler::dopUNHANDLED, + /* 0xC2 */ &v60_disassembler::dopUNHANDLED, + /* 0xC3 */ &v60_disassembler::dopUNHANDLED, + /* 0xC4 */ &v60_disassembler::dopUNHANDLED, + /* 0xC5 */ &v60_disassembler::dopUNHANDLED, + /* 0xC6 */ &v60_disassembler::dopC6, + /* 0xC7 */ &v60_disassembler::dopC7, + /* 0xC8 */ &v60_disassembler::dopBRK, + /* 0xC9 */ &v60_disassembler::dopBRKV, + /* 0xCA */ &v60_disassembler::dopRSR, + /* 0xCB */ &v60_disassembler::dopTRAPFL, + /* 0xCC */ &v60_disassembler::dopDISPOSE, + /* 0xCD */ &v60_disassembler::dopNOP, + /* 0xCE */ &v60_disassembler::dopUNHANDLED, + /* 0xCF */ &v60_disassembler::dopUNHANDLED, + /* 0xD0 */ &v60_disassembler::dopDECB, + /* 0xD1 */ &v60_disassembler::dopDECB, + /* 0xD2 */ &v60_disassembler::dopDECH, + /* 0xD3 */ &v60_disassembler::dopDECH, + /* 0xD4 */ &v60_disassembler::dopDECW, + /* 0xD5 */ &v60_disassembler::dopDECW, + /* 0xD6 */ &v60_disassembler::dopJMP, + /* 0xD7 */ &v60_disassembler::dopJMP, + /* 0xD8 */ &v60_disassembler::dopINCB, + /* 0xD9 */ &v60_disassembler::dopINCB, + /* 0xDA */ &v60_disassembler::dopINCH, + /* 0xDB */ &v60_disassembler::dopINCH, + /* 0xDC */ &v60_disassembler::dopINCW, + /* 0xDD */ &v60_disassembler::dopINCW, + /* 0xDE */ &v60_disassembler::dopPREPARE, + /* 0xDF */ &v60_disassembler::dopPREPARE, + /* 0xE0 */ &v60_disassembler::dopTASI, + /* 0xE1 */ &v60_disassembler::dopTASI, + /* 0xE2 */ &v60_disassembler::dopRET, + /* 0xE3 */ &v60_disassembler::dopRET, + /* 0xE4 */ &v60_disassembler::dopPOPM, + /* 0xE5 */ &v60_disassembler::dopPOPM, + /* 0xE6 */ &v60_disassembler::dopPOP, + /* 0xE7 */ &v60_disassembler::dopPOP, + /* 0xE8 */ &v60_disassembler::dopJSR, + /* 0xE9 */ &v60_disassembler::dopJSR, + /* 0xEA */ &v60_disassembler::dopRETIU, + /* 0xEB */ &v60_disassembler::dopRETIU, + /* 0xEC */ &v60_disassembler::dopPUSHM, + /* 0xED */ &v60_disassembler::dopPUSHM, + /* 0xEE */ &v60_disassembler::dopPUSH, + /* 0xEF */ &v60_disassembler::dopPUSH, + /* 0xF0 */ &v60_disassembler::dopTESTB, + /* 0xF1 */ &v60_disassembler::dopTESTB, + /* 0xF2 */ &v60_disassembler::dopTESTH, + /* 0xF3 */ &v60_disassembler::dopTESTH, + /* 0xF4 */ &v60_disassembler::dopTESTW, + /* 0xF5 */ &v60_disassembler::dopTESTW, + /* 0xF6 */ &v60_disassembler::dopGETPSW, + /* 0xF7 */ &v60_disassembler::dopGETPSW, + /* 0xF8 */ &v60_disassembler::dopTRAP, + /* 0xF9 */ &v60_disassembler::dopTRAP, + /* 0xFA */ &v60_disassembler::dopRETIS, + /* 0xFB */ &v60_disassembler::dopRETIS, + /* 0xFC */ &v60_disassembler::dopSTTASK, + /* 0xFD */ &v60_disassembler::dopSTTASK, + /* 0xFE */ &v60_disassembler::dopCLRTLB, + /* 0xFF */ &v60_disassembler::dopCLRTLB }; -CPU_DISASSEMBLE(v60) +offs_t v60_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) { - rombase = oprom; - pcbase = pc; - return dasm_optable[oprom[0]](pc, pc+1, stream) | DASMFLAG_SUPPORTED; + return (this->*dasm_optable[opcodes.r8(pc)])(pc, pc+1, opcodes, stream) | SUPPORTED; } -CPU_DISASSEMBLE(v70) +u32 v60_disassembler::opcode_alignment() const { - rombase = oprom; - pcbase = pc; - return dasm_optable[oprom[0]](pc, pc+1, stream) | DASMFLAG_SUPPORTED; + return 1; } diff --git a/src/devices/cpu/v60/v60d.h b/src/devices/cpu/v60/v60d.h new file mode 100644 index 00000000000..6bbef76f47c --- /dev/null +++ b/src/devices/cpu/v60/v60d.h @@ -0,0 +1,359 @@ +// license:BSD-3-Clause +// copyright-holders:Farfetch'd, R. Belmont + +#ifndef MAME_CPU_V60_V60D_H +#define MAME_CPU_V60_V60D_H + +#pragma once + +class v60_disassembler : public util::disasm_interface +{ +public: + v60_disassembler() = default; + virtual ~v60_disassembler() = default; + + virtual u32 opcode_alignment() const override; + virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; + +private: + static const char *const v60_reg_names[69]; + static u32 (v60_disassembler::*const dasm_optable_58[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_59[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_5A[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_5B[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_5C[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_5D[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_5E[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_5F[32])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_C6[8])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable_C7[8])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + static u32 (v60_disassembler::*const dasm_optable[256])(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + + u32 dop58(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop58UNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop59(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop59UNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5A(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5AUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5B(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5BUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5C(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5CUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5D(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5DUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5E(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5EUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5F(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dop5FUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopABSFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopABSFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDCB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDCH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDCW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDDC(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopADDW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopANDB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopANDBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopANDBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopANDH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopANDNBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopANDNBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopANDW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBE16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBE8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBGE16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBGE8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBGT16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBGT8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBH16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBH8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBL16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBL8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBLE16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBLE8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBLT16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBLT8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBN16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBN8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNE16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNE8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNH16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNH8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNL16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNL8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNV16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBNV8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBP16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBP8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBR16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBR8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBRK(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBRKV(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBSR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBV16(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopBV8(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopC6(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopC7(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCALL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCAXI(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCHKAE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCHKAR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCHKAW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCHLVL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCLR1(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCLRTLB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCLRTLBA(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPBFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPBFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPBFZ(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPCB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPCFB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPCFH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPCH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPCSB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPCSH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCMPW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTDPZ(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTDZP(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTLS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTLW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTSL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTSW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTWL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopCVTWS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBGE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBGT(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBLE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBLT(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBN(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBNE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBNH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBNL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBNV(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBP(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDBV(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDECB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDECH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDECW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDISPOSE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVUB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVUH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVUW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVUX(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopDIVX(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopEXTBFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopEXTBFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopEXTBFZ(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopGETATE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopGETPSW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopGETPTE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopGETRA(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopHALT(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINCB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINCH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINCW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINSBFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINSBFR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopINW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopJMP(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopJSR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopLDPR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopLDTASK(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCDB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCDH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCFDB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCFDH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCFUB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCFUH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCSB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCSH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCUB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVCUH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVEAB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVEAH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVEAW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVSBH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVSBW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVSHW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVTHB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVTWB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVTWH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVZBH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVZBW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMOVZHW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULUB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULUH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULUW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULUX(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopMULX(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNEGB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNEGFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNEGFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNEGH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNEGW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNOP(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNOT1(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNOTB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNOTBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNOTBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNOTH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopNOTW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopORB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopORBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopORBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopORH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopORNBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopORNBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopORW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopOUTB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopOUTH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopOUTW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopPOP(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopPOPM(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopPREPARE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopPUSH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopPUSHM(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopREMB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopREMH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopREMUB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopREMUH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopREMUW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopREMW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopRET(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopRETIS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopRETIU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopROTB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopROTCB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopROTCH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopROTCW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopROTH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopROTW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopRSR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopRVBIT(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopRVBYT(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCH0BSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCH0BSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCH1BSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCH1BSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCHCDB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCHCDH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCHCUB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCHCUH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCLFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSCLFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSET1(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSETF(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSHAB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSHAH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSHAW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSHLB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSHLH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSHLW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSKPCDB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSKPCDH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSKPCUB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSKPCUH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSTPR(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSTTASK(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBCB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBCH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBCW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBDC(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBFS(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBRDC(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopSUBW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTASI(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTEST1(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTESTB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTESTH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTESTW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTRAP(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopTRAPFL(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopUNHANDLED(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopUPDATE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopUPDPSWH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopUPDPSWW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopUPDPTE(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXCHB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXCHH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXCHW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXORB(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXORBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXORBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXORH(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXORNBSD(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXORNBSU(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 dopXORW(unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + + void out_AM_Register(int reg, std::ostream &stream); + void out_AM_RegisterIndirect(int reg, int opsize, std::ostream &stream); + void out_AM_RegisterIndirectIndexed(int rn, int rx, int opsize, std::ostream &stream); + void out_AM_Autoincrement(int reg, int opsize, std::ostream &stream); + void out_AM_Autodecrement(int reg, int opsize, std::ostream &stream); + void out_AM_Displacement(int reg, int disp, int opsize, std::ostream &stream); + void out_AM_DisplacementIndexed(int rn, int rx, int disp, int opsize, std::ostream &stream); + void out_AM_PCDisplacement(offs_t pc, int disp, int opsize, std::ostream &stream); + void out_AM_PCDisplacementIndexed(offs_t pc, int disp, int rx, int opsize, std::ostream &stream); + void out_AM_DisplacementIndirect(int reg, int disp, int opsize, std::ostream &stream); + void out_AM_DisplacementIndirectIndexed(int rn, int rx, int disp, int opsize, std::ostream &stream); + void out_AM_PCDisplacementIndirect(offs_t pc, int disp, int opsize, std::ostream &stream); + void out_AM_PCDisplacementIndirectIndexed(offs_t pc, int disp, int rx, int opsize, std::ostream &stream); + void out_AM_DoubleDisplacement(int reg, int disp2, int disp1, int opsize, std::ostream &stream); + void out_AM_PCDoubleDisplacement(offs_t pc, int disp2, int disp1, int opsize, std::ostream &stream); + void out_AM_DirectAddress(unsigned addr, int opsize, std::ostream &stream); + void out_AM_DirectAddressIndexed(unsigned addr, int rx, int opsize, std::ostream &stream); + void out_AM_DirectAddressDeferred(unsigned addr, int opsize, std::ostream &stream); + void out_AM_DirectAddressDeferredIndexed(unsigned addr, int rx, int opsize, std::ostream &stream); + void out_AM_Immediate(unsigned value, int opsize, std::ostream &stream); + u32 decode_AM(unsigned ipc, offs_t pc, int m, int opsize, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F1(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F2(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F1F2(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F3(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F4a(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F4b(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F5(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F6(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F7a(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F7b(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + u32 decode_F7c(const char *opnm, int opsize1, int opsize2, unsigned ipc, offs_t pc, const data_buffer &opcodes, std::ostream &stream); + +}; + +#endif |