CLMUL

Carry-less Multiply

CLMUL rd, rs1, rs2

Performs carry-less multiplication of the lower bits of rs1 and rs2. Used for CRC and GCM (crypto).

Encoding

Binary Layout
0000101
31:25
rs2
24:20
rs1
19:15
001
14:12
rd
11:7
0110011
6:0
 
Format R-Type
Opcode 0x0A001033
Extension Zbc

Operands

  • rd
    Destination register (integer)
  • rs1
    Source register 1 (integer)
  • rs2
    Source register 2 (integer)

Example

CLMUL x10, x11, x12

// Carry-less multiply (GF(2^n)).

Related

More in Zbc

Description

CLMUL performs carry-less multiplication of rs1 and rs2, writing the lower XLEN bits of the carry-less product to rd. Used in GF(2^n) arithmetic and CRC computation.

Operation

R[rd] = clmul(R[rs1], R[rs2]);