mirror of
https://github.com/Inori/GPCS4.git
synced 2024-05-20 13:07:58 -04:00
auto generate instruction classes
This commit is contained in:
parent
0d8974ad72
commit
129ee73cd6
File diff suppressed because it is too large
Load diff
|
@ -91,6 +91,11 @@ VISOPCInstruction::OP ParserSISOPC::GetVISOPCOp(Instruction::instruction32bit he
|
|||
}
|
||||
}
|
||||
|
||||
const GCNInstructionFormat& ParserSISOPC::GetSISOPCMeta(SISOPCInstruction::OP op)
|
||||
{
|
||||
return g_instructionFormatMapSOPC[op];
|
||||
}
|
||||
|
||||
ParserSI::kaStatus ParserSISOPC::Parse(GDT_HW_GENERATION hwGen, Instruction::instruction32bit hexInstruction, std::unique_ptr<Instruction>& instruction, bool& hasLiteral)
|
||||
{
|
||||
unsigned int ridx0 = 0, ridx1 = 0;
|
||||
|
@ -102,7 +107,8 @@ ParserSI::kaStatus ParserSISOPC::Parse(GDT_HW_GENERATION hwGen, Instruction::ins
|
|||
if ((hwGen == GDT_HW_GENERATION_SEAISLAND) || (hwGen == GDT_HW_GENERATION_SOUTHERNISLAND))
|
||||
{
|
||||
SISOPCInstruction::OP op = GetSISOPCOp(hexInstruction);
|
||||
instruction = std::make_unique<SISOPCInstruction>(ssrc0, ssrc1, op, ridx0, ridx1);
|
||||
auto meta = GetSISOPCMeta(op);
|
||||
instruction = std::make_unique<SISOPCInstruction>(ssrc0, ssrc1, op, ridx0, ridx1, meta.insClass);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -72,6 +72,8 @@ private:
|
|||
/// \param[in] hexInstruction The 32 bit hexadecimal instruction.
|
||||
/// \returns An OP.
|
||||
static VISOPCInstruction::OP GetVISOPCOp(Instruction::instruction32bit hexInstruction);
|
||||
|
||||
const GCNInstructionFormat& GetSISOPCMeta(SISOPCInstruction::OP op);
|
||||
};
|
||||
|
||||
#endif //__PARSERSISOPC_H
|
||||
|
|
1385
Tools/GenerateInstructionClass.py
Normal file
1385
Tools/GenerateInstructionClass.py
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue