mulh

Multiply the signed values in xs1 to xs2, and store the upper half of the result in xd. The lower half is thrown away. If both the upper and lower halves are needed, it suggested to use the sequence: --- mulh xdh, xs1, xs2 mul xdl, xs1, xs2 --- Microarchitectures may look for that sequence and fuse the operations.

Synopsis

mulh xd, xs1, xs2

Encoding

Type: R

0671112141519202425310110011xd001xs1xs20000001
funct7: 0000001
funct3: 001
opcode: 0110011

RISC-V Instruction Encoder/Decoder

open mulh in rvcodecjs

Availability