mul

MUL performs an XLEN-bitxXLEN-bit multiplication of `xs1` by `xs2` and places the lower XLEN bits in the destination register. Any overflow is thrown away. [NOTE] If both the high and low bits of the same product are required, then the recommended code sequence is: MULH[[S]U] xdh, xs1, xs2; MUL xdl, xs1, xs2 (source register specifiers must be in same order and xdh cannot be the same as xs1 or xs2). Microarchitectures can then fuse these into a single multiply operation instead of performing two separate multiplies.

Synopsis

mul xd, xs1, xs2

Encoding

Type: R

0671112141519202425310110011xd000xs1xs20000001
funct7: 0000001
funct3: 000
opcode: 0110011

RISC-V Instruction Encoder/Decoder

open mul in rvcodecjs

Availability