remove deprecated functions
This commit is contained in:
parent
a20f39e847
commit
1616f0ac90
|
@ -58,7 +58,9 @@ ${coreDef.name.toLowerCase()}::${coreDef.name.toLowerCase()}() {
|
|||
${coreDef.name.toLowerCase()}::~${coreDef.name.toLowerCase()}() = default;
|
||||
|
||||
void ${coreDef.name.toLowerCase()}::reset(uint64_t address) {
|
||||
for(size_t i=0; i<traits<${coreDef.name.toLowerCase()}>::NUM_REGS; ++i) set_reg(i, std::vector<uint8_t>(sizeof(traits<${coreDef.name.toLowerCase()}>::reg_t),0));
|
||||
auto base_ptr = reinterpret_cast<traits<${coreDef.name.toLowerCase()}>::reg_t*>(get_regs_base_ptr());
|
||||
for(size_t i=0; i<traits<tgc_c>::NUM_REGS; ++i)
|
||||
*(base_ptr+i)=0;
|
||||
reg.PC=address;
|
||||
reg.NEXT_PC=reg.PC;
|
||||
reg.PRIV=0x3;
|
||||
|
|
|
@ -140,14 +140,6 @@ struct ${coreDef.name.toLowerCase()}: public arch_if {
|
|||
void reset(uint64_t address=0) override;
|
||||
|
||||
uint8_t* get_regs_base_ptr() override;
|
||||
/// deprecated
|
||||
void get_reg(short idx, std::vector<uint8_t>& value) override {}
|
||||
void set_reg(short idx, const std::vector<uint8_t>& value) override {}
|
||||
/// deprecated
|
||||
bool get_flag(int flag) override {return false;}
|
||||
void set_flag(int, bool value) override {};
|
||||
/// deprecated
|
||||
void update_flags(operations op, uint64_t opr1, uint64_t opr2) override {};
|
||||
|
||||
inline uint64_t get_icount() { return reg.icount; }
|
||||
|
||||
|
|
|
@ -139,44 +139,45 @@ template <> struct traits<tgc_c> {
|
|||
CSRRWI = 47,
|
||||
CSRRSI = 48,
|
||||
CSRRCI = 49,
|
||||
MUL = 50,
|
||||
MULH = 51,
|
||||
MULHSU = 52,
|
||||
MULHU = 53,
|
||||
DIV = 54,
|
||||
DIVU = 55,
|
||||
REM = 56,
|
||||
REMU = 57,
|
||||
CADDI4SPN = 58,
|
||||
CLW = 59,
|
||||
CSW = 60,
|
||||
CADDI = 61,
|
||||
CNOP = 62,
|
||||
CJAL = 63,
|
||||
CLI = 64,
|
||||
CLUI = 65,
|
||||
CADDI16SP = 66,
|
||||
__reserved_clui = 67,
|
||||
CSRLI = 68,
|
||||
CSRAI = 69,
|
||||
CANDI = 70,
|
||||
CSUB = 71,
|
||||
CXOR = 72,
|
||||
COR = 73,
|
||||
CAND = 74,
|
||||
CJ = 75,
|
||||
CBEQZ = 76,
|
||||
CBNEZ = 77,
|
||||
CSLLI = 78,
|
||||
CLWSP = 79,
|
||||
CMV = 80,
|
||||
CJR = 81,
|
||||
__reserved_cmv = 82,
|
||||
CADD = 83,
|
||||
CJALR = 84,
|
||||
CEBREAK = 85,
|
||||
CSWSP = 86,
|
||||
DII = 87,
|
||||
FENCE_I = 50,
|
||||
MUL = 51,
|
||||
MULH = 52,
|
||||
MULHSU = 53,
|
||||
MULHU = 54,
|
||||
DIV = 55,
|
||||
DIVU = 56,
|
||||
REM = 57,
|
||||
REMU = 58,
|
||||
CADDI4SPN = 59,
|
||||
CLW = 60,
|
||||
CSW = 61,
|
||||
CADDI = 62,
|
||||
CNOP = 63,
|
||||
CJAL = 64,
|
||||
CLI = 65,
|
||||
CLUI = 66,
|
||||
CADDI16SP = 67,
|
||||
__reserved_clui = 68,
|
||||
CSRLI = 69,
|
||||
CSRAI = 70,
|
||||
CANDI = 71,
|
||||
CSUB = 72,
|
||||
CXOR = 73,
|
||||
COR = 74,
|
||||
CAND = 75,
|
||||
CJ = 76,
|
||||
CBEQZ = 77,
|
||||
CBNEZ = 78,
|
||||
CSLLI = 79,
|
||||
CLWSP = 80,
|
||||
CMV = 81,
|
||||
CJR = 82,
|
||||
__reserved_cmv = 83,
|
||||
CADD = 84,
|
||||
CJALR = 85,
|
||||
CEBREAK = 86,
|
||||
CSWSP = 87,
|
||||
DII = 88,
|
||||
MAX_OPCODE
|
||||
};
|
||||
};
|
||||
|
@ -194,14 +195,6 @@ struct tgc_c: public arch_if {
|
|||
void reset(uint64_t address=0) override;
|
||||
|
||||
uint8_t* get_regs_base_ptr() override;
|
||||
/// deprecated
|
||||
void get_reg(short idx, std::vector<uint8_t>& value) override {}
|
||||
void set_reg(short idx, const std::vector<uint8_t>& value) override {}
|
||||
/// deprecated
|
||||
bool get_flag(int flag) override {return false;}
|
||||
void set_flag(int, bool value) override {};
|
||||
/// deprecated
|
||||
void update_flags(operations op, uint64_t opr1, uint64_t opr2) override {};
|
||||
|
||||
inline uint64_t get_icount() { return reg.icount; }
|
||||
|
||||
|
|
|
@ -51,7 +51,9 @@ tgc_c::tgc_c() {
|
|||
tgc_c::~tgc_c() = default;
|
||||
|
||||
void tgc_c::reset(uint64_t address) {
|
||||
for(size_t i=0; i<traits<tgc_c>::NUM_REGS; ++i) set_reg(i, std::vector<uint8_t>(sizeof(traits<tgc_c>::reg_t),0));
|
||||
auto base_ptr = reinterpret_cast<traits<tgc_c>::reg_t*>(get_regs_base_ptr());
|
||||
for(size_t i=0; i<traits<tgc_c>::NUM_REGS; ++i)
|
||||
*(base_ptr+i)=0;
|
||||
reg.PC=address;
|
||||
reg.NEXT_PC=reg.PC;
|
||||
reg.PRIV=0x3;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue