From: Jacob Lifshay Date: Tue, 25 Apr 2023 06:40:35 +0000 (-0700) Subject: fix minmax pseudo-code -- CR0 must not have lt/gt swapped X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52434df9a3b7125137fe786821a598575c9f5edc;p=libreriscv.git fix minmax pseudo-code -- CR0 must not have lt/gt swapped --- diff --git a/openpower/sv/rfc/ls013.mdwn b/openpower/sv/rfc/ls013.mdwn index 218bb78b3..38d4b4168 100644 --- a/openpower/sv/rfc/ls013.mdwn +++ b/openpower/sv/rfc/ls013.mdwn @@ -245,6 +245,14 @@ semantics therefore Saturated variants of these instructions need not be propose # do signed comparison of the original inputs a[0] <- ¬a[0] b[0] <- ¬b[0] + # if Rc = 1 then store the result of comparing a and b to CR0 + if Rc = 1 then + if a u b then + CR0 <- 0b010 || XER.SO if MMM[2] then # max mode # swap a and b to make the less than comparison do # greater than comparison of the original inputs @@ -253,15 +261,8 @@ semantics therefore Saturated variants of these instructions need not be propose b <- t # store the entire selected source (even in word mode) # if Rc = 1 then store the result of comparing a and b to CR0 - if a u b then - RT <- (RB) - if Rc = 1 then CR0 <- 0b010 || XER.SO + if a