From a338761ba3f00928ff03e03e4a8cda939857d272 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Sun, 27 Dec 2009 00:27:53 +0200 Subject: [PATCH] ARM: Workaround for a NEON bug in assembler from binutils 2.18 The problem was reported as bug 25534 against pixman in freedesktop.org bugzila. Link to a patch for binutils: http://sourceware.org/ml/binutils/2008-03/msg00260.html For pixman the impact is a build failure when using binutils 2.18. Versions 2.19 and higer are fine. Still some distros may be using older versions of binutils and this is causing problems. This patch workarounds the problem by replacing a problematic "vmov a, b" instruction with equivalent "vorr a, b, b". Actually they even map to the same instruction opcode in the generated code, so the resulting binary is identical with and without patch. --- pixman/pixman-arm-neon-asm.S | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S index 2986884..40c8ec4 100644 --- a/pixman/pixman-arm-neon-asm.S +++ b/pixman/pixman-arm-neon-asm.S @@ -817,8 +817,8 @@ generate_composite_function \ vsli.u64 d0, d0, #8 vsli.u64 d0, d0, #16 vsli.u64 d0, d0, #32 - vmov d1, d0 - vmov q1, q0 + vorr d1, d0, d0 + vorr q1, q0, q0 .endm .macro pixman_composite_src_n_8_cleanup @@ -856,8 +856,8 @@ generate_composite_function \ vld1.32 {d0[0]}, [DUMMY] vsli.u64 d0, d0, #16 vsli.u64 d0, d0, #32 - vmov d1, d0 - vmov q1, q0 + vorr d1, d0, d0 + vorr q1, q0, q0 .endm .macro pixman_composite_src_n_0565_cleanup @@ -894,8 +894,8 @@ generate_composite_function \ add DUMMY, sp, #ARGS_STACK_OFFSET vld1.32 {d0[0]}, [DUMMY] vsli.u64 d0, d0, #32 - vmov d1, d0 - vmov q1, q0 + vorr d1, d0, d0 + vorr q1, q0, q0 .endm .macro pixman_composite_src_n_8888_cleanup -- 1.5.4.3