arch-gcn3: Fix VOP3 V_LDEXP_F64
authorTravis Boraten <travis.boraten@amd.com>
Thu, 18 Apr 2019 22:03:14 +0000 (18:03 -0400)
committerAnthony Gutierrez <anthony.gutierrez@amd.com>
Fri, 17 Jul 2020 16:32:56 +0000 (16:32 +0000)
commite1d10c3894978015fb20e7247f67b1e5d23d2811
tree4e7b5bf52dcfd6c73046324f366588b108803305
parent83fe4754e756cb2bc17fe9dfc9a02d5804e7def2
arch-gcn3: Fix VOP3 V_LDEXP_F64

Replaced !std::isnormal with std::fpclassify because std::isnormal
is not specific enough. !std::isnormal was incorrectly catching
NaN, Inf, 0.0, and subnormals (aka denormals), where as it was only
suppose to catch subnormals.

The return value and error handling spec of std::ldexp listed on
cppreference.com appears to match up in nearly all cases after
making these changes. If std::ldexp handled subnormals as described
in the GCN3 2016 guide, we could have used vdst[lane] = std::ldexp
and not need to check for any corner cases.

Change-Id: I4c77af77c3b7798f86d40442610cef1296a28441
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29966
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
src/arch/gcn3/insts/instructions.cc