cpu/powerpc: Fix QNan check (#12896)

a) all constants were one digit too short
b) the payload was always expected to be 0 (which is just a special case qnan (Real Indefinite) though)
This commit is contained in:
toxie 2024-10-21 17:42:34 +02:00 committed by GitHub
parent 27a8956384
commit bcfb0d052c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -505,8 +505,7 @@ static inline int is_qnan_double(double x)
{
uint64_t xi = *(uint64_t*)&x;
return( ((xi & DOUBLE_EXP) == DOUBLE_EXP) &&
((xi & 0x0007fffffffffffU) == 0x000000000000000U) &&
((xi & 0x000800000000000U) == 0x000800000000000U) );
((xi & 0x0008000000000000U) == 0x0008000000000000U) );
}