{
uint8_t elwidth = _insn->reg_elwidth(reg, true);
uint64_t data = _insn->p->get_state()->XPR[reg];
- return sv_reg_t(data, elwidth);
+ return sv_reg_t(data /*, elwidth*/);
}
#define GET_REG(name) \
return y;
}
*/
+
sv_reg_t sv_proc_t::rv_add(sv_reg_t lhs, sv_reg_t rhs)
{
return lhs + rhs;
class sv_reg_t {
public:
- sv_reg_t(uint64_t _reg) : reg(_reg), elwidth(0) { } // default elwidth
- sv_reg_t(uint64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
+ sv_reg_t(uint64_t _reg) : reg(_reg) /*, elwidth(0)*/ { } // default elwidth
+ //sv_reg_t(uint64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
uint64_t reg;
uint8_t elwidth;
public:
uint64_t get_data() { return reg; }
- uint8_t get_width() { return elwidth; }
+ //uint8_t get_width() { return elwidth; }
- operator uint64_t() { return reg; }
- operator sv_sreg_t();
+ operator uint64_t() const & { return reg; }
+ operator sv_sreg_t() const &;
};
class sv_sreg_t {
public:
- sv_sreg_t(int64_t _reg) : reg(_reg), elwidth(0) {} // default elwidth
- sv_sreg_t(int64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
+ sv_sreg_t(int64_t _reg) : reg(_reg) /*, elwidth(0)*/ {} // default elwidth
+ //sv_sreg_t(int64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
int64_t reg;
uint8_t elwidth;
public:
int64_t get_data() { return reg; }
- uint8_t get_width() { return elwidth; }
+ //uint8_t get_width() { return elwidth; }
- operator int64_t() { return reg; }
- operator sv_reg_t() { return sv_reg_t((uint64_t)reg, elwidth); }
+ operator int64_t() const& { return reg; }
+ //operator sv_reg_t() { return sv_reg_t((uint64_t)reg, elwidth); }
+ operator sv_reg_t() const& { return sv_reg_t((uint64_t)reg); }
};
-inline sv_reg_t::operator sv_sreg_t() { return sv_sreg_t((int64_t)reg, elwidth); }
+//inline sv_reg_t::operator sv_sreg_t() { return sv_sreg_t((int64_t)reg, elwidth); }
+inline sv_reg_t::operator sv_sreg_t() const &
+{ return sv_sreg_t((int64_t)reg); }
#endif