don't mention the neon functions if no neon is available

git-svn-id: http://skia.googlecode.com/svn/trunk@2514 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-10-21 14:05:33 +00:00
parent f0f617a502
commit 5a0920c22c

View File

@ -15,40 +15,32 @@
#include "SkUtils.h"
#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count);
extern "C" void memset32_neon(uint32_t dst[], uint32_t value, int count);
#endif
#if defined(SK_CPU_LENDIAN)
extern "C" void arm_memset16(uint16_t* dst, uint16_t value, int count);
extern "C" void arm_memset32(uint32_t* dst, uint32_t value, int count);
static inline bool hasNeonRegisters() {
#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
return true;
#else
return false;
#endif
}
SkMemset16Proc SkMemset16GetPlatformProc() {
if (hasNeonRegisters()) {
return memset16_neon;
} else {
#if defined(SK_CPU_LENDIAN)
return arm_memset16;
#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
return memset16_neon;
#elif defined(SK_CPU_LENDIAN)
return arm_memset16;
#else
return NULL;
return NULL;
#endif
}
}
SkMemset32Proc SkMemset32GetPlatformProc() {
if (hasNeonRegisters()) {
return memset32_neon;
} else {
#if defined(SK_CPU_LENDIAN)
return arm_memset32;
#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
return memset32_neon;
#elif defined(SK_CPU_LENDIAN)
return arm_memset32;
#else
return NULL;
return NULL;
#endif
}
}