applies newest CoreDSL changes

This commit is contained in:
2023-09-20 15:12:03 +02:00
parent de45d06878
commit 51f6fbe0dd
5 changed files with 640 additions and 547 deletions

View File

@ -269,64 +269,64 @@ private:
{32, 0b00000010000000000110000000110011, 0b11111110000000000111000001111111, &this_class::__rem},
/* instruction REMU, encoding '0b00000010000000000111000000110011' */
{32, 0b00000010000000000111000000110011, 0b11111110000000000111000001111111, &this_class::__remu},
/* instruction CADDI4SPN, encoding '0b0000000000000000' */
{16, 0b0000000000000000, 0b1110000000000011, &this_class::__caddi4spn},
/* instruction CLW, encoding '0b0100000000000000' */
{16, 0b0100000000000000, 0b1110000000000011, &this_class::__clw},
/* instruction CSW, encoding '0b1100000000000000' */
{16, 0b1100000000000000, 0b1110000000000011, &this_class::__csw},
/* instruction CADDI, encoding '0b0000000000000001' */
{16, 0b0000000000000001, 0b1110000000000011, &this_class::__caddi},
/* instruction CNOP, encoding '0b0000000000000001' */
{16, 0b0000000000000001, 0b1110111110000011, &this_class::__cnop},
/* instruction CJAL, encoding '0b0010000000000001' */
{16, 0b0010000000000001, 0b1110000000000011, &this_class::__cjal},
/* instruction CLI, encoding '0b0100000000000001' */
{16, 0b0100000000000001, 0b1110000000000011, &this_class::__cli},
/* instruction CLUI, encoding '0b0110000000000001' */
{16, 0b0110000000000001, 0b1110000000000011, &this_class::__clui},
/* instruction CADDI16SP, encoding '0b0110000100000001' */
{16, 0b0110000100000001, 0b1110111110000011, &this_class::__caddi16sp},
/* instruction C__ADDI4SPN, encoding '0b0000000000000000' */
{16, 0b0000000000000000, 0b1110000000000011, &this_class::__c__addi4spn},
/* instruction C__LW, encoding '0b0100000000000000' */
{16, 0b0100000000000000, 0b1110000000000011, &this_class::__c__lw},
/* instruction C__SW, encoding '0b1100000000000000' */
{16, 0b1100000000000000, 0b1110000000000011, &this_class::__c__sw},
/* instruction C__ADDI, encoding '0b0000000000000001' */
{16, 0b0000000000000001, 0b1110000000000011, &this_class::__c__addi},
/* instruction C__NOP, encoding '0b0000000000000001' */
{16, 0b0000000000000001, 0b1110111110000011, &this_class::__c__nop},
/* instruction C__JAL, encoding '0b0010000000000001' */
{16, 0b0010000000000001, 0b1110000000000011, &this_class::__c__jal},
/* instruction C__LI, encoding '0b0100000000000001' */
{16, 0b0100000000000001, 0b1110000000000011, &this_class::__c__li},
/* instruction C__LUI, encoding '0b0110000000000001' */
{16, 0b0110000000000001, 0b1110000000000011, &this_class::__c__lui},
/* instruction C__ADDI16SP, encoding '0b0110000100000001' */
{16, 0b0110000100000001, 0b1110111110000011, &this_class::__c__addi16sp},
/* instruction __reserved_clui, encoding '0b0110000000000001' */
{16, 0b0110000000000001, 0b1111000001111111, &this_class::____reserved_clui},
/* instruction CSRLI, encoding '0b1000000000000001' */
{16, 0b1000000000000001, 0b1111110000000011, &this_class::__csrli},
/* instruction CSRAI, encoding '0b1000010000000001' */
{16, 0b1000010000000001, 0b1111110000000011, &this_class::__csrai},
/* instruction CANDI, encoding '0b1000100000000001' */
{16, 0b1000100000000001, 0b1110110000000011, &this_class::__candi},
/* instruction CSUB, encoding '0b1000110000000001' */
{16, 0b1000110000000001, 0b1111110001100011, &this_class::__csub},
/* instruction CXOR, encoding '0b1000110000100001' */
{16, 0b1000110000100001, 0b1111110001100011, &this_class::__cxor},
/* instruction COR, encoding '0b1000110001000001' */
{16, 0b1000110001000001, 0b1111110001100011, &this_class::__cor},
/* instruction CAND, encoding '0b1000110001100001' */
{16, 0b1000110001100001, 0b1111110001100011, &this_class::__cand},
/* instruction CJ, encoding '0b1010000000000001' */
{16, 0b1010000000000001, 0b1110000000000011, &this_class::__cj},
/* instruction CBEQZ, encoding '0b1100000000000001' */
{16, 0b1100000000000001, 0b1110000000000011, &this_class::__cbeqz},
/* instruction CBNEZ, encoding '0b1110000000000001' */
{16, 0b1110000000000001, 0b1110000000000011, &this_class::__cbnez},
/* instruction CSLLI, encoding '0b0000000000000010' */
{16, 0b0000000000000010, 0b1111000000000011, &this_class::__cslli},
/* instruction CLWSP, encoding '0b0100000000000010' */
{16, 0b0100000000000010, 0b1110000000000011, &this_class::__clwsp},
/* instruction CMV, encoding '0b1000000000000010' */
{16, 0b1000000000000010, 0b1111000000000011, &this_class::__cmv},
/* instruction CJR, encoding '0b1000000000000010' */
{16, 0b1000000000000010, 0b1111000001111111, &this_class::__cjr},
/* instruction C__SRLI, encoding '0b1000000000000001' */
{16, 0b1000000000000001, 0b1111110000000011, &this_class::__c__srli},
/* instruction C__SRAI, encoding '0b1000010000000001' */
{16, 0b1000010000000001, 0b1111110000000011, &this_class::__c__srai},
/* instruction C__ANDI, encoding '0b1000100000000001' */
{16, 0b1000100000000001, 0b1110110000000011, &this_class::__c__andi},
/* instruction C__SUB, encoding '0b1000110000000001' */
{16, 0b1000110000000001, 0b1111110001100011, &this_class::__c__sub},
/* instruction C__XOR, encoding '0b1000110000100001' */
{16, 0b1000110000100001, 0b1111110001100011, &this_class::__c__xor},
/* instruction C__OR, encoding '0b1000110001000001' */
{16, 0b1000110001000001, 0b1111110001100011, &this_class::__c__or},
/* instruction C__AND, encoding '0b1000110001100001' */
{16, 0b1000110001100001, 0b1111110001100011, &this_class::__c__and},
/* instruction C__J, encoding '0b1010000000000001' */
{16, 0b1010000000000001, 0b1110000000000011, &this_class::__c__j},
/* instruction C__BEQZ, encoding '0b1100000000000001' */
{16, 0b1100000000000001, 0b1110000000000011, &this_class::__c__beqz},
/* instruction C__BNEZ, encoding '0b1110000000000001' */
{16, 0b1110000000000001, 0b1110000000000011, &this_class::__c__bnez},
/* instruction C__SLLI, encoding '0b0000000000000010' */
{16, 0b0000000000000010, 0b1111000000000011, &this_class::__c__slli},
/* instruction C__LWSP, encoding '0b0100000000000010' */
{16, 0b0100000000000010, 0b1110000000000011, &this_class::__c__lwsp},
/* instruction C__MV, encoding '0b1000000000000010' */
{16, 0b1000000000000010, 0b1111000000000011, &this_class::__c__mv},
/* instruction C__JR, encoding '0b1000000000000010' */
{16, 0b1000000000000010, 0b1111000001111111, &this_class::__c__jr},
/* instruction __reserved_cmv, encoding '0b1000000000000010' */
{16, 0b1000000000000010, 0b1111111111111111, &this_class::____reserved_cmv},
/* instruction CADD, encoding '0b1001000000000010' */
{16, 0b1001000000000010, 0b1111000000000011, &this_class::__cadd},
/* instruction CJALR, encoding '0b1001000000000010' */
{16, 0b1001000000000010, 0b1111000001111111, &this_class::__cjalr},
/* instruction CEBREAK, encoding '0b1001000000000010' */
{16, 0b1001000000000010, 0b1111111111111111, &this_class::__cebreak},
/* instruction CSWSP, encoding '0b1100000000000010' */
{16, 0b1100000000000010, 0b1110000000000011, &this_class::__cswsp},
/* instruction C__ADD, encoding '0b1001000000000010' */
{16, 0b1001000000000010, 0b1111000000000011, &this_class::__c__add},
/* instruction C__JALR, encoding '0b1001000000000010' */
{16, 0b1001000000000010, 0b1111000001111111, &this_class::__c__jalr},
/* instruction C__EBREAK, encoding '0b1001000000000010' */
{16, 0b1001000000000010, 0b1111111111111111, &this_class::__c__ebreak},
/* instruction C__SWSP, encoding '0b1100000000000010' */
{16, 0b1100000000000010, 0b1110000000000011, &this_class::__c__swsp},
/* instruction DII, encoding '0b0000000000000000' */
{16, 0b0000000000000000, 0b1111111111111111, &this_class::__dii},
}};
@ -3194,9 +3194,9 @@ private:
return returnValue;
}
/* instruction 57: CADDI4SPN */
std::tuple<continuation_e, BasicBlock*> __caddi4spn(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CADDI4SPN_0x{:X}",pc.val));
/* instruction 57: C__ADDI4SPN */
std::tuple<continuation_e, BasicBlock*> __c__addi4spn(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__ADDI4SPN_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,57);
uint64_t PC = pc.val;
uint8_t rd = ((bit_sub<2,3>(instr)));
@ -3204,7 +3204,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {imm:#05x}", fmt::arg("mnemonic", "caddi4spn"),
"{mnemonic:10} {rd}, {imm:#05x}", fmt::arg("mnemonic", "c__addi4spn"),
fmt::arg("rd", name(8+rd)), fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3238,9 +3238,9 @@ private:
return returnValue;
}
/* instruction 58: CLW */
std::tuple<continuation_e, BasicBlock*> __clw(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CLW_0x{:X}",pc.val));
/* instruction 58: C__LW */
std::tuple<continuation_e, BasicBlock*> __c__lw(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__LW_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,58);
uint64_t PC = pc.val;
uint8_t rd = ((bit_sub<2,3>(instr)));
@ -3249,7 +3249,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {uimm:#05x}({rs1})", fmt::arg("mnemonic", "clw"),
"{mnemonic:10} {rd}, {uimm:#05x}({rs1})", fmt::arg("mnemonic", "c__lw"),
fmt::arg("rd", name(8+rd)), fmt::arg("uimm", uimm), fmt::arg("rs1", name(8+rs1)));
std::vector<Value*> args {
this->core_ptr,
@ -3283,9 +3283,9 @@ private:
return returnValue;
}
/* instruction 59: CSW */
std::tuple<continuation_e, BasicBlock*> __csw(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CSW_0x{:X}",pc.val));
/* instruction 59: C__SW */
std::tuple<continuation_e, BasicBlock*> __c__sw(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__SW_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,59);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,3>(instr)));
@ -3294,7 +3294,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs2}, {uimm:#05x}({rs1})", fmt::arg("mnemonic", "csw"),
"{mnemonic:10} {rs2}, {uimm:#05x}({rs1})", fmt::arg("mnemonic", "c__sw"),
fmt::arg("rs2", name(8+rs2)), fmt::arg("uimm", uimm), fmt::arg("rs1", name(8+rs1)));
std::vector<Value*> args {
this->core_ptr,
@ -3326,9 +3326,9 @@ private:
return returnValue;
}
/* instruction 60: CADDI */
std::tuple<continuation_e, BasicBlock*> __caddi(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CADDI_0x{:X}",pc.val));
/* instruction 60: C__ADDI */
std::tuple<continuation_e, BasicBlock*> __c__addi(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__ADDI_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,60);
uint64_t PC = pc.val;
uint8_t imm = ((bit_sub<2,5>(instr)) | (bit_sub<12,1>(instr) << 5));
@ -3336,7 +3336,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "caddi"),
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "c__addi"),
fmt::arg("rs1", name(rs1)), fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3372,9 +3372,9 @@ private:
return returnValue;
}
/* instruction 61: CNOP */
std::tuple<continuation_e, BasicBlock*> __cnop(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CNOP_0x{:X}",pc.val));
/* instruction 61: C__NOP */
std::tuple<continuation_e, BasicBlock*> __c__nop(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__NOP_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,61);
uint64_t PC = pc.val;
uint8_t nzimm = ((bit_sub<2,5>(instr)) | (bit_sub<12,1>(instr) << 5));
@ -3394,16 +3394,16 @@ private:
return returnValue;
}
/* instruction 62: CJAL */
std::tuple<continuation_e, BasicBlock*> __cjal(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CJAL_0x{:X}",pc.val));
/* instruction 62: C__JAL */
std::tuple<continuation_e, BasicBlock*> __c__jal(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__JAL_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,62);
uint64_t PC = pc.val;
uint16_t imm = ((bit_sub<2,1>(instr) << 5) | (bit_sub<3,3>(instr) << 1) | (bit_sub<6,1>(instr) << 7) | (bit_sub<7,1>(instr) << 6) | (bit_sub<8,1>(instr) << 10) | (bit_sub<9,2>(instr) << 8) | (bit_sub<11,1>(instr) << 4) | (bit_sub<12,1>(instr) << 11));
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {imm:#05x}", fmt::arg("mnemonic", "cjal"),
"{mnemonic:10} {imm:#05x}", fmt::arg("mnemonic", "c__jal"),
fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3430,9 +3430,9 @@ private:
return returnValue;
}
/* instruction 63: CLI */
std::tuple<continuation_e, BasicBlock*> __cli(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CLI_0x{:X}",pc.val));
/* instruction 63: C__LI */
std::tuple<continuation_e, BasicBlock*> __c__li(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__LI_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,63);
uint64_t PC = pc.val;
uint8_t imm = ((bit_sub<2,5>(instr)) | (bit_sub<12,1>(instr) << 5));
@ -3440,7 +3440,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {imm:#05x}", fmt::arg("mnemonic", "cli"),
"{mnemonic:10} {rd}, {imm:#05x}", fmt::arg("mnemonic", "c__li"),
fmt::arg("rd", name(rd)), fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3471,9 +3471,9 @@ private:
return returnValue;
}
/* instruction 64: CLUI */
std::tuple<continuation_e, BasicBlock*> __clui(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CLUI_0x{:X}",pc.val));
/* instruction 64: C__LUI */
std::tuple<continuation_e, BasicBlock*> __c__lui(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__LUI_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,64);
uint64_t PC = pc.val;
uint32_t imm = ((bit_sub<2,5>(instr) << 12) | (bit_sub<12,1>(instr) << 17));
@ -3481,7 +3481,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {imm:#05x}", fmt::arg("mnemonic", "clui"),
"{mnemonic:10} {rd}, {imm:#05x}", fmt::arg("mnemonic", "c__lui"),
fmt::arg("rd", name(rd)), fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3510,16 +3510,16 @@ private:
return returnValue;
}
/* instruction 65: CADDI16SP */
std::tuple<continuation_e, BasicBlock*> __caddi16sp(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CADDI16SP_0x{:X}",pc.val));
/* instruction 65: C__ADDI16SP */
std::tuple<continuation_e, BasicBlock*> __c__addi16sp(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__ADDI16SP_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,65);
uint64_t PC = pc.val;
uint16_t nzimm = ((bit_sub<2,1>(instr) << 5) | (bit_sub<3,2>(instr) << 7) | (bit_sub<5,1>(instr) << 6) | (bit_sub<6,1>(instr) << 4) | (bit_sub<12,1>(instr) << 9));
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {nzimm:#05x}", fmt::arg("mnemonic", "caddi16sp"),
"{mnemonic:10} {nzimm:#05x}", fmt::arg("mnemonic", "c__addi16sp"),
fmt::arg("nzimm", nzimm));
std::vector<Value*> args {
this->core_ptr,
@ -3576,9 +3576,9 @@ private:
return returnValue;
}
/* instruction 67: CSRLI */
std::tuple<continuation_e, BasicBlock*> __csrli(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CSRLI_0x{:X}",pc.val));
/* instruction 67: C__SRLI */
std::tuple<continuation_e, BasicBlock*> __c__srli(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__SRLI_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,67);
uint64_t PC = pc.val;
uint8_t shamt = ((bit_sub<2,5>(instr)));
@ -3586,7 +3586,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}, {shamt}", fmt::arg("mnemonic", "csrli"),
"{mnemonic:10} {rs1}, {shamt}", fmt::arg("mnemonic", "c__srli"),
fmt::arg("rs1", name(8+rs1)), fmt::arg("shamt", shamt));
std::vector<Value*> args {
this->core_ptr,
@ -3613,9 +3613,9 @@ private:
return returnValue;
}
/* instruction 68: CSRAI */
std::tuple<continuation_e, BasicBlock*> __csrai(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CSRAI_0x{:X}",pc.val));
/* instruction 68: C__SRAI */
std::tuple<continuation_e, BasicBlock*> __c__srai(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__SRAI_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,68);
uint64_t PC = pc.val;
uint8_t shamt = ((bit_sub<2,5>(instr)));
@ -3623,7 +3623,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}, {shamt}", fmt::arg("mnemonic", "csrai"),
"{mnemonic:10} {rs1}, {shamt}", fmt::arg("mnemonic", "c__srai"),
fmt::arg("rs1", name(8+rs1)), fmt::arg("shamt", shamt));
std::vector<Value*> args {
this->core_ptr,
@ -3668,9 +3668,9 @@ private:
return returnValue;
}
/* instruction 69: CANDI */
std::tuple<continuation_e, BasicBlock*> __candi(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CANDI_0x{:X}",pc.val));
/* instruction 69: C__ANDI */
std::tuple<continuation_e, BasicBlock*> __c__andi(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__ANDI_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,69);
uint64_t PC = pc.val;
uint8_t imm = ((bit_sub<2,5>(instr)) | (bit_sub<12,1>(instr) << 5));
@ -3678,7 +3678,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "candi"),
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "c__andi"),
fmt::arg("rs1", name(8+rs1)), fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3707,9 +3707,9 @@ private:
return returnValue;
}
/* instruction 70: CSUB */
std::tuple<continuation_e, BasicBlock*> __csub(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CSUB_0x{:X}",pc.val));
/* instruction 70: C__SUB */
std::tuple<continuation_e, BasicBlock*> __c__sub(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__SUB_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,70);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,3>(instr)));
@ -3717,7 +3717,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "csub"),
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "c__sub"),
fmt::arg("rd", name(8+rd)), fmt::arg("rs2", name(8+rs2)));
std::vector<Value*> args {
this->core_ptr,
@ -3746,9 +3746,9 @@ private:
return returnValue;
}
/* instruction 71: CXOR */
std::tuple<continuation_e, BasicBlock*> __cxor(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CXOR_0x{:X}",pc.val));
/* instruction 71: C__XOR */
std::tuple<continuation_e, BasicBlock*> __c__xor(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__XOR_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,71);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,3>(instr)));
@ -3756,7 +3756,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "cxor"),
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "c__xor"),
fmt::arg("rd", name(8+rd)), fmt::arg("rs2", name(8+rs2)));
std::vector<Value*> args {
this->core_ptr,
@ -3783,9 +3783,9 @@ private:
return returnValue;
}
/* instruction 72: COR */
std::tuple<continuation_e, BasicBlock*> __cor(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("COR_0x{:X}",pc.val));
/* instruction 72: C__OR */
std::tuple<continuation_e, BasicBlock*> __c__or(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__OR_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,72);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,3>(instr)));
@ -3793,7 +3793,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "cor"),
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "c__or"),
fmt::arg("rd", name(8+rd)), fmt::arg("rs2", name(8+rs2)));
std::vector<Value*> args {
this->core_ptr,
@ -3820,9 +3820,9 @@ private:
return returnValue;
}
/* instruction 73: CAND */
std::tuple<continuation_e, BasicBlock*> __cand(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CAND_0x{:X}",pc.val));
/* instruction 73: C__AND */
std::tuple<continuation_e, BasicBlock*> __c__and(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__AND_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,73);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,3>(instr)));
@ -3830,7 +3830,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "cand"),
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "c__and"),
fmt::arg("rd", name(8+rd)), fmt::arg("rs2", name(8+rs2)));
std::vector<Value*> args {
this->core_ptr,
@ -3857,16 +3857,16 @@ private:
return returnValue;
}
/* instruction 74: CJ */
std::tuple<continuation_e, BasicBlock*> __cj(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CJ_0x{:X}",pc.val));
/* instruction 74: C__J */
std::tuple<continuation_e, BasicBlock*> __c__j(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__J_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,74);
uint64_t PC = pc.val;
uint16_t imm = ((bit_sub<2,1>(instr) << 5) | (bit_sub<3,3>(instr) << 1) | (bit_sub<6,1>(instr) << 7) | (bit_sub<7,1>(instr) << 6) | (bit_sub<8,1>(instr) << 10) | (bit_sub<9,2>(instr) << 8) | (bit_sub<11,1>(instr) << 4) | (bit_sub<12,1>(instr) << 11));
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {imm:#05x}", fmt::arg("mnemonic", "cj"),
"{mnemonic:10} {imm:#05x}", fmt::arg("mnemonic", "c__j"),
fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3890,9 +3890,9 @@ private:
return returnValue;
}
/* instruction 75: CBEQZ */
std::tuple<continuation_e, BasicBlock*> __cbeqz(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CBEQZ_0x{:X}",pc.val));
/* instruction 75: C__BEQZ */
std::tuple<continuation_e, BasicBlock*> __c__beqz(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__BEQZ_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,75);
uint64_t PC = pc.val;
uint16_t imm = ((bit_sub<2,1>(instr) << 5) | (bit_sub<3,2>(instr) << 1) | (bit_sub<5,2>(instr) << 6) | (bit_sub<10,2>(instr) << 3) | (bit_sub<12,1>(instr) << 8));
@ -3900,7 +3900,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "cbeqz"),
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "c__beqz"),
fmt::arg("rs1", name(8+rs1)), fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3935,9 +3935,9 @@ private:
return returnValue;
}
/* instruction 76: CBNEZ */
std::tuple<continuation_e, BasicBlock*> __cbnez(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CBNEZ_0x{:X}",pc.val));
/* instruction 76: C__BNEZ */
std::tuple<continuation_e, BasicBlock*> __c__bnez(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__BNEZ_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,76);
uint64_t PC = pc.val;
uint16_t imm = ((bit_sub<2,1>(instr) << 5) | (bit_sub<3,2>(instr) << 1) | (bit_sub<5,2>(instr) << 6) | (bit_sub<10,2>(instr) << 3) | (bit_sub<12,1>(instr) << 8));
@ -3945,7 +3945,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "cbnez"),
"{mnemonic:10} {rs1}, {imm:#05x}", fmt::arg("mnemonic", "c__bnez"),
fmt::arg("rs1", name(8+rs1)), fmt::arg("imm", imm));
std::vector<Value*> args {
this->core_ptr,
@ -3980,9 +3980,9 @@ private:
return returnValue;
}
/* instruction 77: CSLLI */
std::tuple<continuation_e, BasicBlock*> __cslli(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CSLLI_0x{:X}",pc.val));
/* instruction 77: C__SLLI */
std::tuple<continuation_e, BasicBlock*> __c__slli(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__SLLI_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,77);
uint64_t PC = pc.val;
uint8_t nzuimm = ((bit_sub<2,5>(instr)));
@ -3990,7 +3990,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}, {nzuimm}", fmt::arg("mnemonic", "cslli"),
"{mnemonic:10} {rs1}, {nzuimm}", fmt::arg("mnemonic", "c__slli"),
fmt::arg("rs1", name(rs1)), fmt::arg("nzuimm", nzuimm));
std::vector<Value*> args {
this->core_ptr,
@ -4024,9 +4024,9 @@ private:
return returnValue;
}
/* instruction 78: CLWSP */
std::tuple<continuation_e, BasicBlock*> __clwsp(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CLWSP_0x{:X}",pc.val));
/* instruction 78: C__LWSP */
std::tuple<continuation_e, BasicBlock*> __c__lwsp(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__LWSP_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,78);
uint64_t PC = pc.val;
uint8_t uimm = ((bit_sub<2,2>(instr) << 6) | (bit_sub<4,3>(instr) << 2) | (bit_sub<12,1>(instr) << 5));
@ -4034,7 +4034,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, sp, {uimm:#05x}", fmt::arg("mnemonic", "clwsp"),
"{mnemonic:10} {rd}, sp, {uimm:#05x}", fmt::arg("mnemonic", "c__lwsp"),
fmt::arg("rd", name(rd)), fmt::arg("uimm", uimm));
std::vector<Value*> args {
this->core_ptr,
@ -4073,9 +4073,9 @@ private:
return returnValue;
}
/* instruction 79: CMV */
std::tuple<continuation_e, BasicBlock*> __cmv(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CMV_0x{:X}",pc.val));
/* instruction 79: C__MV */
std::tuple<continuation_e, BasicBlock*> __c__mv(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__MV_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,79);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,5>(instr)));
@ -4083,7 +4083,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "cmv"),
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "c__mv"),
fmt::arg("rd", name(rd)), fmt::arg("rs2", name(rs2)));
std::vector<Value*> args {
this->core_ptr,
@ -4114,16 +4114,16 @@ private:
return returnValue;
}
/* instruction 80: CJR */
std::tuple<continuation_e, BasicBlock*> __cjr(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CJR_0x{:X}",pc.val));
/* instruction 80: C__JR */
std::tuple<continuation_e, BasicBlock*> __c__jr(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__JR_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,80);
uint64_t PC = pc.val;
uint8_t rs1 = ((bit_sub<7,5>(instr)));
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}", fmt::arg("mnemonic", "cjr"),
"{mnemonic:10} {rs1}", fmt::arg("mnemonic", "c__jr"),
fmt::arg("rs1", name(rs1)));
std::vector<Value*> args {
this->core_ptr,
@ -4177,9 +4177,9 @@ private:
return returnValue;
}
/* instruction 82: CADD */
std::tuple<continuation_e, BasicBlock*> __cadd(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CADD_0x{:X}",pc.val));
/* instruction 82: C__ADD */
std::tuple<continuation_e, BasicBlock*> __c__add(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__ADD_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,82);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,5>(instr)));
@ -4187,7 +4187,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "cadd"),
"{mnemonic:10} {rd}, {rs2}", fmt::arg("mnemonic", "c__add"),
fmt::arg("rd", name(rd)), fmt::arg("rs2", name(rs2)));
std::vector<Value*> args {
this->core_ptr,
@ -4223,16 +4223,16 @@ private:
return returnValue;
}
/* instruction 83: CJALR */
std::tuple<continuation_e, BasicBlock*> __cjalr(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CJALR_0x{:X}",pc.val));
/* instruction 83: C__JALR */
std::tuple<continuation_e, BasicBlock*> __c__jalr(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__JALR_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,83);
uint64_t PC = pc.val;
uint8_t rs1 = ((bit_sub<7,5>(instr)));
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs1}", fmt::arg("mnemonic", "cjalr"),
"{mnemonic:10} {rs1}", fmt::arg("mnemonic", "c__jalr"),
fmt::arg("rs1", name(rs1)));
std::vector<Value*> args {
this->core_ptr,
@ -4269,9 +4269,9 @@ private:
return returnValue;
}
/* instruction 84: CEBREAK */
std::tuple<continuation_e, BasicBlock*> __cebreak(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CEBREAK_0x{:X}",pc.val));
/* instruction 84: C__EBREAK */
std::tuple<continuation_e, BasicBlock*> __c__ebreak(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__EBREAK_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,84);
uint64_t PC = pc.val;
if(this->disass_enabled){
@ -4291,9 +4291,9 @@ private:
return returnValue;
}
/* instruction 85: CSWSP */
std::tuple<continuation_e, BasicBlock*> __cswsp(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("CSWSP_0x{:X}",pc.val));
/* instruction 85: C__SWSP */
std::tuple<continuation_e, BasicBlock*> __c__swsp(virt_addr_t& pc, code_word_t instr, BasicBlock* bb){
bb->setName(fmt::format("C__SWSP_0x{:X}",pc.val));
this->gen_sync(PRE_SYNC,85);
uint64_t PC = pc.val;
uint8_t rs2 = ((bit_sub<2,5>(instr)));
@ -4301,7 +4301,7 @@ private:
if(this->disass_enabled){
/* generate console output when executing the command */
auto mnemonic = fmt::format(
"{mnemonic:10} {rs2}, {uimm:#05x}(sp)", fmt::arg("mnemonic", "cswsp"),
"{mnemonic:10} {rs2}, {uimm:#05x}(sp)", fmt::arg("mnemonic", "c__swsp"),
fmt::arg("rs2", name(rs2)), fmt::arg("uimm", uimm));
std::vector<Value*> args {
this->core_ptr,