https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bruno at clisp dot org

--- Comment #16 from Bruno Haible <bruno at clisp dot org> ---
(In reply to Paul Eggert from comment #5)
> Although it is indeed unspecified whether 0.0/0.0 yields -NaN or +NaN, it is
> well understood that negating a floating point value flips its sign bit.

While I agree that this is generally true, it's not the case on mips with clang
as compiler.

Namely, this compiler generates 'neg.d' instructions for the unary minus of a
'double' value, and this instruction may be a no-op on NaN values, depending on
the CPU's control registers. For details, see the "MIPSĀ® Architecture for
Progreammers, Volume II-A: The MIPSĀ® Instruction Set Manual", page 307 (317).

Whereas gcc generates an integer XOR instruction (at least in my test cases),
so is fine.

Reply via email to