ericmckean / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

libvpx build fails with clang 3.4+ #720

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
tested with:
clang version 3.5 (trunk 195906)
clang version 3.5 (trunk 201925)

$ CC=clang CXX=clang ./configure

Note this works with 3.4, but all of the version report themselves as gcc 4.2.1.

clang 3.5 seems to have the newer _mm256_broadcastsi128_si256 instead of 
_mm_broadcastsi128_si256.

As an aside I don't know why the current ifdefs appear to ignore 4.6.0 (only) 
and 4.7.0 (only); I think the PATCHLEVEL check should be '>= 0'.

#if ( __GNUC__ < 4 || (__GNUC__ == 4 && \
(__GNUC_MINOR__ < 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0))))
  filtersReg32 = _mm_broadcastsi128_si256((__m128i const *)&filtersReg);
#elif(__GNUC__ == 4 && (__GNUC_MINOR__ == 7 && __GNUC_PATCHLEVEL__ > 0))
  filtersReg32 = _mm_broadcastsi128_si256(filtersReg);
#else
  filtersReg32 = _mm256_broadcastsi128_si256(filtersReg);
#endif

---

vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c:59:18: warning: implicit 
declaration of function
      '_mm_broadcastsi128_si256' is invalid in C99 [-Wimplicit-function-declaration]
  filtersReg32 = _mm_broadcastsi128_si256((__m128i const *)&filtersReg);
                 ^
vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c:59:16: error: assigning to 
'__m256i' from incompatible
      type 'int'
  filtersReg32 = _mm_broadcastsi128_si256((__m128i const *)&filtersReg);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c:315:16: error: assigning to 
'__m256i' from incompatible
      type 'int'
  filtersReg32 = _mm_broadcastsi128_si256((__m128i const *)&filtersReg);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.

Original issue reported on code.google.com by jz...@google.com on 28 Feb 2014 at 10:25

GoogleCodeExporter commented 9 years ago
I looked at this a bit more closely, the switch actually occurred with 3.4. 
r187307 which is pre-3.4, but reports 3.4, still contains the legacy definition.
If any preprocessor tests are added they should use the official releases [1] 
as reference.

[1] http://llvm.org/releases/download.html

Original comment by jz...@google.com on 2 Mar 2014 at 2:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision caecedc92f9c.

Original comment by jz...@google.com on 6 Mar 2014 at 7:52