Originally posted by stevenc
View Post
I'm the developer who made the CFLAGS change. I highly doubt that weird non-IEEE 387 floating-point math is going to make a comeback as part of a trendy future architecture.
Some reasons to drop non-SSE2 x86 as a tier-1 architecture (not necessarily in the order of importance):
* When a Microsoft compiler bug practically forced Mozilla to drop non-SSE support on Windows, Mozilla dropped non-SSE2 support and Windows. (It didn't make sense to drop non-SSE support without dropping on-SSE to support.) Since SSE2 is part of x86_64 and macOS and Android have never shipped on non-SSE2 x86 hardware, this left 32-bit x86 Linux is the only tier-1 platform that still used non-IEEE 387 floating-point math. By making 387 floating-point math tier-3, Mozilla gives itself permission to no longer spend time tracking down 32-bit-Linux-only issues arising from floating-point behavior that differs from standard IEEE behavior.
* Mozilla's Web Assembly compiler was not about to get support for floating-point operations on non-IEEE-compliant hardware, so even without the CFLAGS change, non-SSE2 32-bit x86 was about to become not fully supported.
* The tier-1 32-bit x86 configuration as far as the Rust team is concerned includes SSE2. That is, Rust is primarily tested with SSE2 floating-point math and LLVM being allowed to do the other SSE2 things it likes to do. If we want to use a tier-1 Rust compiler configuration, Firefox as a whole requires SSE2 anyway, so there's no point in compiling the C++ parts for a non-SSE2 target.
* For the near future, Rust can be expected to be bad at run-time selection of alternative code paths using different instruction set extensions. I am in the process of replacing some currently SSE2-accelerated C++ code with Rust code, so to avoid regressing performance the Rust code will need to use SSE2, too, but doing it conditionally at runtime in Rust would be messy. (C++ isn't great at this, either, in a portable way, but C++ has smaller compilation units than Rust, so having different compiler settings on a per-compilation unit basis results in more granularity in C++ than in Rust.)
Comment