x11/pixman: fix a couple more altivec-related bugs for powerpc. The patch fixes a couple of bugs related to int32 / vector initialization, pointed out by the compiler. Now builds without warnings.diff -r1.83 -r1.84 pkgsrc/x11/pixman/Makefile
(he)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.83 2022/10/18 11:01:01 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.84 2022/10/19 17:14:32 he Exp $ | |
2 | 2 | |||
3 | DISTNAME= pixman-0.42.0 | 3 | DISTNAME= pixman-0.42.0 | |
4 | PKGREVISION= 1 | 4 | PKGREVISION= 2 | |
5 | CATEGORIES= x11 | 5 | CATEGORIES= x11 | |
6 | MASTER_SITES= ${MASTER_SITE_XORG:=lib/} | 6 | MASTER_SITES= ${MASTER_SITE_XORG:=lib/} | |
7 | EXTRACT_SUFX= .tar.xz | 7 | EXTRACT_SUFX= .tar.xz | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://xorg.freedesktop.org/ | 10 | HOMEPAGE= https://xorg.freedesktop.org/ | |
11 | COMMENT= Library of low-level pixel manipulation routines | 11 | COMMENT= Library of low-level pixel manipulation routines | |
12 | LICENSE= mit | 12 | LICENSE= mit | |
13 | 13 | |||
14 | CHECK_PORTABILITY_SKIP+= Makefile.am # already patched in Makefile.in | 14 | CHECK_PORTABILITY_SKIP+= Makefile.am # already patched in Makefile.in | |
15 | 15 | |||
16 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
17 | .if ${MACHINE_ARCH} == i386 | 17 | .if ${MACHINE_ARCH} == i386 |
@@ -1,8 +1,8 @@ | @@ -1,8 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.70 2022/10/18 12:53:09 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.71 2022/10/19 17:14:32 he Exp $ | |
2 | 2 | |||
3 | BLAKE2s (pixman-0.42.0.tar.xz) = 9846ec6a902afa54328b18a9a58cbdf7ad066aa69cbbfddb145b1475c6ad8899 | 3 | BLAKE2s (pixman-0.42.0.tar.xz) = 9846ec6a902afa54328b18a9a58cbdf7ad066aa69cbbfddb145b1475c6ad8899 | |
4 | SHA512 (pixman-0.42.0.tar.xz) = 43d43d1aef9b8a6167098ab68ce2cfd8c0429c4825d40a4fb468b5b51dc1a2035f8bd1b70413e4ecd77deb469b5d558f42171b423e348d5ddd8604c466ffc7d9 | 4 | SHA512 (pixman-0.42.0.tar.xz) = 43d43d1aef9b8a6167098ab68ce2cfd8c0429c4825d40a4fb468b5b51dc1a2035f8bd1b70413e4ecd77deb469b5d558f42171b423e348d5ddd8604c466ffc7d9 | |
5 | Size (pixman-0.42.0.tar.xz) = 652780 bytes | 5 | Size (pixman-0.42.0.tar.xz) = 652780 bytes | |
6 | SHA1 (patch-Makefile.in) = 244969af69e43472d43d8cd1556abacf9ec679e0 | 6 | SHA1 (patch-Makefile.in) = 244969af69e43472d43d8cd1556abacf9ec679e0 | |
7 | SHA1 (patch-configure) = 909bf50acfd69700b26bd55a47f93fd77b49226c | 7 | SHA1 (patch-configure) = 909bf50acfd69700b26bd55a47f93fd77b49226c | |
8 | SHA1 (patch-pixman_pixman-vmx.c) = 993dde53047d20102d17d10420940cf2210a2049 | 8 | SHA1 (patch-pixman_pixman-vmx.c) = 1139e520dbc7ea4066ab5f0b4d98345c87a37267 |
@@ -1,22 +1,56 @@ | @@ -1,22 +1,56 @@ | |||
1 | $NetBSD: patch-pixman_pixman-vmx.c,v 1.2 2022/10/18 12:53:10 wiz Exp $ | 1 | $NetBSD: patch-pixman_pixman-vmx.c,v 1.3 2022/10/19 17:14:32 he Exp $ | |
2 | 2 | |||
3 | Add a fix so that this builds on NetBSD/powerpc. Otherwise we get | 3 | Add a fix so that this builds on NetBSD/powerpc. Otherwise we get | |
4 | pixman-vmx.c:2936:5: error: subscripted value is neither array nor pointer | 4 | pixman-vmx.c:2936:5: error: subscripted value is neither array nor pointer | |
5 | Also fix something which clearly must be bugs with loading | |||
6 | vector registers from single 32-bit ints. | |||
7 | ||||
5 | https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/64/ | 8 | https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/64/ | |
6 | 9 | |||
7 | --- pixman/pixman-vmx.c.orig 2016-01-04 09:13:54.000000000 +0000 | 10 | --- pixman/pixman-vmx.c.orig 2016-01-04 09:13:54.000000000 +0000 | |
8 | +++ pixman/pixman-vmx.c | 11 | +++ pixman/pixman-vmx.c | |
9 | @@ -2913,32 +2913,29 @@ scaled_nearest_scanline_vmx_8888_8888_OV | 12 | @@ -2913,32 +2913,29 @@ scaled_nearest_scanline_vmx_8888_8888_OV | |
13 | @@ -292,7 +292,9 @@ create_mask_1x32_128 (const uint32_t *sr | |||
14 | static force_inline vector unsigned int | |||
15 | create_mask_32_128 (uint32_t mask) | |||
16 | { | |||
17 | - return create_mask_1x32_128(&mask); | |||
18 | + uint32_t nmask[4]; /* vector sized array */ | |||
19 | + nmask[3] = nmask[2] = nmask[1] = nmask[0] = mask; | |||
20 | + return create_mask_1x32_128(nmask); | |||
21 | } | |||
22 | ||||
23 | static force_inline vector unsigned int | |||
24 | @@ -2435,6 +2437,9 @@ vmx_fill (pixman_implementation_t *imp, | |||
25 | uint8_t *byte_line; | |||
26 | ||||
27 | vector unsigned int vfiller; | |||
28 | + uint32_t fillers[4]; | |||
29 | + | |||
30 | + fillers[3] = fillers[2] = fillers[1] = fillers[0] = filler; | |||
31 | ||||
32 | if (bpp == 8) | |||
33 | { | |||
34 | @@ -2471,7 +2476,7 @@ vmx_fill (pixman_implementation_t *imp, | |||
35 | return FALSE; | |||
36 | } | |||
37 | ||||
38 | - vfiller = create_mask_1x32_128(&filler); | |||
39 | + vfiller = create_mask_1x32_128(fillers); | |||
40 | ||||
41 | while (height--) | |||
42 | { | |||
43 | @@ -2913,32 +2918,29 @@ scaled_nearest_scanline_vmx_8888_8888_OV | |||
10 | 44 | |||
11 | while (w >= 4) | 45 | while (w >= 4) | |
12 | { | 46 | { | |
13 | - vector unsigned int tmp; | 47 | - vector unsigned int tmp; | |
14 | - uint32_t tmp1, tmp2, tmp3, tmp4; | 48 | - uint32_t tmp1, tmp2, tmp3, tmp4; | |
15 | + union { | 49 | + union { | |
16 | + vector unsigned int tmp; | 50 | + vector unsigned int tmp; | |
17 | + uint32_t tmp1[4]; | 51 | + uint32_t tmp1[4]; | |
18 | + } u; | 52 | + } u; | |
19 | 53 | |||
20 | - tmp1 = *(ps + pixman_fixed_to_int (vx)); | 54 | - tmp1 = *(ps + pixman_fixed_to_int (vx)); | |
21 | + u.tmp1[0] = *(ps + pixman_fixed_to_int (vx)); | 55 | + u.tmp1[0] = *(ps + pixman_fixed_to_int (vx)); | |
22 | vx += unit_x; | 56 | vx += unit_x; |