From: Jacob Lifshay Date: Mon, 17 Jul 2023 22:41:00 +0000 (-0700) Subject: change pseudocode to match openpower-isa.git X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87ac057f41ec51e584096e3af92a342f2563f47e;p=libreriscv.git change pseudocode to match openpower-isa.git --- diff --git a/openpower/sv/rfc/ls013.mdwn b/openpower/sv/rfc/ls013.mdwn index f741dd6ac..3b172b843 100644 --- a/openpower/sv/rfc/ls013.mdwn +++ b/openpower/sv/rfc/ls013.mdwn @@ -164,26 +164,26 @@ Note (4) or Win32's min macro abs_a <- 0b0 || a[1:63] abs_b <- 0b0 || b[1:63] a_is_nan <- abs_a >u 0x7FF0_0000_0000_0000 - a_is_snan <- a_is_nan and a[12] = 0 + a_is_snan <- a_is_nan & (a[12] = 0) b_is_nan <- abs_b >u 0x7FF0_0000_0000_0000 - b_is_snan <- b_is_nan and b[12] = 0 - any_snan <- a_is_snan or b_is_snan + b_is_snan <- b_is_nan & (b[12] = 0) + any_snan <- a_is_snan | b_is_snan a_quieted <- a a_quieted[12] = 1 b_quieted <- b b_quieted[12] = 1 - if a_is_nan or b_is_nan then + if a_is_nan | b_is_nan then if FMM[2:3] = 0b00 then # min/maxnum08 if a_is_snan then result <- a_quieted else if b_is_snan then result <- b_quieted - else if a_is_nan and b_is_nan then result <- a_quieted + else if a_is_nan & b_is_nan then result <- a_quieted else if a_is_nan then result <- b else result <- a if FMM[2:3] = 0b01 then # min/max19 if a_is_nan then result <- a_quieted else result <- b_quieted if FMM[2:3] = 0b10 then # min/maxnum19 - if a_is_nan and b_is_nan then result <- a_quieted + if a_is_nan & b_is_nan then result <- a_quieted else if a_is_nan then result <- b else result <- a if FMM[2:3] = 0b11 then # min/maxc @@ -196,8 +196,8 @@ Note (4) or Win32's min macro cmp_l <- abs_a cmp_r <- abs_b if FMM[2:3] = 0b11 then # min/maxc - if abs_a = 0 then cmp_l <- 0 - if abs_b = 0 then cmp_r <- 0 + if abs_a = 0 then cmp_l[0:63] <- 0 + if abs_b = 0 then cmp_r[0:63] <- 0 if FMM[0] then # max # swap cmp_* so comparison goes the other way cmp_l, cmp_r <- cmp_r, cmp_l @@ -212,7 +212,7 @@ Note (4) or Win32's min macro else if cmp_l