[Pixman] [PATCH] vmx: Fix scaled_nearest_scanline_vmx_8888_8888_OVER for GCC 4.5

Siarhei Siamashka siarhei.siamashka at gmail.com
Fri Apr 22 21:00:20 UTC 2016


Old versions of GCC refuse to compile the code:
pixman-vmx.c: In function 'scaled_nearest_scanline_vmx_8888_8888_OVER':
pixman-vmx.c:2936: error: subscripted value is neither array nor pointer
pixman-vmx.c:2937: error: subscripted value is neither array nor pointer
pixman-vmx.c:2938: error: subscripted value is neither array nor pointer
pixman-vmx.c:2939: error: subscripted value is neither array nor pointer

Tested with 'make check' on PS3 hardware (32-bit big endian) and also
using "qemu-ppc64le -cpu POWER8" (64-bit little endian).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94769
Reported-by: HÃ¥vard Eidnes <havard.eidnes at gmail.com>
Signed-off-by: Siarhei Siamashka <siarhei.siamashka at gmail.com>
---
 pixman/pixman-vmx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c
index 41efdcf..3e5a5c5 100644
--- a/pixman/pixman-vmx.c
+++ b/pixman/pixman-vmx.c
@@ -2933,10 +2933,7 @@ scaled_nearest_scanline_vmx_8888_8888_OVER (uint32_t*       pd,
 	while (vx >= 0)
 	    vx -= src_width_fixed;
 
-	tmp[0] = tmp1;
-	tmp[1] = tmp2;
-	tmp[2] = tmp3;
-	tmp[3] = tmp4;
+	tmp = (vector unsigned int){tmp1, tmp2, tmp3, tmp4};
 
 	vsrc = combine4 ((const uint32_t *) &tmp, pm);
 
-- 
2.4.10



More information about the Pixman mailing list