summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/dsp56k/opcode.h
blob: 86f5a3f135083b36e09cb08a9a0fe6630ecc210a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef __DSP56K_OPCODE_H__
#define __DSP56K_OPCODE_H__

#include "emu.h"
#include "inst.h"
#include "pmove.h"

#include "dsp56k.h"

//
// An Opcode contains an instruction and a parallel move operation.
//
namespace DSP56K
{
class Instruction;
class ParallelMove;

class Opcode
{
public:
	Opcode(UINT16 w0, UINT16 w1);
	virtual ~Opcode();

	astring disassemble() const;
	void evaluate(dsp56k_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;
	const size_t instAccumulatorBitsModified() const;

private:
	Instruction* m_instruction;
	ParallelMove* m_parallelMove;

	UINT16 m_word0;
	UINT16 m_word1;

	astring dcString() const;
};

}
#endif