1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/patches/0026-Bug-901208-Fix-ARM-v4t.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,83 @@ 1.4 +diff --git a/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp b/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp 1.5 +--- a/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp 1.6 ++++ b/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp 1.7 +@@ -26,66 +26,78 @@ static void S32A_D565_Opaque(uint16_t* S 1.8 + asm volatile ( 1.9 + "1: \n\t" 1.10 + "ldr r3, [%[src]], #4 \n\t" 1.11 + "cmp r3, #0xff000000 \n\t" 1.12 + "blo 2f \n\t" 1.13 + "and r4, r3, #0x0000f8 \n\t" 1.14 + "and r5, r3, #0x00fc00 \n\t" 1.15 + "and r6, r3, #0xf80000 \n\t" 1.16 ++#ifdef SK_ARM_HAS_EDSP 1.17 + "pld [r1, #32] \n\t" 1.18 ++#endif 1.19 + "lsl r3, r4, #8 \n\t" 1.20 + "orr r3, r3, r5, lsr #5 \n\t" 1.21 + "orr r3, r3, r6, lsr #19 \n\t" 1.22 + "subs %[count], %[count], #1 \n\t" 1.23 + "strh r3, [%[dst]], #2 \n\t" 1.24 + "bne 1b \n\t" 1.25 + "b 4f \n\t" 1.26 + "2: \n\t" 1.27 + "lsrs r7, r3, #24 \n\t" 1.28 + "beq 3f \n\t" 1.29 + "ldrh r4, [%[dst]] \n\t" 1.30 + "rsb r7, r7, #255 \n\t" 1.31 + "and r6, r4, #0x001f \n\t" 1.32 +-#if SK_ARM_ARCH == 6 1.33 ++#if SK_ARM_ARCH <= 6 1.34 + "lsl r5, r4, #21 \n\t" 1.35 + "lsr r5, r5, #26 \n\t" 1.36 + #else 1.37 + "ubfx r5, r4, #5, #6 \n\t" 1.38 + #endif 1.39 ++#ifdef SK_ARM_HAS_EDSP 1.40 + "pld [r0, #16] \n\t" 1.41 ++#endif 1.42 + "lsr r4, r4, #11 \n\t" 1.43 + #ifdef SK_ARM_HAS_EDSP 1.44 + "smulbb r6, r6, r7 \n\t" 1.45 + "smulbb r5, r5, r7 \n\t" 1.46 + "smulbb r4, r4, r7 \n\t" 1.47 + #else 1.48 + "mul r6, r6, r7 \n\t" 1.49 + "mul r5, r5, r7 \n\t" 1.50 + "mul r4, r4, r7 \n\t" 1.51 + #endif 1.52 ++#if SK_ARM_ARCH >= 6 1.53 + "uxtb r7, r3, ROR #16 \n\t" 1.54 + "uxtb ip, r3, ROR #8 \n\t" 1.55 ++#else 1.56 ++ "mov ip, #0xff \n\t" 1.57 ++ "and r7, ip, r3, ROR #16 \n\t" 1.58 ++ "and ip, ip, r3, ROR #8 \n\t" 1.59 ++#endif 1.60 + "and r3, r3, #0xff \n\t" 1.61 + "add r6, r6, #16 \n\t" 1.62 + "add r5, r5, #32 \n\t" 1.63 + "add r4, r4, #16 \n\t" 1.64 + "add r6, r6, r6, lsr #5 \n\t" 1.65 + "add r5, r5, r5, lsr #6 \n\t" 1.66 + "add r4, r4, r4, lsr #5 \n\t" 1.67 + "add r6, r7, r6, lsr #5 \n\t" 1.68 + "add r5, ip, r5, lsr #6 \n\t" 1.69 + "add r4, r3, r4, lsr #5 \n\t" 1.70 + "lsr r6, r6, #3 \n\t" 1.71 + "and r5, r5, #0xfc \n\t" 1.72 + "and r4, r4, #0xf8 \n\t" 1.73 + "orr r6, r6, r5, lsl #3 \n\t" 1.74 + "orr r4, r6, r4, lsl #8 \n\t" 1.75 + "strh r4, [%[dst]], #2 \n\t" 1.76 ++#ifdef SK_ARM_HAS_EDSP 1.77 + "pld [r1, #32] \n\t" 1.78 ++#endif 1.79 + "subs %[count], %[count], #1 \n\t" 1.80 + "bne 1b \n\t" 1.81 + "b 4f \n\t" 1.82 + "3: \n\t" 1.83 + "subs %[count], %[count], #1 \n\t" 1.84 + "add %[dst], %[dst], #2 \n\t" 1.85 + "bne 1b \n\t" 1.86 + "4: \n\t"