if (bitwidth == xlen) { \
return true; \
} \
+ uint8_t lbitwidth = get_bitwidth(lhs.get_elwidth(), xlen); \
+ uint8_t rbitwidth = get_bitwidth(lhs.get_elwidth(), xlen); \
if (_insn->signextended) { \
- vlhs = sext_bwid(lhs, bitwidth); \
- vrhs = sext_bwid(rhs, bitwidth); \
+ vlhs = sext_bwid(lhs, lbitwidth); \
+ vrhs = sext_bwid(rhs, rbitwidth); \
} else { \
- vlhs = zext_bwid(lhs, bitwidth); \
- vrhs = zext_bwid(rhs, bitwidth); \
+ vlhs = zext_bwid(lhs, lbitwidth); \
+ vrhs = zext_bwid(rhs, rbitwidth); \
} \
return false; \
} \
OP_MULH_FN(_mulh , sv_sreg_t, sv_sreg_t, sv_sreg_t, int64_t, int64_t, int64_t )
/* 64-bit mulh/mulhu/mulhsu */
+sv_reg_t (sv_proc_t::mulhu)(sv_reg_t const& a, sv_reg_t const& b)
+{
+ return sv_reg_t(::mulhu(a, b));
+}
+
sv_sreg_t (sv_proc_t::mulhsu)(sv_sreg_t const& a, sv_reg_t const& b)
{
return sv_sreg_t(::mulhsu(a, b));
return sv_sreg_t(::mulh(a, b));
}
-sv_reg_t (sv_proc_t::mulhu)(sv_reg_t const& a, sv_reg_t const& b)
-{
- return sv_reg_t(::mulhu(a, b));
-}
-
sv_reg_t sv_proc_t::rv_sl(sv_reg_t const & lhs, sv_reg_t const & rhs)
{
return rv_sl(lhs, rhs, xlen);