DIVU

Divide Unsigned

DIVU rd, rs1, rs2

Performs unsigned integer division.

Details

DIVU divides rs1 by rs2 using unsigned division and writes the quotient to rd, truncated toward zero. Division by zero yields 2^XLEN − 1.

Pseudocode Operation

R[rd] = R[rs1] /u R[rs2];

Example

DIVU x5, x6, x7

Encoding

Binary Layout
0000001
31:25
rs2
24:20
rs1
19:15
101
14:12
rd
11:7
0110011
6:0
 
Format R-Type
Opcode 0x33
Extension M

Operands

  • rd
    Destination register (integer)
  • rs1
    Dividend
  • rs2
    Divisor