arch-gcn3: Replace some instances of std::isnormal with std::fpclassify
authorTravis Boraten <travis.boraten@amd.com>
Wed, 1 May 2019 05:11:08 +0000 (01:11 -0400)
committerAnthony Gutierrez <anthony.gutierrez@amd.com>
Fri, 17 Jul 2020 16:33:26 +0000 (16:33 +0000)
commit4c1dc827bcd17964743a8aced211247ee4b7a4a8
treea016a5f567003f4288692bf3f2654af9bf3b557a
parente1d10c3894978015fb20e7247f67b1e5d23d2811
arch-gcn3: Replace some instances of std::isnormal with std::fpclassify

Affected instructions: V_DIV_SCALE_F64, V_CMP_CLASS_F64,
V_CMPX_CLASS_F64 and their VOPC, VOP3, F32 variants.

These instances of std::isnormal were being used to check for
subnormal (denorms) values. std::isnormal is not specific enough.
It returns true for normal values but false for NaN, Inf, 0.0, and
subnormals. std::fpclassify returns macros for each category of
floating point numbers. Now we only catch subnormals.

Change-Id: I8d8f4452ff58de71e7c8e0b2b5e73467b532e196
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29967
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