Adding disassembler bits for alu.
This commit is contained in:
@@ -147,6 +147,15 @@ typedef struct {
|
|||||||
} XFX;
|
} XFX;
|
||||||
// kXEPPCInstrFormatXFL
|
// kXEPPCInstrFormatXFL
|
||||||
// kXEPPCInstrFormatXS
|
// kXEPPCInstrFormatXS
|
||||||
|
struct {
|
||||||
|
uint32_t Rc : 1;
|
||||||
|
uint32_t SH5 : 1;
|
||||||
|
uint32_t : 9;
|
||||||
|
uint32_t SH : 5;
|
||||||
|
uint32_t RA : 5;
|
||||||
|
uint32_t RT : 5;
|
||||||
|
uint32_t : 6;
|
||||||
|
} XS;
|
||||||
// kXEPPCInstrFormatXO
|
// kXEPPCInstrFormatXO
|
||||||
struct {
|
struct {
|
||||||
uint32_t Rc : 1;
|
uint32_t Rc : 1;
|
||||||
@@ -165,7 +174,7 @@ typedef struct {
|
|||||||
uint32_t MB : 5;
|
uint32_t MB : 5;
|
||||||
uint32_t SH : 5;
|
uint32_t SH : 5;
|
||||||
uint32_t RA : 5;
|
uint32_t RA : 5;
|
||||||
uint32_t RS : 5;
|
uint32_t RT : 5;
|
||||||
uint32_t : 6;
|
uint32_t : 6;
|
||||||
} M;
|
} M;
|
||||||
// kXEPPCInstrFormatMD
|
// kXEPPCInstrFormatMD
|
||||||
@@ -177,10 +186,20 @@ typedef struct {
|
|||||||
uint32_t MB : 5;
|
uint32_t MB : 5;
|
||||||
uint32_t SH : 5;
|
uint32_t SH : 5;
|
||||||
uint32_t RA : 5;
|
uint32_t RA : 5;
|
||||||
uint32_t RS : 5;
|
uint32_t RT : 5;
|
||||||
uint32_t : 6;
|
uint32_t : 6;
|
||||||
} MD;
|
} MD;
|
||||||
// kXEPPCInstrFormatMDS
|
// kXEPPCInstrFormatMDS
|
||||||
|
struct {
|
||||||
|
uint32_t Rc : 1;
|
||||||
|
uint32_t : 4;
|
||||||
|
uint32_t MB5 : 1;
|
||||||
|
uint32_t MB : 5;
|
||||||
|
uint32_t RB : 5;
|
||||||
|
uint32_t RA : 5;
|
||||||
|
uint32_t RT : 5;
|
||||||
|
uint32_t : 6;
|
||||||
|
} MDS;
|
||||||
// kXEPPCInstrFormatVA
|
// kXEPPCInstrFormatVA
|
||||||
// kXEPPCInstrFormatVX
|
// kXEPPCInstrFormatVX
|
||||||
// kXEPPCInstrFormatVXR
|
// kXEPPCInstrFormatVXR
|
||||||
@@ -237,13 +256,16 @@ public:
|
|||||||
kOE = 1 << 0,
|
kOE = 1 << 0,
|
||||||
kRc = 1 << 1,
|
kRc = 1 << 1,
|
||||||
kCA = 1 << 2,
|
kCA = 1 << 2,
|
||||||
|
kCR = 1 << 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
char name[16];
|
char name[16];
|
||||||
|
char info[64];
|
||||||
std::vector<InstrOperand> operands;
|
std::vector<InstrOperand> operands;
|
||||||
std::vector<InstrRegister> special_registers;
|
std::vector<InstrRegister> special_registers;
|
||||||
|
|
||||||
void Init(std::string name, uint32_t flags);
|
void Init(std::string name, std::string info, uint32_t flags);
|
||||||
|
void AddCR(uint32_t bf, InstrRegister::Access access);
|
||||||
void AddRegOperand(InstrRegister::RegisterSet set, uint32_t ordinal,
|
void AddRegOperand(InstrRegister::RegisterSet set, uint32_t ordinal,
|
||||||
InstrRegister::Access access, std::string display = "");
|
InstrRegister::Access access, std::string display = "");
|
||||||
void AddSImmOperand(uint64_t value, size_t width, std::string display = "");
|
void AddSImmOperand(uint64_t value, size_t width, std::string display = "");
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@
|
|||||||
using namespace xe::cpu::ppc;
|
using namespace xe::cpu::ppc;
|
||||||
|
|
||||||
|
|
||||||
void InstrDisasm::Init(std::string name, uint32_t flags) {
|
void InstrDisasm::Init(std::string name, std::string info, uint32_t flags) {
|
||||||
operands.clear();
|
operands.clear();
|
||||||
special_registers.clear();
|
special_registers.clear();
|
||||||
|
|
||||||
@@ -39,6 +39,14 @@ void InstrDisasm::Init(std::string name, uint32_t flags) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
XEIGNORE(xestrcpya(this->name, XECOUNT(this->name), name.c_str()));
|
XEIGNORE(xestrcpya(this->name, XECOUNT(this->name), name.c_str()));
|
||||||
|
|
||||||
|
XEIGNORE(xestrcpya(this->info, XECOUNT(this->info), info.c_str()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void InstrDisasm::AddCR(uint32_t bf, InstrRegister::Access access) {
|
||||||
|
special_registers.push_back((InstrRegister){
|
||||||
|
InstrRegister::kCR, bf, access
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstrDisasm::AddRegOperand(
|
void InstrDisasm::AddRegOperand(
|
||||||
|
|||||||
Reference in New Issue
Block a user