Added support for a few RV64I instructions
This commit is contained in:
@@ -41,6 +41,8 @@ static const std::unordered_map<int, struct InstTableEntry_t> sc_instTable = {
|
||||
{Opcode::FMNMSUB, {false, InstType::R4_TYPE}},
|
||||
{Opcode::VSET, {false, InstType::V_TYPE}},
|
||||
{Opcode::GPGPU, {false, InstType::R_TYPE}},
|
||||
{Opcode::R_INST_64, {false, InstType::R_TYPE}},
|
||||
{Opcode::I_INST_64, {false, InstType::I_TYPE}},
|
||||
};
|
||||
|
||||
static const char* op_string(const Instr &instr) {
|
||||
@@ -118,6 +120,24 @@ static const char* op_string(const Instr &instr) {
|
||||
default:
|
||||
std::abort();
|
||||
}
|
||||
// simx64
|
||||
case Opcode::R_INST_64:
|
||||
switch (func3) {
|
||||
case 0: return func7 ? "SUBW" : "ADDW";
|
||||
case 1: return "SLLW";
|
||||
case 5: return func7 ? "SRAW" : "SRLW";
|
||||
default:
|
||||
std::abort();
|
||||
}
|
||||
// simx64
|
||||
case Opcode::I_INST_64:
|
||||
switch (func3) {
|
||||
case 0: return "ADDIW";
|
||||
case 1: return "SLLIW";
|
||||
case 5: return func7 ? "SRAIW" : "SRLIW";
|
||||
default:
|
||||
std::abort();
|
||||
}
|
||||
case Opcode::SYS_INST:
|
||||
switch (func3) {
|
||||
case 0: return imm ? "EBREAK" : "ECALL";
|
||||
|
||||
Reference in New Issue
Block a user