From 907452d23734f8cc4bd65b87a8019a912d19cacd Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 3 Sep 2021 08:49:13 +0100 Subject: [PATCH] use brackets round (XLEN/2) in divw pseudocode [0]*XLEN/2 was being interpreted as ([0]*XLEN)/2 --- openpower/isa/fixedarith.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpower/isa/fixedarith.mdwn b/openpower/isa/fixedarith.mdwn index 9dd7f1f4..46f63529 100644 --- a/openpower/isa/fixedarith.mdwn +++ b/openpower/isa/fixedarith.mdwn @@ -391,13 +391,13 @@ Pseudo-code: dividend[0:(XLEN/2)-1] <- (RA)[XLEN/2:XLEN-1] divisor[0:(XLEN/2)-1] <- (RB) [XLEN/2:XLEN-1] if (((dividend = (0b1 || ([0b0] * ((XLEN/2)-1)))) & - (divisor = [1]*XLEN/2)) | - (divisor = [0]*XLEN/2)) then + (divisor = [1]*(XLEN/2))) | + (divisor = [0]*(XLEN/2))) then RT[0:XLEN-1] <- undefined([0]*XLEN) overflow <- 1 else RT[XLEN/2:XLEN-1] <- DIVS(dividend, divisor) - RT[0:(XLEN/2)-1] <- undefined([0]*XLEN/2) + RT[0:(XLEN/2)-1] <- undefined([0]*(XLEN/2)) overflow <- 0 Special Registers Altered: -- 2.30.2