Historic info
There are several ways in which our de-facto FP semantics currently are broken:
* LLVM doesn't preserve NaN bits (which is likely incoherent). That's https://github.com/rust-lang/rust/issues/73328, which is a meta-issue. Specific issues: rust-lang/rust#55131 (on all platforms)
* LLVM uses the x87 instructions and registers on i686 which behave different from how IEEE floats should behave. That's https://github.com/rust-lang/rust/issues/72327 (without SSE2) and https://github.com/rust-lang/rust/issues/73288 (with SSE2).
* LLVM does not distinguish sNaN and qNaN the way IEEE mandates: https://github.com/rust-lang/rust/issues/107247.
I'm adding this here because figuring out the semantics of Rust is part of the goal of the UCG (I think?) and we should have an overarching "FP semantics" tracker *somewhere*.
Floating-point semantics are hard, in particular the NaN part, but this should describe them accurately -- except on x86-32, for more than one reason.
We still need to officially decide that those are our intended semantics though. https://github.com/rust-lang/rust/issues/73328 tracks that on the rustc side.
Historic info
There are several ways in which our de-facto FP semantics currently are broken: * LLVM doesn't preserve NaN bits (which is likely incoherent). That's https://github.com/rust-lang/rust/issues/73328, which is a meta-issue. Specific issues: rust-lang/rust#55131 (on all platforms) * LLVM uses the x87 instructions and registers on i686 which behave different from how IEEE floats should behave. That's https://github.com/rust-lang/rust/issues/72327 (without SSE2) and https://github.com/rust-lang/rust/issues/73288 (with SSE2). * LLVM does not distinguish sNaN and qNaN the way IEEE mandates: https://github.com/rust-lang/rust/issues/107247. I'm adding this here because figuring out the semantics of Rust is part of the goal of the UCG (I think?) and we should have an overarching "FP semantics" tracker *somewhere*.