aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Amaury Le Leyzour <amaury.leleyzour@arm.com>2017-03-07 16:58:08 -0800
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-26 22:45:15 +0000
commitac0e705af1d68267e4f09a6486f4cb68903f7835 (patch)
tree6af34355469d321f7c52dbcc13c4e00229bf4260 /include
parentb8a1392b021f480e292d66576e3da5198480845c (diff)
Fix new IT blocks ARMv8
ARMv8 specifies that an IT block should be followed by only one 16-bit instruction. * SkFloatToFix is back to a C implementation that mirrors the assembly code. * S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let the compiler choose what is best in the context of the IT block. And replaced 'keep_dst' by 'ip' where low register or high register does not matter. BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: If587110a0c74b637ae99460419d46cf969c694fc Reviewed-on: https://skia-review.googlesource.com/9346 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/private/SkFixed.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/include/private/SkFixed.h b/include/private/SkFixed.h
index b2eea5f624..6361bdaab5 100644
--- a/include/private/SkFixed.h
+++ b/include/private/SkFixed.h
@@ -102,19 +102,9 @@ inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b) {
*/
SK_ALWAYS_INLINE SkFixed SkFloatToFixed_arm(float x)
{
- int32_t y, z;
- asm("movs %1, %3, lsl #1 \n"
- "mov %2, #0x8E \n"
- "sub %1, %2, %1, lsr #24 \n"
- "mov %2, %3, lsl #8 \n"
- "orr %2, %2, #0x80000000 \n"
- "mov %1, %2, lsr %1 \n"
- "it cs \n"
- "rsbcs %1, %1, #0 \n"
- : "=r"(x), "=&r"(y), "=&r"(z)
- : "r"(x)
- : "cc"
- );
+ int32_t y;
+ asm("vcvt.s32.f32 %0, %0, #16": "+w"(x));
+ memcpy(&y, &x, sizeof(y));
return y;
}
inline SkFixed SkFixedMul_arm(SkFixed x, SkFixed y)