Guard VFPv3 ASM with an ifdef.
Change-Id: Id31de8dc0d9d68369896f2686068b29e07135a39 Reviewed-on: https://skia-review.googlesource.com/68641 Commit-Queue: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
ae99d29f6b
commit
31366872a5
@ -94,8 +94,8 @@ inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b) {
|
||||
}
|
||||
#define SkFixedMul(a,b) SkFixedMul_longlong(a,b)
|
||||
|
||||
|
||||
#if defined(SK_CPU_ARM32)
|
||||
// The VCVT float-to-fixed instruction is part of the VFPv3 instruction set.
|
||||
#if defined(__ARM_VFPV3__)
|
||||
/* 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.
|
||||
@ -107,6 +107,11 @@ inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b) {
|
||||
memcpy(&y, &x, sizeof(y));
|
||||
return y;
|
||||
}
|
||||
#undef SkFloatToFixed
|
||||
#define SkFloatToFixed(x) SkFloatToFixed_arm(x)
|
||||
#endif
|
||||
|
||||
#if defined(SK_CPU_ARM32)
|
||||
inline SkFixed SkFixedMul_arm(SkFixed x, SkFixed y)
|
||||
{
|
||||
int32_t t;
|
||||
@ -121,9 +126,6 @@ inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b) {
|
||||
}
|
||||
#undef SkFixedMul
|
||||
#define SkFixedMul(x, y) SkFixedMul_arm(x, y)
|
||||
|
||||
#undef SkFloatToFixed
|
||||
#define SkFloatToFixed(x) SkFloatToFixed_arm(x)
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user