-
Notifications
You must be signed in to change notification settings - Fork 512
Force SSE2 floats for i686 targets #566
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
Conversation
0784fb9
to
518692a
Compare
The use of x87 fp does not cause loss of precision. On the countrary! |
Right |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest a few minor changes, looks good otherwise.
Regarding MSVC, I believe it does the reasonable thing by default so no further action is required.
@@ -80,11 +80,17 @@ endif() | |||
if(MINGW) | |||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc") | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") | |||
endif() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment here would help. Something like:
# Ensure that all platforms use 64-bit IEEE floating point operations for consistency; this is | |
# most important for the testsuite, which compares savefiles directly and depends on consistent | |
# rounding of intermediate results. |
OK makes sense. The "compares savefiles directly" explains it. |
Both GCC and Clang use x87 instructions by default on 32-bit x86 targets, but the loss of precision resulting from that has yielded crashing tests (see referenced issue), and it can be safely assumed there are very few CPUs that both don't support SSE2 and are expected to run SolveSpace This commit also removes a now-redundant check for 32-bit Windows against TARGET, which doesn't seem to be actually set by CMake at all Ref: solvespace#565
518692a
to
211318a
Compare
Review addressed |
Thanks! |
Just GCC and Clang, I don't have a way to test MSVC behaviour.
Ref: #565