uint64_t vlhs = 0;
uint64_t vrhs = 0;
if (rv_int_op_prepare(lhs, rhs, vlhs, vrhs, bitwidth)) {
- return lhs << rv_and(rhs, sv_reg_t(dflt_bitwidth-1U));
+ sv_reg_t result = lhs << rv_and(rhs, sv_reg_t(dflt_bitwidth-1U));
+ fprintf(stderr, "sl result %lx %lx %lx\n",
+ (uint64_t)lhs, (uint64_t)rhs, (uint64_t)(result));
+ return result;
}
uint64_t result = vlhs << (vrhs & (bitwidth-1));
return rv_int_op_finish(lhs, rhs, result, bitwidth);
uint64_t vlhs = 0;
uint64_t vrhs = 0;
if (rv_int_op_prepare(lhs, rhs, vlhs, vrhs, bitwidth)) {
- return lhs >> rv_and(rhs, sv_reg_t(dflt_bitwidth-1U));
+ sv_reg_t result = lhs >> rv_and(rhs, sv_reg_t(dflt_bitwidth-1U));
+ fprintf(stderr, "sr result %lx %lx %lx\n",
+ (uint64_t)lhs, (uint64_t)rhs, (uint64_t)(result));
+ return result;
}
uint64_t result = vlhs >> (vrhs & (bitwidth-1));
- return rv_int_op_finish(lhs, rhs, result, bitwidth);
+ sv_reg_t sresult = rv_int_op_finish(lhs, rhs, result, bitwidth);
+ fprintf(stderr, "sr result %lx %lx %lx bw %d\n",
+ (uint64_t)lhs, (uint64_t)rhs, (uint64_t)(sresult), bitwidth);
+ return sresult;
}
bool sv_proc_t::rv_lt(sv_reg_t const & lhs, sv_reg_t const & rhs)