Commit 52955845 authored by fbarchard@google.com's avatar fbarchard@google.com

Add gcc 4.7 support for AVX2

BUG=269
TEST=g++ -c source/row_posix.cc -I include/
R=nfullagar@google.com

Review URL: https://webrtc-codereview.appspot.com/2273006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@797 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 62184141
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 796
Version: 797
License: BSD
License File: LICENSE
......
......@@ -142,11 +142,17 @@ extern "C" {
#endif
// The following are available on all x86 platforms, including NaCL, but
// require VS2012, llvm or NaCL.
// require VS2012, clang, gcc4.7 or NaCL.
// Caveat: llvm 3.1 required, but does not provide a version.
#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
/* Test for GCC >= 4.7.0 */
#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
#define GCC_HAS_AVX2 1
#endif // GNUC >= 4.7
#endif // __GNUC__
#if !defined(LIBYUV_DISABLE_X86) && \
((defined(_M_IX86) && defined(_MSC_VER) && _MSC_VER >= 1700) || \
defined(__native_client__) || defined(__clang__))
defined(__native_client__) || defined(__clang__) || defined(GCC_HAS_AVX2))
// Effects:
#define HAS_ARGBPOLYNOMIALROW_AVX2
#endif
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 796
#define LIBYUV_VERSION 797
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -5915,7 +5915,8 @@ void ARGBPolynomialRow_AVX2(const uint8* src_argb,
: "r"(poly) // %3
: "memory", "cc"
#if defined(__SSE2__)
, "ymm0", "ymm1", "ymm2", "ymm3", "ymm4", "ymm5", "ymm6", "ymm7"
// TODO(fbarchard): declare ymm usage when applicable.
, "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
#endif
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment