From e2229b93ac1ba9756cf4c7c88a7bb1aa1599b46f Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 23 Aug 2021 19:50:22 +0000 Subject: [PATCH] fixedarith: switch moduw to XLEN --- openpower/isa/fixedarith.mdwn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openpower/isa/fixedarith.mdwn b/openpower/isa/fixedarith.mdwn index 98a32366..663fa176 100644 --- a/openpower/isa/fixedarith.mdwn +++ b/openpower/isa/fixedarith.mdwn @@ -528,14 +528,14 @@ X-Form Pseudo-code: - dividend[0:31] <- (RA) [32:63] - divisor [0:31] <- (RB) [32:63] - if divisor = [0]*32 then - RT[0:63] <- undefined([0]*64) + dividend[0:(XLEN/2)-1] <- (RA)[XLEN/2:63] + divisor [0:(XLEN/2)-1] <- (RB)[XLEN/2:63] + if divisor = [0]*(XLEN/2) then + RT[0:XLEN-1] <- undefined([0]*64) overflow <- 1 else - RT[32:63] <- dividend % divisor - RT[0:31] <- undefined([0]*32) + RT[XLEN/2:XLEN-1] <- dividend % divisor + RT[0:(XLEN/2)-1] <- undefined([0]*(XLEN/2)) overflow <- 0 Special Registers Altered: -- 2.30.2