summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/dsp56156/opcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/dsp56156/opcode.h')
-rw-r--r--src/devices/cpu/dsp56156/opcode.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/devices/cpu/dsp56156/opcode.h b/src/devices/cpu/dsp56156/opcode.h
new file mode 100644
index 00000000000..1044af8f188
--- /dev/null
+++ b/src/devices/cpu/dsp56156/opcode.h
@@ -0,0 +1,46 @@
+// license:BSD-3-Clause
+// copyright-holders:Andrew Gardner
+#ifndef DSP56156_OPCODE_H
+#define DSP56156_OPCODE_H
+
+#include "inst.h"
+#include "pmove.h"
+
+#include "dsp56156.h"
+
+//
+// An Opcode contains an instruction and a parallel move operation.
+//
+namespace DSP_56156
+{
+class Instruction;
+class ParallelMove;
+
+class Opcode
+{
+public:
+ Opcode(uint16_t w0, uint16_t w1);
+ virtual ~Opcode();
+
+ std::string disassemble() const;
+ void evaluate(dsp56156_core* cpustate) const;
+ size_t size() const;
+ size_t evalSize() const;
+
+ // Peek through to the instruction
+ const reg_id& instSource() const;
+ const reg_id& instDestination() const;
+ size_t instAccumulatorBitsModified() const;
+
+private:
+ std::unique_ptr<Instruction> m_instruction;
+ std::unique_ptr<ParallelMove> m_parallelMove;
+
+ uint16_t m_word0;
+ //uint16_t m_word1;
+
+ std::string dcString() const;
+};
+
+}
+#endif