mulw

Multiplies the lower 32 bits of the source registers, placing the sign-extension of the lower 32 bits of the result into the destination register. Any overflow is thrown away. [NOTE] In RV64, MUL can be used to obtain the upper 32 bits of the 64-bit product, but signed arguments must be proper 32-bit signed values, whereas unsigned arguments must have their upper 32 bits clear. If the arguments are not known to be sign- or zero-extended, an alternative is to shift both arguments left by 32 bits, then use MULH[[S]U].

Synopsis

mulw xd, xs1, xs2

Encoding

Type: R

0671112141519202425310111011xd000xs1xs20000001
funct7: 0000001
funct3: 000
opcode: 0111011

RISC-V Instruction Encoder/Decoder

open mulw in rvcodecjs

Availability