From bcfb0d052cc7cc4c80395f8d888129fc6bc50112 Mon Sep 17 00:00:00 2001 From: toxie Date: Mon, 21 Oct 2024 17:42:34 +0200 Subject: 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) --- src/devices/cpu/powerpc/ppccom.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp index b0e4b583955..4dd6504f7cb 100644 --- a/src/devices/cpu/powerpc/ppccom.cpp +++ b/src/devices/cpu/powerpc/ppccom.cpp @@ -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) ); } -- cgit v1.2.3