diff options
author | djsollen <djsollen@google.com> | 2014-08-01 05:32:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-01 05:32:32 -0700 |
commit | 21769c52491b4e1c91cf7461af535aff2a1a18f7 (patch) | |
tree | a8f7ab836ce5aa2608237820aebf86445bbfa2e8 /include/core | |
parent | 490d49c5dcc4b2242c9b25f082b23ec5e842c4e7 (diff) |
Update NEON compiler defines to use SK_ prefix
BUG=skia:2785
R=mtklein@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/433513004
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkFloatingPoint.h | 4 | ||||
-rw-r--r-- | include/core/SkPreConfig.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/core/SkFloatingPoint.h b/include/core/SkFloatingPoint.h index 6e372d9519..5489bac215 100644 --- a/include/core/SkFloatingPoint.h +++ b/include/core/SkFloatingPoint.h @@ -120,7 +120,7 @@ extern const uint32_t gIEEENegativeInfinity; #if defined(__SSE__) #include <xmmintrin.h> -#elif defined(__ARM_NEON__) +#elif defined(SK_ARM_HAS_NEON) #include <arm_neon.h> #endif @@ -136,7 +136,7 @@ static inline float sk_float_rsqrt(const float x) { float result; _mm_store_ss(&result, _mm_rsqrt_ss(_mm_set_ss(x))); return result; -#elif defined(__ARM_NEON__) +#elif defined(SK_ARM_HAS_NEON) // Get initial estimate. const float32x2_t xx = vdup_n_f32(x); // Clever readers will note we're doing everything 2x. float32x2_t estimate = vrsqrte_f32(xx); diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h index c7331113dc..7d368918a4 100644 --- a/include/core/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -197,6 +197,10 @@ #define SK_CPU_ARM64 #endif +#if !defined(SK_ARM_HAS_NEON) && defined(__ARM_NEON__) + #define SK_ARM_HAS_NEON +#endif + ////////////////////////////////////////////////////////////////////// #if !defined(SKIA_IMPLEMENTATION) |