Pseudo-code:
- dividend[0:63] <- (RA)[32:63] || [0]*32
- divisor[0:63] <- [0]*32 || (RB)[32:63]
- if (divisor = [0]*64) then
+ dividend[0:XLEN-1] <- (RA)[XLEN/2:XLEN-1] || [0]*(XLEN/2)
+ divisor[0:XLEN-1] <- [0]*(XLEN/2) || (RB)[XLEN/2:XLEN-1]
+ if (divisor = [0]*XLEN) then
overflow <- 1
else
result <- dividend / divisor
- if RA[32:63] <u RB[32:63] then
- RT[32:63] <- result[32:63]
- RT[0:31] <- undefined([0]*32)
+ if RA[XLEN/2:XLEN-1] <u RB[XLEN/2:XLEN-1] then
+ RT[XLEN/2:XLEN-1] <- result[XLEN/2:XLEN-1]
+ RT[0:(XLEN/2)-1] <- undefined([0]*(XLEN/2))
overflow <- 0
else
overflow <- 1
if overflow = 1 then
- RT[0:63] <- undefined([0]*64)
+ RT[0:XLEN-1] <- undefined([0]*XLEN)
Special Registers Altered: