mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Disable AVX512 for iOS simulator xcode 9 builds.
iOS simulator has the option to build with xcode instead of clang. GN use_xcode_clang=true enables the xcode build. As of version Xcode 9.2, the clang version used does not support AVX512. The version reported is version 9, but for normal clang, version 7 is sufficient to AVX512. When a version of XCode does support AVX512, the version check can be updated to allow AVX512 for newer versions of XCode. with XCode 9.2 the following macro is set. __APPLE_CC__ 6000 Bug: libyuv:789 Test: gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\" use_xcode_clang=true" Change-Id: I5a9a0b4a2760c7d09a4bcb464b3668979113b07e Reviewed-on: https://chromium-review.googlesource.com/991595 Reviewed-by: richard winterton <rrwinterton@gmail.com>
This commit is contained in:
parent
a694e339d1
commit
a9626b9daf
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 1707
|
Version: 1708
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -98,8 +98,8 @@ arm64
|
|||||||
|
|
||||||
ios simulator
|
ios simulator
|
||||||
|
|
||||||
gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\""
|
gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\""
|
||||||
gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\""
|
gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\""
|
||||||
ninja -v -C out/Debug libyuv_unittest
|
ninja -v -C out/Debug libyuv_unittest
|
||||||
ninja -v -C out/Release libyuv_unittest
|
ninja -v -C out/Release libyuv_unittest
|
||||||
|
|
||||||
|
|||||||
@ -55,11 +55,12 @@ extern "C" {
|
|||||||
#endif // clang >= 3.4
|
#endif // clang >= 3.4
|
||||||
#endif // __clang__
|
#endif // __clang__
|
||||||
|
|
||||||
// clang >= 7.0.0 required for AVX512.
|
// clang >= 6.0.0 required for AVX512.
|
||||||
|
// TODO(fbarchard): fix xcode 9 ios b/789.
|
||||||
#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
|
#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
|
||||||
#if (__clang_major__ >= 7)
|
#if (__clang_major__ >= 7) && !defined(__APPLE_EMBEDDED_SIMULATOR__)
|
||||||
#define CLANG_HAS_AVX512 1
|
#define CLANG_HAS_AVX512 1
|
||||||
#endif // clang >= 6
|
#endif // clang >= 7
|
||||||
#endif // __clang__
|
#endif // __clang__
|
||||||
|
|
||||||
// Visual C 2012 required for AVX2.
|
// Visual C 2012 required for AVX2.
|
||||||
@ -297,6 +298,7 @@ extern "C" {
|
|||||||
|
|
||||||
// The following are available for AVX512 clang x86 platforms:
|
// The following are available for AVX512 clang x86 platforms:
|
||||||
// TODO(fbarchard): Port to GCC and Visual C
|
// TODO(fbarchard): Port to GCC and Visual C
|
||||||
|
// TODO(fbarchard): re-enable HAS_ARGBTORGB24ROW_AVX512VBMI. Issue libyuv:789
|
||||||
#if !defined(LIBYUV_DISABLE_X86) && \
|
#if !defined(LIBYUV_DISABLE_X86) && \
|
||||||
(defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
|
(defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
|
||||||
(defined(CLANG_HAS_AVX512))
|
(defined(CLANG_HAS_AVX512))
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 1707
|
#define LIBYUV_VERSION 1708
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|||||||
@ -569,8 +569,7 @@ static const ulvec8 kPermARGBToRGB24_2 = {
|
|||||||
36u, 37u, 38u, 40u, 41u, 42u, 44u, 45u, 46u, 48u, 49u,
|
36u, 37u, 38u, 40u, 41u, 42u, 44u, 45u, 46u, 48u, 49u,
|
||||||
50u, 52u, 53u, 54u, 56u, 57u, 58u, 60u, 61u, 62u};
|
50u, 52u, 53u, 54u, 56u, 57u, 58u, 60u, 61u, 62u};
|
||||||
|
|
||||||
void __attribute__ ((__target__ ("avx512vbmi")))
|
void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width) {
|
||||||
ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width) {
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
"vmovdqa %3,%%ymm5 \n"
|
"vmovdqa %3,%%ymm5 \n"
|
||||||
"vmovdqa %4,%%ymm6 \n"
|
"vmovdqa %4,%%ymm6 \n"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user