Pseudo-code:
```
-if ((RA) <u (RB)) & ((RB) != [0]*XLEN) then # Check RA<RB, for divide-by-0
- dividend[0:(XLEN*2)-1] <- (RA) || (RC) # Combine RA/RC, zero extend
- divisor[0:(XLEN*2)-1] <- [0]*XLEN || (RB) # Extend to 128-bit
- result <- dividend / divisor # Division
- modulo <- dividend % divisor # Modulo
- RT <- result[XLEN:(XLEN*2)-1] # Store result in RT
- RS <- modulo[XLEN:(XLEN*2)-1] # Modulo in RC, implicit
-else # In case of error
- RT <- [1]*XLEN # RT all 1's
- RS <- [0]*XLEN # RS all 0's
+if ((RA) <u (RB)) & ((RB) != [0]*64) then # Check RA<RB, for divide-by-0
+ dividend[0:127] <- (RA) || (RC) # Combine RA/RC, zero extend
+ divisor[0:127] <- [0]*64 || (RB) # Extend to 128-bit
+ result <- dividend / divisor # Division
+ modulo <- dividend % divisor # Modulo
+ RT <- result[64:127] # Store result in RT
+ RS <- modulo[64:127] # Modulo in RC, implicit
+else # In case of error
+ RT <- [1]*64 # RT all 1's
+ RS <- [0]*64 # RS all 0's
```
Special registers altered: