Skip to content
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

Enable SSE2 for i686 mingw32 #8627

Merged
merged 1 commit into from Apr 19, 2019

Conversation

Projects
None yet
2 participants
@dra27
Copy link
Contributor

commented Apr 18, 2019

The eagle-eyed amongst us may have noticed that AppVeyor has been failing all builds since this morning. AppVeyor updated the Cygwin installation in the Windows workers (see the April 17 update and in particular appveyor/ci#2898 (comment)).

This bumped mingw-w64 gcc from 6.4 to 7.4, and with -O that's causing "incorrect" code to be generated for caml_round such that caml_round(0.5) == 0.0 and not the 1.0 required for the C99 emulation.

A sledgehammer is to specify -ffloat-store for i686 mingw32. A rock hammer is to accept that Windows 8+ requires an SSE2 processor, and Windows 7 dropped support for non-SSE2 processors last year, which is what this PR does.

Enable SSE2 for i686 mingw32
GCC 7.4 generates incorrect code for caml_round by using 80-bit registers
instead of 64-bit registers for the calculations.
@xavierleroy

This comment has been minimized.

Copy link
Contributor

commented Apr 19, 2019

Excess FP precision strikes again...

I'm OK with the proposed fix, given that for this configuration we know that the compiler is gcc and the OS requires SSE2.

I suspect there is an alternate implementation of round that uses only integer operations and is therefore immune to excess precision. But I'm too tired to work it out at the moment.

@dra27

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2019

Thanks, @xavierleroy!

@dra27 dra27 merged commit 4dc48fa into ocaml:trunk Apr 19, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

dra27 added a commit that referenced this pull request Apr 19, 2019

dra27 added a commit that referenced this pull request Apr 19, 2019

Enable SSE2 for i686 mingw32 (#8627)
GCC 7.4 generates incorrect code for caml_round by using 80-bit registers
instead of 64-bit registers for the calculations.

(cherry picked from commit 4dc48fa)
@dra27

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2019

Cherry-picked to 4.08 in 1237303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.