diff options
author | Jonathan Lennox <jonathan@vidyo.com> | 2015-08-03 17:04:26 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2015-09-01 17:21:31 -0400 |
commit | cb0875e07d7cac701b465863f532dc5bb8b0eb59 (patch) | |
tree | d027676a89c64b0d1bd1158581b25bb1d3bf27fc /celt/tests | |
parent | 26fc5c37759a2336b9256f60006f2ef3d59c4fb9 (diff) | |
download | opus-cb0875e07d7cac701b465863f532dc5bb8b0eb59.tar.gz |
Move SSE2 and SSE4.1 intrinsics functions to separate files, to be compiled with appropriate compiler flags. Otherwise, compilers are allowed to take advantage of (e.g.) -msse4.1 to generate code that uses SSE4.1 instructions, even when no SSE4.1 intrinsics are explicitly used in the source.
Diffstat (limited to 'celt/tests')
-rw-r--r-- | celt/tests/test_unit_mathops.c | 9 | ||||
-rw-r--r-- | celt/tests/test_unit_rotation.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/celt/tests/test_unit_mathops.c b/celt/tests/test_unit_mathops.c index b9b1bcf1..2de39baf 100644 --- a/celt/tests/test_unit_mathops.c +++ b/celt/tests/test_unit_mathops.c @@ -49,10 +49,17 @@ #include "cwrs.c" #include "pitch.c" #include "celt_lpc.c" +#include "celt.c" -#if defined(OPUS_X86_MAY_HAVE_SSE4_1) || defined(OPUS_X86_MAY_HAVE_SSE2) +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +#if defined(OPUS_X86_MAY_HAVE_SSE) #include "x86/pitch_sse.c" +#endif +#if defined(OPUS_X86_MAY_HAVE_SSE2) +#include "x86/pitch_sse2.c" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) +#include "x86/pitch_sse4_1.c" #include "x86/celt_lpc_sse.c" #endif #include "x86/x86_celt_map.c" diff --git a/celt/tests/test_unit_rotation.c b/celt/tests/test_unit_rotation.c index 5507884f..4780005f 100644 --- a/celt/tests/test_unit_rotation.c +++ b/celt/tests/test_unit_rotation.c @@ -46,11 +46,18 @@ #include "bands.h" #include "pitch.c" #include "celt_lpc.c" +#include "celt.c" #include <math.h> -#if defined(OPUS_X86_MAY_HAVE_SSE4_1) || defined(OPUS_X86_MAY_HAVE_SSE2) +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +#if defined(OPUS_X86_MAY_HAVE_SSE) #include "x86/pitch_sse.c" +#endif +#if defined(OPUS_X86_MAY_HAVE_SSE2) +#include "x86/pitch_sse2.c" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) +#include "x86/pitch_sse4_1.c" #include "x86/celt_lpc_sse.c" #endif #include "x86/x86_celt_map.c" |