diff options
author | Chris Robinson <[email protected]> | 2020-12-13 16:49:46 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-13 16:49:46 -0800 |
commit | 783904e414024691d47e76a22d8405ca85dd04f2 (patch) | |
tree | 92d692d7f6e86e5ff0f610043d7e162f1405e289 /core/mixer/mixer_sse.cpp | |
parent | 225d42538d2397e2698b9edb359c360dde3d00a8 (diff) |
Avoid compiling different sources for different targets
Simplifies configuration and fixes a potential problem with inline functions.
Inline functions that fail to inline will have a callable body generated. If
such a body is generated with the SSE4 source, for example, it can generate
SSE4 instructions. Calls for that function in other sources can then end up
calling the SSE4-generated body outside of any CPU capability check.
Diffstat (limited to 'core/mixer/mixer_sse.cpp')
-rw-r--r-- | core/mixer/mixer_sse.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/mixer/mixer_sse.cpp b/core/mixer/mixer_sse.cpp index ff722c19..f21ec227 100644 --- a/core/mixer/mixer_sse.cpp +++ b/core/mixer/mixer_sse.cpp @@ -15,6 +15,11 @@ struct BSincTag; struct FastBSincTag; +/* SSE2 is required for any SSE support. */ +#if defined(__GNUC__) && !defined(__clang__) && !defined(__SSE2__) +#pragma GCC target("sse2") +#endif + namespace { constexpr uint FracPhaseBitDiff{MixerFracBits - BSincPhaseBits}; |