From 082f1ea77ee752fa0c85b40ec40f56d30d4bc36b Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Tue, 16 May 2023 21:48:04 -0700 Subject: [PATCH] fix round nearest-even --- openpower/isafunctions/bfp.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpower/isafunctions/bfp.mdwn b/openpower/isafunctions/bfp.mdwn index 44ac7871..c6dd2d9f 100644 --- a/openpower/isafunctions/bfp.mdwn +++ b/openpower/isafunctions/bfp.mdwn @@ -291,7 +291,7 @@ section 7.6.2.2 if temp = 0 then halfway <- 1 else more_than_halfway <- 1 if rmode = 0b000 then # Round to Nearest Even - round_up <- (even & halfway) | more_than_halfway + round_up <- (¬even & halfway) | more_than_halfway if rmode = 0b001 then # Round towards Zero round_up <- 0 if rmode = 0b010 then # Round towards +Infinity -- 2.30.2