#define SkFixedMul(a,b) SkFixedMul_longlong(a,b)
#endif
-#if defined(SK_CPU_ARM)
+#if defined(SK_CPU_ARM32)
/* This guy does not handle NaN or other obscurities, but is faster than
than (int)(x*65536). When built on Android with -Os, needs forcing
to inline or we lose the speed benefit.
return 32;
}
}
- #elif defined(SK_CPU_ARM) || defined(__GNUC__) || defined(__clang__)
+ #elif defined(SK_CPU_ARM32) || defined(__GNUC__) || defined(__clang__)
static inline int SkCLZ(uint32_t mask) {
// __builtin_clz(0) is undefined, so we have to detect that case.
return mask ? __builtin_clz(mask) : 32;
*/
template <typename In, typename Out>
inline void SkTDivMod(In numer, In denom, Out* div, Out* mod) {
-#ifdef SK_CPU_ARM
+#ifdef SK_CPU_ARM32
// If we wrote this as in the else branch, GCC won't fuse the two into one
// divmod call, but rather a div call followed by a divmod. Silly! This
// version is just as fast as calling __aeabi_[u]idivmod manually, but with
// On x86 this will just be a single idiv.
*div = static_cast<Out>(numer/denom);
*mod = static_cast<Out>(numer%denom);
-#endif // SK_CPU_ARM
+#endif
}
#endif
#endif
#ifndef SK_BARRIERS_PLATFORM_H
-# if defined(SK_CPU_ARM) || defined(SK_CPU_ARM64)
+# if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64)
# define SK_BARRIERS_PLATFORM_H "../../src/ports/SkBarriers_arm.h"
# else
# define SK_BARRIERS_PLATFORM_H "../../src/ports/SkBarriers_x86.h"
// ARM defines
#if defined(__arm__) && (!defined(__APPLE__) || !TARGET_IPHONE_SIMULATOR)
- #define SK_CPU_ARM
+ #define SK_CPU_ARM32
#if defined(__GNUC__)
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
#define SK_ARM_NEON_MODE_ALWAYS 1
#define SK_ARM_NEON_MODE_DYNAMIC 2
-#if defined(SK_CPU_ARM) && defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT)
+#if defined(SK_CPU_ARM32) && defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT)
# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_DYNAMIC
-#elif defined(SK_CPU_ARM) && defined(__ARM_HAVE_NEON) || defined(SK_CPU_ARM64)
+#elif defined(SK_CPU_ARM32) && defined(__ARM_HAVE_NEON) || defined(SK_CPU_ARM64)
# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_ALWAYS
#else
# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_NONE
#include "SkColor_opts_neon.h"
#include <arm_neon.h>
-#ifdef SK_CPU_ARM
+#ifdef SK_CPU_ARM32
void S32_D565_Opaque_neon(uint16_t* SK_RESTRICT dst,
const SkPMColor* SK_RESTRICT src, int count,
U8CPU alpha, int /*x*/, int /*y*/) {
}
}
-#ifdef SK_CPU_ARM
+#ifdef SK_CPU_ARM32
void S32A_Blend_BlitRow32_neon(SkPMColor* SK_RESTRICT dst,
const SkPMColor* SK_RESTRICT src,
int count, U8CPU alpha) {
// load src color, 8 pixels, 4 64 bit registers
// (and increment src).
uint32x2x4_t vsrc;
-#if defined(SK_CPU_ARM) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)))
+#if defined(SK_CPU_ARM32) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)))
asm (
"vld1.32 %h[vsrc], [%[src]]!"
: [vsrc] "=w" (vsrc), [src] "+r" (src)
// store back the 8 calculated pixels (2 128 bit
// registers), and increment dst.
-#if defined(SK_CPU_ARM) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)))
+#if defined(SK_CPU_ARM32) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)))
asm (
"vst1.32 %h[vdst], [%[dst]]!"
: [dst] "+r" (dst)
///////////////////////////////////////////////////////////////////////////////
const SkBlitRow::Proc sk_blitrow_platform_565_procs_arm_neon[] = {
-#ifdef SK_CPU_ARM
+#ifdef SK_CPU_ARM32
// no dither
S32_D565_Opaque_neon,
S32_D565_Blend_neon,
#else
S32A_Opaque_BlitRow32_neon, // S32A_Opaque,
#endif
-#ifdef SK_CPU_ARM
+#ifdef SK_CPU_ARM32
S32A_Blend_BlitRow32_neon // S32A_Blend
#else
NULL