rpcsx/rpcs3/Emu/Cell/PPCDecoder.h

32 lines
1.2 KiB
C
Raw Normal View History

#pragma once
#include "Emu/CPU/CPUDecoder.h"
#include "PPCInstrTable.h"
class PPCDecoder : public CPUDecoder
{
public:
virtual void Decode(const u32 code)=0;
virtual u8 DecodeMemory(const u64 address);
virtual ~PPCDecoder() = default;
};
2013-07-04 16:20:36 +02:00
template<typename TO, uint from, uint to>
2014-04-06 21:23:32 +02:00
static InstrList<(1 << (CodeField<from, to>::size)), TO>* new_list(const CodeField<from, to>& func, InstrCaller<TO>* error_func = nullptr)
{
2014-04-06 21:23:32 +02:00
return new InstrList<(1 << (CodeField<from, to>::size)), TO>(func, error_func);
}
2013-07-04 16:20:36 +02:00
template<int count, typename TO, uint from, uint to>
2014-04-06 21:23:32 +02:00
static InstrList<(1 << (CodeField<from, to>::size)), TO>* new_list(InstrList<count, TO>* parent, int opcode, const CodeField<from, to>& func, InstrCaller<TO>* error_func = nullptr)
{
2014-04-06 21:23:32 +02:00
return connect_list(parent, new InstrList<(1 << (CodeField<from, to>::size)), TO>(func, error_func), opcode);
}
2013-07-04 16:20:36 +02:00
template<int count, typename TO, uint from, uint to>
2014-04-06 21:23:32 +02:00
static InstrList<(1 << (CodeField<from, to>::size)), TO>* new_list(InstrList<count, TO>* parent, const CodeField<from, to>& func, InstrCaller<TO>* error_func = nullptr)
{
2014-04-06 21:23:32 +02:00
return connect_list(parent, new InstrList<(1 << (CodeField<from, to>::size)), TO>(func, error_func));
}