From: Jacob Lifshay Date: Tue, 25 Jul 2023 01:54:45 +0000 (-0700) Subject: restore use of ? : operator in bfp_ROUND_TO_BFP32/64 pseudocode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=721ba871a81803d3927f4bffc84a60269801a04b;p=openpower-isa.git restore use of ? : operator in bfp_ROUND_TO_BFP32/64 pseudocode this changes it to match the PowerISA spec. better --- diff --git a/openpower/isafunctions/bfp.mdwn b/openpower/isafunctions/bfp.mdwn index 52df8863..a4f09eb5 100644 --- a/openpower/isafunctions/bfp.mdwn +++ b/openpower/isafunctions/bfp.mdwn @@ -781,18 +781,11 @@ section 7.6.2.2 if ro=1 then r <- bfp_ROUND_ODD(53, x) if bfp_COMPARE_GT(bfp_ABSOLUTE(r), bfp_NMAX_BFP64()) then if FPSCR.OE=0 then - if x.sign then - if (ro=0) & (rmode=0b00) then r <- bfp_INFINITY() - if (ro=0) & (rmode=0b01) then r <- bfp_NMAX_BFP64() - if (ro=0) & (rmode=0b10) then r <- bfp_NMAX_BFP64() - if (ro=0) & (rmode=0b11) then r <- bfp_INFINITY() - if ro=1 then r <- bfp_NMAX_BFP64() - else - if (ro=0) & (rmode=0b00) then r <- bfp_INFINITY() - if (ro=0) & (rmode=0b01) then r <- bfp_NMAX_BFP64() - if (ro=0) & (rmode=0b10) then r <- bfp_INFINITY() - if (ro=0) & (rmode=0b11) then r <- bfp_NMAX_BFP64() - if ro=1 then r <- bfp_NMAX_BFP64() + if (ro=0) & (rmode=0b00) then r <- x.sign ? bfp_INFINITY() : bfp_INFINITY() + if (ro=0) & (rmode=0b01) then r <- x.sign ? bfp_NMAX_BFP64() : bfp_NMAX_BFP64() + if (ro=0) & (rmode=0b10) then r <- x.sign ? bfp_NMAX_BFP64() : bfp_INFINITY() + if (ro=0) & (rmode=0b11) then r <- x.sign ? bfp_INFINITY() : bfp_NMAX_BFP64() + if ro=1 then r <- x.sign ? bfp_NMAX_BFP64() : bfp_NMAX_BFP64() r.sign <- x.sign ox_flag <- 0b1 xx_flag <- 0b1 @@ -850,16 +843,10 @@ section 7.6.2.2 if bfp_COMPARE_GT(bfp_ABSOLUTE(r), bfp_NMAX_BFP32()) then if FPSCR.OE = 0 then - if x.sign then - if rmode=0b00 then r <- bfp_INFINITY() - if rmode=0b01 then r <- bfp_NMAX_BFP32() - if rmode=0b10 then r <- bfp_NMAX_BFP32() - if rmode=0b11 then r <- bfp_INFINITY() - else - if rmode=0b00 then r <- bfp_INFINITY() - if rmode=0b01 then r <- bfp_NMAX_BFP32() - if rmode=0b10 then r <- bfp_INFINITY() - if rmode=0b11 then r <- bfp_NMAX_BFP32() + if rmode=0b00 then r <- x.sign ? bfp_INFINITY() : bfp_INFINITY() + if rmode=0b01 then r <- x.sign ? bfp_NMAX_BFP32() : bfp_NMAX_BFP32() + if rmode=0b10 then r <- x.sign ? bfp_NMAX_BFP32() : bfp_INFINITY() + if rmode=0b11 then r <- x.sign ? bfp_INFINITY() : bfp_NMAX_BFP32() r.sign <- x.sign ox_flag <- 0b1 xx_flag <- 0b1