From: Jacob Lifshay Date: Wed, 17 May 2023 04:48:57 +0000 (-0700) Subject: fix fp comparison X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=382ad5d3438ea8e717793440f5f00d3bbe983f11;p=openpower-isa.git fix fp comparison --- diff --git a/openpower/isafunctions/bfp.mdwn b/openpower/isafunctions/bfp.mdwn index c6dd2d9f..9bbef89b 100644 --- a/openpower/isafunctions/bfp.mdwn +++ b/openpower/isafunctions/bfp.mdwn @@ -339,6 +339,10 @@ section 7.6.2.2 if IsNaN(x) | IsNaN(y) then return 0b0 + if IsInf(x) & IsInf(y) then + return x.sign = y.sign + if IsInf(x) | IsInf(y) then + return 0b0 if IsZero(x) & IsZero(y) then return 0b1 if IsZero(x) | IsZero(y) then @@ -357,6 +361,12 @@ section 7.6.2.2 if IsNaN(x) | IsNaN(y) then return 0b0 + if IsInf(x) & IsInf(y) then + return ¬IsNeg(x) & IsNeg(y) + if IsInf(x) then + return ¬IsNeg(x) + if IsInf(y) then + return IsNeg(y) if IsZero(x) & IsZero(y) then return 0b0 if IsZero(x) then @@ -379,6 +389,12 @@ section 7.6.2.2 if IsNaN(x) | IsNaN(y) then return 0b0 + if IsInf(x) & IsInf(y) then + return IsNeg(x) & ¬IsNeg(y) + if IsInf(x) then + return IsNeg(x) + if IsInf(y) then + return ¬IsNeg(y) if IsZero(x) & IsZero(y) then return 0b0 if IsZero(x) then