adds Vector Widening Integer Multiply-Add Instructions
This commit is contained in:
parent
ac1322d66b
commit
6852d1d299
@ -288,11 +288,20 @@ std::function<dest_elem_t(dest_elem_t, src2_elem_t, src1_elem_t)> get_funct(unsi
|
|||||||
return (static_cast<twice_t<std::make_signed_t<src2_elem_t>>>(static_cast<std::make_signed_t<src2_elem_t>>(vs2)) *
|
return (static_cast<twice_t<std::make_signed_t<src2_elem_t>>>(static_cast<std::make_signed_t<src2_elem_t>>(vs2)) *
|
||||||
static_cast<twice_t<std::make_signed_t<src2_elem_t>>>(static_cast<std::make_signed_t<src1_elem_t>>(vs1)));
|
static_cast<twice_t<std::make_signed_t<src2_elem_t>>>(static_cast<std::make_signed_t<src1_elem_t>>(vs1)));
|
||||||
};
|
};
|
||||||
// case 0b111100: // VWMACCU
|
case 0b111100: // VWMACCU
|
||||||
// case 0b111101: // VWMACC
|
return [](dest_elem_t vd, src2_elem_t vs2, src1_elem_t vs1) { return vs1 * vs2 + vd; };
|
||||||
// case 0b111110: // VWMACCUS
|
case 0b111101: // VWMACC
|
||||||
// case 0b111111: // VWMACCSU
|
return [](dest_elem_t vd, src2_elem_t vs2, src1_elem_t vs1) {
|
||||||
|
return static_cast<std::make_signed_t<src1_elem_t>>(vs1) * static_cast<std::make_signed_t<src2_elem_t>>(vs2) + vd;
|
||||||
|
};
|
||||||
|
case 0b111110: // VWMACCUS
|
||||||
|
return [](dest_elem_t vd, src2_elem_t vs2, src1_elem_t vs1) {
|
||||||
|
return vs1 * static_cast<std::make_signed_t<src2_elem_t>>(vs2) + vd;
|
||||||
|
};
|
||||||
|
case 0b111111: // VWMACCSU
|
||||||
|
return [](dest_elem_t vd, src2_elem_t vs2, src1_elem_t vs1) {
|
||||||
|
return static_cast<std::make_signed_t<src1_elem_t>>(vs1) * vs2 + vd;
|
||||||
|
};
|
||||||
default:
|
default:
|
||||||
throw new std::runtime_error("Uknown funct6 in get_funct");
|
throw new std::runtime_error("Uknown funct6 in get_funct");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user