Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions rts/System/simd_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@

#ifdef SSE2NEON
#include "lib/sse2neon/sse2neon.h"
// sse2neon leaks <fenv.h>'s FE_XXX macros, which collide with the ones streflop
// redefines and trigger a #warning. Undef them here so streflop gets a clean slate.
#undef FE_INVALID
#undef FE_DENORMAL
#undef FE_DIVBYZERO
#undef FE_OVERFLOW
#undef FE_UNDERFLOW
#undef FE_INEXACT
#undef FE_ALL_EXCEPT
#undef FE_TONEAREST
#undef FE_DOWNWARD
#undef FE_UPWARD
#undef FE_TOWARDZERO

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the warnings emitted were quite spammy:

/build/src/rts/lib/streflop/FPUSettings.h:105:2: warning: #warning STREFLOP: FE_XXX flags were already
  defined and will be redefined! Check you do not use the system libm. [-Wcpp]
    105 | #warning STREFLOP: FE_XXX flags were already defined and will be redefined! Check you do not use
  the system libm.
        |  ^~~~~~~

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to send a fix (or at least a ticket) upstream to libsse2neon

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created an issue to seek guidance from the devs xref DLTcollab/sse2neon#767

#else
#ifdef _MSC_VER
#include <intrin.h> // MSVC umbrella
Expand Down
Loading