-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for CPUs which do not have SSE2 extensions? #3118
Comments
Given /arch:IA32 is the default on x86 we probably have to support that, however we may be able to get away with building the DLLs with SSE2 |
No, /arch:IA32 is not the default on x86. Proof: This code gives different results on IA32 vs no flags. (It also proves that IA32 automatically promotes every float32 to float64 before doing any math.) https://godbolt.org/z/Pv7Go5Te8 The relevant 2018 update is https://support.microsoft.com/en-us/topic/may-8-2018-kb4103718-monthly-rollup-c4c01989-faca-af5f-46f4-2bdc2d0171fd. |
Might be an issue for 32-bit kernel mode usage. |
You're right, although the floating-point difference is that /arch:IA32 uses x87 floating point instructions, which are 80-bit |
From https://learn.microsoft.com/en-us/cpp/build/reference/arch-x86?view=msvc-170:
|
We talked about this at the weekly maintainer meeting - although the potentially affected set of users is extremely small, if installing an updated redist caused code to fail at runtime, that would be very severe. In general, we have very little code affected by However, Special Math is a special case - that is implemented in a separate "satellite DLL", and @strega-nil-ms has found that the availability of SSE2 impacts its precision (and presumably its performance). @CaseyCarter noted that we could change just the Special Math satellite DLL to use SSE2, which would be an extremely safe change - only programs actually using Special Math would be affected, as it is a pure leaf of the STL, and this satellite DLL was added relatively recently (VS 2017) so it is extraordinarily unlikely that machines with ancient processors are running code that uses this. Note: such a change would need to happen in both the GitHub/CMake and internal/MSBuild build systems. |
Does building Special Math with |
@AlexGuteniev no, we already build with |
Currently, on x86, we support
/arch:IA32
, and build our separately compiled sources with SSE2 support disabled. Is this still necessary, or can we allow ourselves to assume SSE2 hardware?Notes:
The text was updated successfully, but these errors were encountered: