diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-05-20 01:46:51 +0300 |
---|---|---|
committer | Tom Tsou <tom@tsou.cc> | 2017-06-08 18:32:29 +0000 |
commit | 3bd763d2a10e19980505c90242a2eae9e2f6b4cb (patch) | |
tree | 7de8a172b393fc5af50259d6a0ae7664896339d6 /Transceiver52M/x86 | |
parent | ee5735768213f8724b978cd9180f088721e0cde0 (diff) |
ssedetect: call __builtin_cpu_supports() only if supported
Some compilers don't support the __builtin_cpu_supports built-in,
so let's make them able to compile the project anyway.
Change-Id: I0c90402d8e4c9f196c54b066ff30891c8de3ad2b
Diffstat (limited to 'Transceiver52M/x86')
-rw-r--r-- | Transceiver52M/x86/convert.c | 2 | ||||
-rw-r--r-- | Transceiver52M/x86/convolve.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Transceiver52M/x86/convert.c b/Transceiver52M/x86/convert.c index db98050..07cdf59 100644 --- a/Transceiver52M/x86/convert.c +++ b/Transceiver52M/x86/convert.c @@ -46,6 +46,7 @@ void convert_init(void) c.convert_si16_ps_16n = base_convert_short_float; c.convert_si16_ps = base_convert_short_float; +#ifdef HAVE___BUILTIN_CPU_SUPPORTS #ifdef HAVE_SSE4_1 if (__builtin_cpu_supports("sse4.1")) { c.convert_si16_ps_16n = &_sse_convert_si16_ps_16n; @@ -60,6 +61,7 @@ void convert_init(void) c.convert_scale_ps_si16 = _sse_convert_scale_ps_si16; } #endif +#endif } void convert_float_short(short *out, const float *in, float scale, int len) diff --git a/Transceiver52M/x86/convolve.c b/Transceiver52M/x86/convolve.c index 35cba29..eb38f64 100644 --- a/Transceiver52M/x86/convolve.c +++ b/Transceiver52M/x86/convolve.c @@ -82,7 +82,7 @@ void convolve_init(void) c.conv_real4n = (void *)_base_convolve_real; c.conv_real = (void *)_base_convolve_real; -#ifdef HAVE_SSE3 +#if defined(HAVE_SSE3) && defined(HAVE___BUILTIN_CPU_SUPPORTS) if (__builtin_cpu_supports("sse3")) { c.conv_cmplx_4n = sse_conv_cmplx_4n; c.conv_cmplx_8n = sse_conv_cmplx_8n; |