rd, rs1, rs2rd = (rs1 * rs2) >> 32mulh answers a question the ordinary multiply leaves open: where do the extra digits go? When you multiply two 32-bit numbers, the true result can be up to 64 bits long — too big for a single 32-bit register, which is the only size RISC-V registers come in. The regular mul instruction keeps the lower 32 bits and quietly discards the rest. mulh (multiply high) keeps the *upper* 32 bits instead.
Used together on the same pair of inputs, the two instructions recover the whole answer: run mulh to capture the top half into one register, then mul to capture the bottom half into another, and between them you hold the full 64-bit product.
Why bother with the top half? The most common reason is checking for overflow — finding out whether a result was too big to fit in 32 bits. If the high half holds anything meaningful, the product spilled past what a single register can store. Specialized math (very large numbers, high-precision fractions, cryptography) needs both halves routinely.
The h here means high, and this version treats the numbers as signed (able to be negative). The full RISC-V specification defines unsigned variants too, but this simulator provides the signed mulh, the one you meet first. Like all multiply and divide instructions, it has no constant form — both inputs come from registers.