Webcentive RISC-V Reference

c.mul

Multiply, 16-bit encoding

Extension
Zcb
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
c.mul xd, xs2
Length
16-bit (compressed)

Encoding

1513121097654210
100111rs1′/rs2′10rs2′01

Match 0x9c41, mask 0xfc63. Source: c.mul rd_rs1_p rs2_p 1..0=1 15..13=4 12..10=7 6..5=2 in riscv-opcodes/extensions/rv_zcb.

FieldBitsriscv-opcodes name
rs1′/rs2′9:7rd_rs1_p
rs2′4:2rs2_p

Description

Multiplies XLEN bits of the source operands from rsd' and xs2' and writes the lowest XLEN bits of the result to rsd'.

Description from riscv-unified-db, reformatted.

Operation

if (implemented?(ExtensionName::C) && MISA_CSR_IMPLEMENTED && (CSR[misa].C == 1'b0)) {
  reserved_instruction($encoding);
}

X[creg2reg(xd)] = X[creg2reg(xd)] * X[creg2reg(xs2)];

Pseudocode in riscv-unified-db’s IDL, quoted unchanged.

Specification and related pages