//
//void (sv_proc_t::WRITE_RD)(sv_reg_t value)
//{
-// WRITE_REG( _insn->rd(), value/*.get_data()*/ );
+// WRITE_REG( _insn->rd(), value );
//}
//void (sv_proc_t::WRITE_RVC_RS1S)(sv_sreg_t value)
//{
-// WRITE_REG(_insn->rvc_rs1s(), value/*.get_data()*/ );
+// WRITE_REG(_insn->rvc_rs1s(), value );
//}
void (sv_proc_t::WRITE_RVC_RS1S)(sv_reg_t value)
{
- WRITE_REG(_insn->rvc_rs1s(), value/*.get_data()*/ );
+ WRITE_REG(_insn->rvc_rs1s(), value );
}
void (sv_proc_t::WRITE_RVC_RS2S)(sv_reg_t value)
{
- WRITE_REG(_insn->rvc_rs2s(), value/*.get_data()*/ );
+ WRITE_REG(_insn->rvc_rs2s(), value );
}
//void (sv_proc_t::WRITE_RVC_RS2S)(sv_sreg_t value)
//{
-// WRITE_REG(_insn->rvc_rs2s(), value/*.get_data()*/ );
+// WRITE_REG(_insn->rvc_rs2s(), value );
//}
void (sv_proc_t::WRITE_RD)(sv_reg_t value)
{
- WRITE_REG( _insn->rd(), value/*.get_data()*/ ); // XXX TODO: replace properly
+ WRITE_REG( _insn->rd(), value ); // XXX TODO: replace properly
}
//void (sv_proc_t::WRITE_RD)(sv_sreg_t value)
//{
-// WRITE_REG( _insn->rd(), value/*.get_data()*/ ); // XXX TODO: replace properly
+// WRITE_REG( _insn->rd(), value ); // XXX TODO: replace properly
//}
//void (sv_proc_t::WRITE_REG)(reg_t reg, sv_sreg_t value)
//{
-// //WRITE_REG( reg, value/*.get_data()*/ ); // XXX TODO: replace properly
-// STATE.XPR.write(reg, value/*.get_data()*/);
+// //WRITE_REG( reg, value ); // XXX TODO: replace properly
+// STATE.XPR.write(reg, value);
//}
void (sv_proc_t::WRITE_REG)(reg_t reg, sv_reg_t value)
{
- //WRITE_REG( reg, value/*.get_data()*/ ); // XXX TODO: replace properly
- STATE.XPR.write(reg, value/*.get_data()*/);
+ //WRITE_REG( reg, value ); // XXX TODO: replace properly
+ STATE.XPR.write(reg, value);
}
//void (sv_proc_t::WRITE_REG)(reg_t reg, uint64_t value)
sv_reg_t sv_proc_t::get_shamt()
{
- return sv_reg_t(_insn->i_imm()/*.get_data()*/ & 0x3F);
+ return sv_reg_t(_insn->i_imm() & 0x3F);
}
sv_reg_t sv_proc_t::get_rvc_rs2s()
*/
sv_sreg_t (sv_proc_t::sext_xlen)(sv_sreg_t v)
{
- int64_t x = v/*.get_data()*/;
+ int64_t x = v;
x = (((sreg_t)(x) << (64-xlen)) >> (64-xlen));
return sv_sreg_t(x);
}
sv_sreg_t (sv_proc_t::sext_xlen)(sv_reg_t v)
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
x = (((sreg_t)(x) << (64-xlen)) >> (64-xlen));
return sv_sreg_t((sreg_t)x);
}
sv_reg_t (sv_proc_t::zext_xlen)(sv_reg_t v)
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
x = (((reg_t)(x) << (64-xlen)) >> (64-xlen));
return sv_reg_t(x);
}
*/
sv_sreg_t (sv_proc_t::sext32)(sv_reg_t v)
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
x = ((sreg_t)(int32_t)(x));
return sv_sreg_t((int64_t)x);
}
//sv_sreg_t (sv_proc_t::sext32)(sv_sreg_t v)
//{
-// int64_t x = v/*.get_data()*/;
+// int64_t x = v;
// x = ((sreg_t)(int32_t)(x));
// return sv_sreg_t(x);
//}
sv_reg_t (sv_proc_t::zext32)(sv_reg_t v)
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
x = ((reg_t)(uint32_t)(x));
return sv_reg_t(x);
}
*/
sv_reg_t sv_proc_t::rv_add(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ + rhs/*.get_data()*/;
+ return lhs + rhs;
}
sv_reg_t sv_proc_t::rv_sub(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ - rhs/*.get_data()*/;
+ return lhs - rhs;
}
sv_sreg_t sv_proc_t::rv_div(sv_sreg_t lhs, sv_sreg_t rhs)
{
- return lhs/*.get_data()*/ / rhs/*.get_data()*/;
+ return lhs / rhs;
}
sv_reg_t sv_proc_t::rv_div(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ / rhs/*.get_data()*/;
+ return lhs / rhs;
}
sv_sreg_t sv_proc_t::rv_rem(sv_sreg_t lhs, sv_sreg_t rhs)
{
- return lhs/*.get_data()*/ % rhs/*.get_data()*/;
+ return lhs % rhs;
}
sv_reg_t sv_proc_t::rv_rem(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ % rhs/*.get_data()*/;
+ return lhs % rhs;
}
sv_reg_t sv_proc_t::rv_mul(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ * rhs/*.get_data()*/;
+ return lhs * rhs;
}
sv_sreg_t sv_proc_t::rv_mul(sv_sreg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ * rhs/*.get_data()*/;
+ return lhs * rhs;
}
sv_sreg_t sv_proc_t::rv_mul(sv_sreg_t lhs, sv_sreg_t rhs)
{
- return lhs/*.get_data()*/ * rhs/*.get_data()*/;
+ return lhs * rhs;
}
sv_reg_t sv_proc_t::rv_and(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ & rhs/*.get_data()*/;
+ return lhs & rhs;
}
sv_reg_t sv_proc_t::rv_or(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ | rhs/*.get_data()*/;
+ return lhs | rhs;
}
sv_reg_t sv_proc_t::rv_xor(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ ^ rhs/*.get_data()*/;
+ return lhs ^ rhs;
}
sv_reg_t sv_proc_t::rv_sl(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ << rhs/*.get_data()*/;
+ return lhs << rhs;
}
//sv_sreg_t sv_proc_t::rv_sr(sv_sreg_t lhs, sv_reg_t rhs)
//{
-// return lhs/*.get_data()*/ >> rhs/*.get_data()*/;
+// return lhs >> rhs;
//}
sv_reg_t sv_proc_t::rv_sr(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ >> rhs/*.get_data()*/;
+ return lhs >> rhs;
}
bool sv_proc_t::rv_lt(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ < rhs/*.get_data()*/;
+ return lhs < rhs;
}
bool sv_proc_t::rv_lt(sv_sreg_t lhs, sv_sreg_t rhs)
{
- return lhs/*.get_data()*/ < rhs/*.get_data()*/;
+ return lhs < rhs;
}
bool sv_proc_t::rv_gt(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ > rhs/*.get_data()*/;
+ return lhs > rhs;
}
bool sv_proc_t::rv_gt(sv_sreg_t lhs, sv_sreg_t rhs)
{
- return lhs/*.get_data()*/ > rhs/*.get_data()*/;
+ return lhs > rhs;
}
bool sv_proc_t::rv_ge(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ >= rhs/*.get_data()*/;
+ return lhs >= rhs;
}
bool sv_proc_t::rv_ge(sv_sreg_t lhs, sv_sreg_t rhs)
{
- return lhs/*.get_data()*/ >= rhs/*.get_data()*/;
+ return lhs >= rhs;
}
bool sv_proc_t::rv_eq(sv_reg_t lhs, sv_reg_t rhs)
{
- return lhs/*.get_data()*/ == rhs/*.get_data()*/;
+ return lhs == rhs;
}
bool sv_proc_t::rv_ne(sv_reg_t lhs, sv_reg_t rhs)
{
- return (lhs/*.get_data()*/ != rhs/*.get_data()*/);
+ return (lhs != rhs);
}
sv_sreg_t sv_proc_t::sv_reg_to_sreg(sv_reg_t v)
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return sv_sreg_t(sreg_t(x));
}
sv_reg_t sv_proc_t::sv_reg_int32(sv_reg_t v)
{
- int32_t x = (int32_t)v/*.get_data()*/;
+ int32_t x = (int32_t)v;
return sv_reg_t((uint64_t)x);
}
sv_reg_t sv_proc_t::sv_reg_uint32(sv_reg_t v)
{
- uint32_t x = (uint32_t)v/*.get_data()*/;
+ uint32_t x = (uint32_t)v;
return sv_reg_t((uint64_t)x);
}
}
float32_t (sv_proc_t::f32)(sv_reg_t v)
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::f32(x);
}
float64_t (sv_proc_t::f64)(sv_reg_t v)
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::f64(x);
}
float32_t (sv_proc_t::i32_to_f32)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::i32_to_f32(x);
}
float64_t (sv_proc_t::ui32_to_f64)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::ui32_to_f64(x);
}
float64_t (sv_proc_t::i32_to_f64)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::i32_to_f64(x);
}
float32_t (sv_proc_t::ui32_to_f32)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::ui32_to_f32(x);
}
float32_t (sv_proc_t::i64_to_f32)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::i64_to_f32(x);
}
float32_t (sv_proc_t::ui64_to_f32)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::ui64_to_f32(x);
}
float64_t (sv_proc_t::i64_to_f64)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::i64_to_f64(x);
}
float64_t (sv_proc_t::ui64_to_f64)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::ui64_to_f64(x);
}
float128_t (sv_proc_t::ui64_to_f128)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::ui64_to_f128(x);
}
float128_t (sv_proc_t::i64_to_f128)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::i64_to_f128(x);
}
float128_t (sv_proc_t::i32_to_f128)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::i32_to_f128(x);
}
float128_t (sv_proc_t::ui32_to_f128)( sv_reg_t v )
{
- uint64_t x = v/*.get_data()*/;
+ uint64_t x = v;
return ::ui32_to_f128(x);
}
sv_sreg_t (sv_proc_t::mulhsu)(sv_sreg_t a, sv_reg_t b)
{
- return sv_sreg_t(::mulhsu(a/*.get_data()*/, b/*.get_data()*/));
+ return sv_sreg_t(::mulhsu(a, b));
}
sv_sreg_t (sv_proc_t::mulh)(sv_sreg_t a, sv_sreg_t b)
{
- return sv_sreg_t(::mulh(a/*.get_data()*/, b/*.get_data()*/));
+ return sv_sreg_t(::mulh(a, b));
}
sv_reg_t (sv_proc_t::mulhu)(sv_reg_t a, sv_reg_t b)
{
- return sv_reg_t(::mulhu(a/*.get_data()*/, b/*.get_data()*/));
+ return sv_reg_t(::mulhu(a, b));
}