Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: src/opts/SkBlitRow_opts_arm.cpp

Issue 337853003: Fix SkBlitRow_opts_arm so that it works on ARM v4t. (Closed) Base URL: https://skia.googlesource.com/skia.git@skconvolver
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBlitRow_opts_arm.cpp
diff --git a/src/opts/SkBlitRow_opts_arm.cpp b/src/opts/SkBlitRow_opts_arm.cpp
index 34b8564723cde724d1dfb4a68107bcb23fcc9082..473a3e91b189ba1d6c9f738f4048b50644e47a5e 100644
--- a/src/opts/SkBlitRow_opts_arm.cpp
+++ b/src/opts/SkBlitRow_opts_arm.cpp
@@ -37,7 +37,9 @@ static void S32A_D565_Opaque(uint16_t* SK_RESTRICT dst,
"and r4, r3, #0x0000f8 \n\t"
"and r5, r3, #0x00fc00 \n\t"
"and r6, r3, #0xf80000 \n\t"
+#ifdef SK_ARM_HAS_EDSP
"pld [r1, #32] \n\t"
+#endif
"lsl r3, r4, #8 \n\t"
"orr r3, r3, r5, lsr #5 \n\t"
"orr r3, r3, r6, lsr #19 \n\t"
@@ -51,13 +53,15 @@ static void S32A_D565_Opaque(uint16_t* SK_RESTRICT dst,
"ldrh r4, [%[dst]] \n\t"
"rsb r7, r7, #255 \n\t"
"and r6, r4, #0x001f \n\t"
-#if SK_ARM_ARCH == 6
+#if SK_ARM_ARCH <= 6
"lsl r5, r4, #21 \n\t"
"lsr r5, r5, #26 \n\t"
#else
"ubfx r5, r4, #5, #6 \n\t"
#endif
+#ifdef SK_ARM_HAS_EDSP
"pld [r0, #16] \n\t"
+#endif
"lsr r4, r4, #11 \n\t"
#ifdef SK_ARM_HAS_EDSP
"smulbb r6, r6, r7 \n\t"
@@ -68,8 +72,14 @@ static void S32A_D565_Opaque(uint16_t* SK_RESTRICT dst,
"mul r5, r5, r7 \n\t"
"mul r4, r4, r7 \n\t"
#endif
+#if SK_ARM_ARCH >= 6
"uxtb r7, r3, ROR #16 \n\t"
"uxtb ip, r3, ROR #8 \n\t"
+#else
+ "mov ip, #0xff \n\t"
+ "and r7, ip, r3, ROR #16 \n\t"
+ "and ip, ip, r3, ROR #8 \n\t"
+#endif
"and r3, r3, #0xff \n\t"
"add r6, r6, #16 \n\t"
"add r5, r5, #32 \n\t"
@@ -86,7 +96,9 @@ static void S32A_D565_Opaque(uint16_t* SK_RESTRICT dst,
"orr r6, r6, r5, lsl #3 \n\t"
"orr r4, r6, r4, lsl #8 \n\t"
"strh r4, [%[dst]], #2 \n\t"
+#ifdef SK_ARM_HAS_EDSP
"pld [r1, #32] \n\t"
+#endif
"subs %[count], %[count], #1 \n\t"
"bne 1b \n\t"
"b 4f \n\t"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698