Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5f1ac6454783b0c77f1dc789965e7a097e948771 https://github.com/WebKit/WebKit/commit/5f1ac6454783b0c77f1dc789965e7a097e948771 Author: Marcus Plutowski <marcus_plutow...@apple.com> Date: 2024-02-16 (Fri, 16 Feb 2024)
Changed paths: A JSTests/wasm/stress/fsub-nan-copysign.js M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp Log Message: ----------- Preserve sign of NaN operands in fsub{32,64} https://bugs.webkit.org/show_bug.cgi?id=269509 rdar://120780768 Reviewed by Justin Michaud and Yusuke Suzuki. Negating a NaN operand for fsub is incorrect, as IEEE defines the result of an arithmetic operation with a NaN parameter as the NaN itself (without modification). This is observable when a copysign operation is done on the result, as copysign itself is exempt from that restriction and can thus detect the improper negation. By checking whether the operand is a NaN before negating we avoid this issue. * JSTests/wasm/stress/fsub-nan-copysign.js: Added. * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJITImpl::BBQJIT::addF32Sub): (JSC::Wasm::BBQJITImpl::BBQJIT::addF64Sub): Canonical link: https://commits.webkit.org/274910@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes