diff --git a/src/vm/vector_functions.hpp b/src/vm/vector_functions.hpp index c82462d..d00624c 100644 --- a/src/vm/vector_functions.hpp +++ b/src/vm/vector_functions.hpp @@ -270,9 +270,20 @@ std::function get_funct(unsigned funct6, return static_cast>(static_cast>(vs2) - static_cast>(vs1)); }; - // case 0b111000: // VWMULU - // case 0b111010: // VWMULSU - // case 0b111011: // VWMUL + case 0b111000: // VWMULU + return [](src2_elem_t vs2, src1_elem_t vs1) { + return (static_cast>(vs2) * static_cast>(vs1)); + }; + case 0b111010: // VWMULSU + return [](src2_elem_t vs2, src1_elem_t vs1) { + return (static_cast>>(static_cast>(vs2)) * + static_cast>(vs1)); + }; + case 0b111011: // VWMUL + return [](src2_elem_t vs2, src1_elem_t vs1) { + return (static_cast>>(static_cast>(vs2)) * + static_cast>>(static_cast>(vs1))); + }; // case 0b111100: // VWMACCU // case 0b111101: // VWMACC // case 0b111110: // VWMACCUS