diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/networkmanager/APKBUILD | 4 | ||||
-rw-r--r-- | user/opal-utils/APKBUILD | 6 | ||||
-rw-r--r-- | user/opal-utils/opal-prd.patch | 2 | ||||
-rw-r--r-- | user/openttd/APKBUILD | 4 | ||||
-rw-r--r-- | user/orc/APKBUILD | 32 | ||||
-rw-r--r-- | user/orc/ppc-fixes.patch | 990 | ||||
-rw-r--r-- | user/papirus-icons/APKBUILD | 4 | ||||
-rw-r--r-- | user/polkit-qt-1/APKBUILD | 8 | ||||
-rw-r--r-- | user/py3-recommonmark/APKBUILD | 4 | ||||
-rw-r--r-- | user/py3-transitions/APKBUILD | 6 | ||||
-rw-r--r-- | user/recode/APKBUILD | 4 | ||||
-rw-r--r-- | user/rsibreak/APKBUILD | 4 | ||||
-rw-r--r-- | user/shared-mime-info/APKBUILD | 9 | ||||
-rw-r--r-- | user/squashfs-tools/0001-mksquashfs-fix-rare-race-in-fragment-waiting-in-file.patch | 60 | ||||
-rw-r--r-- | user/squashfs-tools/APKBUILD | 32 | ||||
-rw-r--r-- | user/squashfs-tools/CVE-2015-4645.patch | 29 | ||||
-rw-r--r-- | user/squashfs-tools/fix-compat.patch | 28 | ||||
-rw-r--r-- | user/squashfs-tools/vla-overlow.patch | 21 | ||||
-rw-r--r-- | user/upower/APKBUILD | 8 |
19 files changed, 1057 insertions, 198 deletions
diff --git a/user/networkmanager/APKBUILD b/user/networkmanager/APKBUILD index 0b1935ebe..6fb844bf9 100644 --- a/user/networkmanager/APKBUILD +++ b/user/networkmanager/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=networkmanager -pkgver=1.20.0 +pkgver=1.20.4 pkgrel=0 pkgdesc="Network management daemon" url="https://wiki.gnome.org/Projects/NetworkManager" @@ -90,7 +90,7 @@ openrc() { "$subpkgdir"/etc/NetworkManager/dispatcher.d/ } -sha512sums="825c56a7530d813ba7ea2ec57034def560f4b0fb65a09dc70cd94dc897e2aabde11f18c6c4843da9c520531683e963037ce42270a6ffa5c7c5e9502bb80bdf1b NetworkManager-1.20.0.tar.xz +sha512sums="d08f7e8f5ea8f8567834a53a68ff7aeff09839658b73dc17b31dbdd7dd5c36b09f4e563c2ebc52d1e1574a84163e66e0bfee01c3762a222aa7154d18c09660cb NetworkManager-1.20.4.tar.xz a849f8172b88370f48217e04f2fafb4431db32415df52af7d4a388f604f7d03c4c21b6ad37afb57e52700a38a7e78365025da99991bc8d179c73dabb31e05256 editline.patch 0006d9c538a72673746b6aede8c61e0b7a23b055f8276fa2dde6e70f8c00d60854cf49678c996764f83b40cf06c5c2cd24c8c382d900aaf97fc840342e29500f errno.patch 313e57823ffa49bd7b76355f8cea6932737ae4b38cb00eb183b12093a8109e079dc7439b2b35fa6bf9b83f2937729cca847a2bf31857382e9c3ae0b945c2dd6b musl.patch diff --git a/user/opal-utils/APKBUILD b/user/opal-utils/APKBUILD index d6eddcd70..f65d278ca 100644 --- a/user/opal-utils/APKBUILD +++ b/user/opal-utils/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=opal-utils -pkgver=6.3.1 +pkgver=6.5 pkgrel=0 pkgdesc="Tools for IBM FSP and OpenPOWER systems" url="https://lists.ozlabs.org/listinfo/skiboot" @@ -39,6 +39,6 @@ package() { done } -sha512sums="ad2156d864cedcf3d19e8ff094d12059703aaf9a5ea8403e230ecf33d331dae45e0f28a89c65ad05f94605e493bc8d42df92698847600810d5609bc56ade24b8 skiboot-6.3.1.tar.gz +sha512sums="f756307403ec49f24e5dbc06dbe8fe52898da27f2a0fa761164b1d85efd33dae8a8f96de3859eb7b11f85f43a790c9c213f9ebf0c7f4a859b590dcfb35e38571 skiboot-6.5.tar.gz e7480f16b6eb41fd65b40ea1f20031118030f24681b7b8afcfdebb8cde7625e45902683cfb5fe0af3259060fb1b92b9c2f5d62354de356e7706a7f08ad9f772e musl.patch -944dd564a2c846a675544c8ecdb2fa4714235f3fd974e135a71220379640f94883811399fe03d2d697fcb49e219504af264af0f201a6a7b37029687dea6a28cf opal-prd.patch" +692206f60727041c070c7f75eb66325607d00261e8dd7f47111fd59c7495c744ac356b0c94c6139c76bacbe403f1e9e6819f8bce2d13ac10d1cacc6e351cc25e opal-prd.patch" diff --git a/user/opal-utils/opal-prd.patch b/user/opal-utils/opal-prd.patch index 29b38cd43..90a23e333 100644 --- a/user/opal-utils/opal-prd.patch +++ b/user/opal-utils/opal-prd.patch @@ -1,6 +1,6 @@ --- skiboot-6.3.1/external/opal-prd/thunk.S.old 2019-05-10 06:50:45.000000000 +0000 +++ skiboot-6.3.1/external/opal-prd/thunk.S 2019-06-04 08:01:00.851806263 +0000 -@@ -1,4 +1,4 @@ +@@ -3,4 +3,4 @@ -#include <endian.h> +#define __BYTE_ORDER __BIG_ENDIAN #include <asm/unistd.h> diff --git a/user/openttd/APKBUILD b/user/openttd/APKBUILD index 026091d77..c5cf85a3a 100644 --- a/user/openttd/APKBUILD +++ b/user/openttd/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=openttd -pkgver=1.9.2 +pkgver=1.9.3 pkgrel=0 pkgdesc="Simulation game based on Transport Tycoon Deluxe" url="https://www.openttd.org/en/" @@ -28,4 +28,4 @@ package() { make install } -sha512sums="a84a219c049147e9566967f96a01c84dde587e38da37b34ef756da99a2d14f1d418492030098f63c4ac60cb0db553f474aaf3b8a00c8abfd98f66adc14f523e4 openttd-1.9.2-source.tar.xz" +sha512sums="e2208f730cf26c2df9b1950e885e20471060217dd47f2483db3f1cc86b40658d71208f27caab38a9fa513cfddb33c791a0972336dfa902a6d110ef246d936a34 openttd-1.9.3-source.tar.xz" diff --git a/user/orc/APKBUILD b/user/orc/APKBUILD index de40d3f31..fc760912f 100644 --- a/user/orc/APKBUILD +++ b/user/orc/APKBUILD @@ -2,37 +2,30 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=orc -pkgver=0.4.29 +pkgver=0.4.30 pkgrel=0 pkgdesc="The Oil Run-time Compiler" url="https://gstreamer.freedesktop.org/modules/orc.html" arch="all" license="BSD-2-Clause AND BSD-3-Clause" -makedepends="linux-headers" -subpackages="$pkgname-dev $pkgname-doc $pkgname-compiler" -source="https://gstreamer.freedesktop.org/src/orc/${pkgname}-${pkgver}.tar.xz" +makedepends="linux-headers meson ninja" +subpackages="$pkgname-dev $pkgname-compiler" +source="https://gstreamer.freedesktop.org/src/orc/${pkgname}-${pkgver}.tar.xz + ppc-fixes.patch + " build() { - cd "$builddir" - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --localstatedir=/var - make + meson -Dprefix=/usr \ + build + ninja -C build } check() { - cd "$builddir" - make check + ninja -C build test } package() { - cd "$builddir" - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" ninja -C build install } dev() { @@ -47,4 +40,5 @@ compiler() { mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } -sha512sums="57aa75bbefa9ba9ffcce97affd504c13c57612e2409863c011555bed6ff6ba224d38ed66b715bf103679a8ee28ddae427db3d78c7b4a2ddfa7dbd72a4fa81726 orc-0.4.29.tar.xz" +sha512sums="da254347f5ebb278f0932a7bfa878adc2a14c42c7e6a20a4e6bb68c0883e307fef57bef867d54e150bd1d875f79eee27f9d34aede410d3eddd4093e5b055cd22 orc-0.4.30.tar.xz +b049e4ab9e2ee71013cc1f387dfc24df97c25fcf72dd3fd0502d891ee5e1e305dd710a639839ac64f6a58383b18d49ccffd32645dc64255b15945920acaf56d6 ppc-fixes.patch" diff --git a/user/orc/ppc-fixes.patch b/user/orc/ppc-fixes.patch new file mode 100644 index 000000000..ab4aecd40 --- /dev/null +++ b/user/orc/ppc-fixes.patch @@ -0,0 +1,990 @@ +diff --git a/orc-test/orctest.c b/orc-test/orctest.c +index 614421b..d9cb9d5 100644 +--- a/orc-test/orctest.c ++++ b/orc-test/orctest.c +@@ -523,14 +523,14 @@ float_compare (OrcArray *array1, OrcArray *array2, int i, int j) + if (isnan(*(float *)ptr1) && isnan(*(float *)ptr2)) return TRUE; + if (*(float *)ptr1 == *(float *)ptr2) return TRUE; + if ((*(float *)ptr1 < 0.0) == (*(float *)ptr2 < 0.0) && +- abs((orc_int32)(*(orc_uint32 *)ptr1 - *(orc_uint32 *)ptr2) <= 2)) ++ abs((orc_int32)(*(orc_uint32 *)ptr1 - *(orc_uint32 *)ptr2)) <= 2) + return TRUE; + return FALSE; + case 8: + if (isnan(*(double *)ptr1) && isnan(*(double *)ptr2)) return TRUE; + if (*(double *)ptr1 == *(double *)ptr2) return TRUE; + if ((*(double *)ptr1 < 0.0) == (*(double *)ptr2 < 0.0) && +- llabs((orc_int64)(*(orc_uint64 *)ptr1 - *(orc_uint64 *)ptr2) <= 2)) ++ llabs((orc_int64)(*(orc_uint64 *)ptr1 - *(orc_uint64 *)ptr2)) <= 2) + return TRUE; + return FALSE; + } +diff --git a/orc/orcpowerpc.c b/orc/orcpowerpc.c +index e054d07..ed98437 100644 +--- a/orc/orcpowerpc.c ++++ b/orc/orcpowerpc.c +@@ -208,7 +208,7 @@ powerpc_emit_srawi (OrcCompiler *compiler, int regd, int rega, int shift, + powerpc_get_regname(regd), + powerpc_get_regname(rega), shift); + +- insn = (31<<26) | (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); ++ insn = (31<<26) | (powerpc_regnum (rega)<<21) | (powerpc_regnum (regd)<<16); + insn |= (shift<<11) | (824<<1) | record; + + powerpc_emit (compiler, insn); +@@ -233,7 +233,7 @@ powerpc_emit_D (OrcCompiler *compiler, const char *name, + ORC_ASM_CODE(compiler," %s %s, %s, %d\n", name, + powerpc_get_regname(regd), + powerpc_get_regname(rega), imm); +- insn |= (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); ++ insn |= (powerpc_regnum (rega)<<21) | (powerpc_regnum (regd)<<16); + insn |= imm&0xffff; + + powerpc_emit (compiler, insn); +@@ -543,7 +543,7 @@ powerpc_load_constant (OrcCompiler *p, int i, int reg) + { + unsigned int insn; + +- ORC_ASM_CODE(p," addi %s, %s, %db - %s\n", ++ ORC_ASM_CODE(p," addi %s, %s, %df - %s\n", + powerpc_get_regname(greg), + powerpc_get_regname(greg), p->constants[i].label, p->program->name); + insn = (14<<26) | (powerpc_regnum (greg)<<21) | (powerpc_regnum (greg)<<16); +@@ -740,3 +740,42 @@ void powerpc_emit_label (OrcCompiler *compiler, int label) + powerpc_add_label (compiler, compiler->codeptr, label); + } + ++void ++powerpc_load_align (OrcCompiler *compiler, int vector_reg, int offset_reg, int src_reg) ++{ ++ if (IS_POWERPC_BE (compiler)) { ++ ORC_ASM_CODE(compiler," lvsl %s, %s, %s\n", ++ powerpc_get_regname (vector_reg), ++ offset_reg == 0 ? "0" : powerpc_get_regname (offset_reg), ++ powerpc_get_regname (src_reg)); ++ powerpc_emit_X (compiler, 0x7c00000c, powerpc_regnum(vector_reg), ++ offset_reg == 0 ? 0 : powerpc_regnum(offset_reg), powerpc_regnum(src_reg)); ++ } else { ++ ORC_ASM_CODE(compiler," lvsr %s, %s, %s\n", ++ powerpc_get_regname (vector_reg), ++ offset_reg == 0 ? "0" : powerpc_get_regname (offset_reg), ++ powerpc_get_regname (src_reg)); ++ powerpc_emit_X (compiler, 0x7c00004c, powerpc_regnum(vector_reg), ++ offset_reg == 0 ? 0 : powerpc_regnum(offset_reg), powerpc_regnum(src_reg)); ++ } ++} ++ ++void ++powerpc_store_align (OrcCompiler *compiler, int vector_reg, int offset_reg, int src_reg) ++{ ++ if (IS_POWERPC_BE (compiler)) { ++ ORC_ASM_CODE(compiler," lvsr %s, %s, %s\n", ++ powerpc_get_regname (vector_reg), ++ offset_reg == 0 ? "0" : powerpc_get_regname (offset_reg), ++ powerpc_get_regname (src_reg)); ++ powerpc_emit_X (compiler, 0x7c00004c, powerpc_regnum(vector_reg), ++ offset_reg == 0 ? 0 : powerpc_regnum(offset_reg), powerpc_regnum(src_reg)); ++ } else { ++ ORC_ASM_CODE(compiler," lvsl %s, %s, %s\n", ++ powerpc_get_regname (vector_reg), ++ offset_reg == 0 ? "0" : powerpc_get_regname (offset_reg), ++ powerpc_get_regname (src_reg)); ++ powerpc_emit_X (compiler, 0x7c00000c, powerpc_regnum(vector_reg), ++ offset_reg == 0 ? 0 : powerpc_regnum(offset_reg), powerpc_regnum(src_reg)); ++ } ++} +diff --git a/orc/orcpowerpc.h b/orc/orcpowerpc.h +index e6b315a..ba824b2 100644 +--- a/orc/orcpowerpc.h ++++ b/orc/orcpowerpc.h +@@ -138,6 +138,9 @@ void powerpc_emit_full_constants (OrcCompiler* p); + void powerpc_emit_load_address (OrcCompiler* compiler, int regd, int rega, int imm); + void powerpc_load_constant (OrcCompiler* p, int i, int reg); + ++void powerpc_load_align (OrcCompiler *compiler, int vector_reg, int offset_reg, int src_reg); ++void powerpc_store_align (OrcCompiler *compiler, int vector_reg, int offset_reg, int src_reg); ++ + /* instructions */ + #define powerpc_emit_vand(p,a,b,c) powerpc_emit_VX_2 (p, "vand", 0x10000404, a, b, c) + #define powerpc_emit_vandc(p,a,b,c) powerpc_emit_VX_2 (p, "vandc", 0x10000444, a, b, c) +@@ -159,8 +162,10 @@ void powerpc_load_constant (OrcCompiler* p, int i, int reg); + + #define powerpc_emit_vmrghb(p,a,b,c) powerpc_emit_VX_2 (p, "vmrghb", 0x1000000c, a, b, c) + #define powerpc_emit_vmrghh(p,a,b,c) powerpc_emit_VX_2 (p, "vmrghh", 0x1000004c, a, b, c) ++#define powerpc_emit_vmrghw(p,a,b,c) powerpc_emit_VX_2 (p, "vmrghw", 0x1000008c, a, b, c) + #define powerpc_emit_vmrglb(p,a,b,c) powerpc_emit_VX_2 (p, "vmrglb", 0x1000010c, a, b, c) + #define powerpc_emit_vmrglh(p,a,b,c) powerpc_emit_VX_2 (p, "vmrglh", 0x1000014c, a, b, c) ++#define powerpc_emit_vmrglw(p,a,b,c) powerpc_emit_VX_2 (p, "vmrglw", 0x1000018c, a, b, c) + + #define powerpc_emit_vpkshss(p,a,b,c) powerpc_emit_VX_2 (p, "vpkshss", 0x1000018e, a, b, c) + #define powerpc_emit_vpkshus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkshus", 0x1000010e, a, b, c) +diff --git a/orc/orcprogram-altivec.c b/orc/orcprogram-altivec.c +index 659115e..808b4e1 100644 +--- a/orc/orcprogram-altivec.c ++++ b/orc/orcprogram-altivec.c +@@ -18,6 +18,8 @@ static void orc_compiler_powerpc_init (OrcCompiler *compiler); + static unsigned int orc_compiler_powerpc_get_default_flags (void); + static void orc_compiler_powerpc_assemble (OrcCompiler *compiler); + static const char* powerpc_get_flag_name (int shift); ++static int orc_powerpc_assemble_copy_check (OrcCompiler *compiler); ++static void orc_powerpc_assemble_copy (OrcCompiler *compiler); + + + static void +@@ -199,8 +201,8 @@ powerpc_load_constants_outer (OrcCompiler *compiler) + } + } + +- orc_compiler_emit_invariants (compiler); +- ++ /* Load constants first, as they may be used by invariants */ ++ ORC_ASM_CODE(compiler,"# load constants\n"); + for(i=0;i<compiler->n_constants;i++) { + if (compiler->constants[i].is_long && + !compiler->constants[i].alloc_reg) { +@@ -212,6 +214,9 @@ powerpc_load_constants_outer (OrcCompiler *compiler) + } + } + } ++ ++ ORC_ASM_CODE(compiler,"# load invariants\n"); ++ orc_compiler_emit_invariants (compiler); + } + + static void +@@ -219,6 +224,7 @@ powerpc_load_inner_constants (OrcCompiler *compiler) + { + int i; + ++ ORC_ASM_CODE(compiler,"# load inner constants\n"); + for(i=0;i<ORC_N_COMPILER_VARIABLES;i++){ + if (compiler->vars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { +@@ -305,6 +311,11 @@ orc_compiler_powerpc_assemble (OrcCompiler *compiler) + int label_leave; + int set_vscr = FALSE; + ++ if (orc_powerpc_assemble_copy_check (compiler)) { ++ orc_powerpc_assemble_copy (compiler); ++ return; ++ } ++ + label_outer_loop_start = orc_compiler_label_new (compiler); + label_loop_start = orc_compiler_label_new (compiler); + label_leave = orc_compiler_label_new (compiler); +@@ -312,6 +323,8 @@ orc_compiler_powerpc_assemble (OrcCompiler *compiler) + { + int i; + ++ /* Emit invariants also to check for constants */ ++ orc_compiler_emit_invariants (compiler); + orc_powerpc_emit_loop (compiler, 0); + + compiler->codeptr = compiler->code; +@@ -486,3 +499,199 @@ orc_compiler_powerpc_assemble (OrcCompiler *compiler) + powerpc_do_fixups (compiler); + } + ++static ++int orc_powerpc_assemble_copy_check (OrcCompiler *compiler) ++{ ++ if (compiler->program->n_insns == 1 && ++ compiler->program->is_2d == FALSE && ++ (strcmp (compiler->program->insns[0].opcode->name, "copyb") == 0 || ++ strcmp (compiler->program->insns[0].opcode->name, "copyw") == 0 || ++ strcmp (compiler->program->insns[0].opcode->name, "copyl") == 0 || ++ strcmp (compiler->program->insns[0].opcode->name, "copyq") == 0) && ++ (compiler->program->insns[0].flags & ++ (ORC_INSTRUCTION_FLAG_X2 | ORC_INSTRUCTION_FLAG_X4)) == 0 && ++ compiler->program->n_param_vars == 0 && ++ compiler->program->n_const_vars == 0) { ++ /* TODO: add param & const support if this turns out to be faster */ ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ ++static ++void orc_powerpc_assemply_copy_loop (OrcCompiler *compiler, int size, ++ int shift, int next_label) ++{ ++ const int src = POWERPC_R5; ++ const int dst = POWERPC_R6; ++ const int count = POWERPC_R7; ++ const int tmp = POWERPC_R0; ++ const int vtmp = POWERPC_V0; ++ const int vperm = POWERPC_V1; ++ int label_copy; ++ ++ label_copy = orc_compiler_label_new (compiler); ++ ++ ORC_ASM_CODE(compiler," cmplwi %s, %d\n", ++ powerpc_get_regname(count), size); ++ powerpc_emit(compiler, 0x28000000|(powerpc_regnum(count)<<16)|(size&0xffff)); ++ ++ ORC_ASM_CODE(compiler," blt %d%c\n", next_label, ++ (compiler->labels[next_label]!=NULL) ? 'b' : 'f'); ++ powerpc_add_fixup (compiler, 0, compiler->codeptr, next_label); ++ powerpc_emit (compiler, 0x41800000); ++ ++ powerpc_emit_D(compiler, "andi.", 0x70000000, tmp, src, size-1); ++ ORC_ASM_CODE(compiler," bgt %d%c\n", next_label, ++ (compiler->labels[next_label]!=NULL) ? 'b' : 'f'); ++ powerpc_add_fixup (compiler, 0, compiler->codeptr, next_label); ++ powerpc_emit (compiler, 0x41810000); ++ ++ powerpc_emit_D(compiler, "andi.", 0x70000000, tmp, dst, size-1); ++ ORC_ASM_CODE(compiler," bgt %d%c\n", next_label, ++ (compiler->labels[next_label]!=NULL) ? 'b' : 'f'); ++ powerpc_add_fixup (compiler, 0, compiler->codeptr, next_label); ++ powerpc_emit (compiler, 0x41810000); ++ ++ powerpc_emit_srawi (compiler, tmp, count, shift, 0); ++ ++ ORC_ASM_CODE (compiler, " mtctr %s\n", powerpc_get_regname(tmp)); ++ powerpc_emit (compiler, 0x7c0903a6 | (powerpc_regnum (tmp)<<21)); ++ ++ powerpc_emit_label (compiler, label_copy); ++ if (size == 16) { ++ ORC_ASM_CODE(compiler," lvx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (src)); ++ powerpc_emit_X (compiler, 0x7c0000ce, powerpc_regnum(vtmp), ++ 0, powerpc_regnum(src)); ++ ORC_ASM_CODE(compiler," stvx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (dst)); ++ powerpc_emit_X (compiler, 0x7c0001ce, ++ powerpc_regnum(vtmp), ++ 0, powerpc_regnum(dst)); ++ } else { ++ switch (size) { ++ case 1: ++ ORC_ASM_CODE(compiler," lvebx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (src)); ++ powerpc_emit_X (compiler, 0x7c00000e, powerpc_regnum(vtmp), ++ 0, powerpc_regnum(src)); ++ break; ++ case 2: ++ ORC_ASM_CODE(compiler," lvehx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (src)); ++ powerpc_emit_X (compiler, 0x7c00004e, powerpc_regnum(vtmp), ++ 0, powerpc_regnum(src)); ++ break; ++ case 4: ++ ORC_ASM_CODE(compiler," lvewx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (src)); ++ powerpc_emit_X (compiler, 0x7c00008e, powerpc_regnum(vtmp), ++ 0, powerpc_regnum(src)); ++ break; ++ } ++ powerpc_load_align (compiler, vperm, 0, src); ++ powerpc_emit_vperm (compiler, vtmp, vtmp, vtmp, vperm); ++ powerpc_store_align (compiler, vperm, 0, dst); ++ powerpc_emit_vperm (compiler, vtmp, vtmp, vtmp, vperm); ++ switch (size) { ++ case 1: ++ ORC_ASM_CODE(compiler," stvebx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (dst)); ++ powerpc_emit_X (compiler, 0x7c00010e, ++ powerpc_regnum(vtmp), ++ 0, powerpc_regnum(dst)); ++ break; ++ case 2: ++ ORC_ASM_CODE(compiler," stvehx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (dst)); ++ powerpc_emit_X (compiler, 0x7c00014e, ++ powerpc_regnum(vtmp), ++ 0, powerpc_regnum(dst)); ++ break; ++ case 4: ++ ORC_ASM_CODE(compiler," stvewx %s, 0, %s\n", ++ powerpc_get_regname (vtmp), ++ powerpc_get_regname (dst)); ++ powerpc_emit_X (compiler, 0x7c00018e, ++ powerpc_regnum(vtmp), ++ 0, powerpc_regnum(dst)); ++ break; ++ } ++ } ++ ++ powerpc_emit_addi (compiler, src, src, size); ++ powerpc_emit_addi (compiler, dst, dst, size); ++ powerpc_emit_addi (compiler, count, count, -size); ++ powerpc_emit_bne (compiler, label_copy); ++ ++ powerpc_emit_label (compiler, next_label); ++} ++ ++static ++void orc_powerpc_assemble_copy (OrcCompiler *compiler) ++{ ++ const int src = POWERPC_R5; ++ const int dst = POWERPC_R6; ++ const int count = POWERPC_V7; ++ OrcInstruction *insn; ++ int shift = 0; ++ int label_word; ++ int label_halfword; ++ int label_byte; ++ int label_done; ++ ++ insn = compiler->program->insns + 0; ++ ++ if (strcmp (insn->opcode->name, "copyw") == 0) { ++ shift = 1; ++ } else if (strcmp (insn->opcode->name, "copyl") == 0) { ++ shift = 2; ++ } else if (strcmp (insn->opcode->name, "copyq") == 0) { ++ shift = 3; ++ } ++ ++ label_word = orc_compiler_label_new (compiler); ++ label_halfword = orc_compiler_label_new (compiler); ++ label_byte = orc_compiler_label_new (compiler); ++ label_done = orc_compiler_label_new (compiler); ++ ++ powerpc_emit_prologue (compiler); ++ ++ powerpc_emit_load_address (compiler, ++ dst, ++ POWERPC_R3, ++ (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[insn->dest_args[0]])); ++ powerpc_emit_load_address (compiler, ++ src, ++ POWERPC_R3, ++ (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[insn->src_args[0]])); ++ powerpc_emit_lwz (compiler, count, POWERPC_R3, ++ (int)ORC_STRUCT_OFFSET(OrcExecutor, n)); ++ ++ powerpc_emit_addi (compiler, POWERPC_R0, 0, shift); ++ ORC_ASM_CODE(compiler, " slw %s, %s, %s\n", ++ powerpc_get_regname(count), ++ powerpc_get_regname(count), ++ powerpc_get_regname(POWERPC_R0)); ++ powerpc_emit (compiler, (31<<26) | ++ (powerpc_regnum (count)<<21) | ++ (powerpc_regnum (count)<<16) | ++ (powerpc_regnum (POWERPC_R0)<<11) | (24<<1)); ++ ++ orc_powerpc_assemply_copy_loop (compiler, 16, 4, label_word); ++ orc_powerpc_assemply_copy_loop (compiler, 4, 2, label_halfword); ++ orc_powerpc_assemply_copy_loop (compiler, 2, 1, label_byte); ++ orc_powerpc_assemply_copy_loop (compiler, 1, 0, label_done); ++ ++ powerpc_emit_epilogue (compiler); ++ powerpc_do_fixups (compiler); ++} +diff --git a/orc/orcrules-altivec.c b/orc/orcrules-altivec.c +index fa40ac3..7729b69 100644 +--- a/orc/orcrules-altivec.c ++++ b/orc/orcrules-altivec.c +@@ -15,26 +15,6 @@ + + /* rules */ + +-static void +-powerpc_load_align (OrcCompiler *compiler, int vector_reg, int offset_reg, int src_reg) +-{ +- if (IS_POWERPC_BE (compiler)) { +- ORC_ASM_CODE(compiler," lvsl %s, %s, %s\n", +- powerpc_get_regname (vector_reg), +- offset_reg == 0 ? "0" : powerpc_get_regname (offset_reg), +- powerpc_get_regname (src_reg)); +- powerpc_emit_X (compiler, 0x7c00000c, powerpc_regnum(vector_reg), +- offset_reg == 0 ? 0 : powerpc_regnum(offset_reg), powerpc_regnum(src_reg)); +- } else { +- ORC_ASM_CODE(compiler," lvsr %s, %s, %s\n", +- powerpc_get_regname (vector_reg), +- offset_reg == 0 ? "0" : powerpc_get_regname (offset_reg), +- powerpc_get_regname (src_reg)); +- powerpc_emit_X (compiler, 0x7c00004c, powerpc_regnum(vector_reg), +- offset_reg == 0 ? 0 : powerpc_regnum(offset_reg), powerpc_regnum(src_reg)); +- } +-} +- + static inline int + powerpc_select_value (OrcCompiler *compiler, int be_value, int le_value) + { +@@ -322,19 +302,7 @@ powerpc_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) + int perm = orc_compiler_get_temp_reg (compiler); + int tmp = orc_compiler_get_temp_reg (compiler); + +- if (IS_POWERPC_BE (compiler)) { +- ORC_ASM_CODE(compiler," lvsr %s, 0, %s\n", +- powerpc_get_regname (perm), +- powerpc_get_regname (dest->ptr_register)); +- powerpc_emit_X (compiler, 0x7c00004c, powerpc_regnum(perm), +- 0, powerpc_regnum(dest->ptr_register)); +- } else { +- ORC_ASM_CODE(compiler," lvsl %s, 0, %s\n", +- powerpc_get_regname (perm), +- powerpc_get_regname (dest->ptr_register)); +- powerpc_emit_X (compiler, 0x7c00000c, powerpc_regnum(perm), +- 0, powerpc_regnum(dest->ptr_register)); +- } ++ powerpc_store_align (compiler, perm, 0, dest->ptr_register); + powerpc_emit_vperm (compiler, tmp, src->alloc, src->alloc, perm); + + switch (size) { +@@ -370,8 +338,7 @@ powerpc_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) + powerpc_regnum(tmp), + 0, powerpc_regnum(dest->ptr_register)); + +- powerpc_emit_D (compiler, "addi", 0x38000000, compiler->gp_tmpreg, +- 0, 4); ++ powerpc_emit_addi (compiler, compiler->gp_tmpreg, 0, 4); + + ORC_ASM_CODE(compiler," stvewx %s, %s, %s\n", + powerpc_get_regname (tmp), +@@ -397,6 +364,48 @@ powerpc_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) + } + } + ++static void ++powerpc_denormalize_sp_full(OrcCompiler *p, int reg, int zero, int mask) ++{ ++ int tmp = p->tmpreg; ++ powerpc_emit_VX_2(p, "xxland", 0xf0000417, tmp, reg, mask); ++ powerpc_emit_VX_2(p, "vcmpequw", 0x10000086, tmp, tmp, zero); ++ powerpc_emit_VA(p, "xxsel", 0xf000003f, tmp, reg, zero, tmp); ++ powerpc_emit_VX_2(p, "xvcpsgnsp", 0xf0000687, reg, reg, tmp); ++} ++ ++static void ++powerpc_denormalize_sp_zero(OrcCompiler *p, int reg, int zero) ++{ ++ int mask = powerpc_get_constant_full (p, 0x7f800000, 0x7f800000, ++ 0x7f800000, 0x7f800000); ++ powerpc_denormalize_sp_full(p, reg, zero, mask); ++} ++ ++static void ++powerpc_denormalize_sp(OrcCompiler *p, int reg) ++{ ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ powerpc_denormalize_sp_zero(p, reg, zero); ++} ++ ++static void ++powerpc_denormalize_dp_full(OrcCompiler *p, int reg, int zero, int mask) ++{ ++ int tmp = p->tmpreg; ++ powerpc_emit_VX_2(p, "xxland", 0xf0000417, tmp, reg, mask); ++ powerpc_emit_VX_2(p, "vcmpequd", 0x100000c7, tmp, tmp, zero); ++ powerpc_emit_VA(p, "xxsel", 0xf000003f, tmp, reg, zero, tmp); ++ powerpc_emit_VX_2(p, "xvcpsgndp", 0xf0000787, reg, reg, tmp); ++} ++ ++static void ++powerpc_denormalize_dp_zero(OrcCompiler *p, int reg, int zero) ++{ ++ int mask = powerpc_get_constant_full (p, 0x7ff00000, 0x00000000, ++ 0x7ff00000, 0x00000000); ++ powerpc_denormalize_dp_full(p, reg, zero, mask); ++} + + + #define RULE(name, opcode, code) \ +@@ -409,6 +418,33 @@ powerpc_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ + powerpc_emit_VX_2 (p, opcode, code , dest, src1, src2);\ + } + ++#define RULE_DP(name, opcode, code) \ ++static void \ ++powerpc_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ ++{ \ ++ int src1 = ORC_SRC_ARG (p, insn, 0); \ ++ int src2 = ORC_SRC_ARG (p, insn, 1); \ ++ int dest = ORC_DEST_ARG (p, insn, 0); \ ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); \ ++ powerpc_denormalize_dp_zero (p, src1, zero); \ ++ powerpc_denormalize_dp_zero (p, src2, zero); \ ++ powerpc_emit_VX_2 (p, opcode, code , dest, src1, src2); \ ++ powerpc_denormalize_dp_zero (p, dest, zero); \ ++} ++ ++#define RULE_DP_SRC(name, opcode, code) \ ++static void \ ++powerpc_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ ++{ \ ++ int src1 = ORC_SRC_ARG (p, insn, 0); \ ++ int src2 = ORC_SRC_ARG (p, insn, 1); \ ++ int dest = ORC_DEST_ARG (p, insn, 0); \ ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); \ ++ powerpc_denormalize_dp_zero (p, src1, zero); \ ++ powerpc_denormalize_dp_zero (p, src2, zero); \ ++ powerpc_emit_VX_2 (p, opcode, code , dest, src1, src2); \ ++} ++ + #define RULE_SHIFT(name, opcode, code) \ + static void \ + powerpc_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +@@ -503,13 +539,11 @@ RULE(maxf, "vmaxfp", 0x1000040a) + RULE(minf, "vminfp", 0x1000044a) + RULE(cmpeqf, "vcmpeqfp", 0x100000c6) + +-RULE(addd, "xvadddp", 0xf0000307) +-RULE(subd, "xvsubdp", 0xf0000347) +-RULE(muld, "xvmuldp", 0xf0000387) +-RULE(divd, "xvdivdp", 0xf00003c7) +-RULE(mind, "xvmindp", 0xf0000747) +-RULE(maxd, "xvmaxdp", 0xf0000707) +-RULE(cmpeqd, "xvcmpeqdp", 0xf000031f) ++RULE_DP(addd, "xvadddp", 0xf0000307) ++RULE_DP(subd, "xvsubdp", 0xf0000347) ++RULE_DP(muld, "xvmuldp", 0xf0000387) ++RULE_DP(divd, "xvdivdp", 0xf00003c7) ++RULE_DP_SRC(cmpeqd, "xvcmpeqdp", 0xf000031f) + + RULE(addq, "vaddudm", 0x100000c0) + RULE(subq, "vsubudm", 0x100004c0) +@@ -541,13 +575,12 @@ powerpc_rule_mullb (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int perm = powerpc_get_constant_full(p, 0x11011303, 0x15051707, ++ 0x19091b0b, 0x1d0d1f0f); + +- if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmulesb (p, dest, src1, src2); +- powerpc_emit_vsldoi (p, dest, dest, dest, 1); +- } else { +- powerpc_emit_vmulosb (p, dest, src1, src2); +- } ++ powerpc_emit_vmulesb (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmulosb (p, dest, src1, src2); ++ powerpc_emit_vperm(p, dest, dest, p->tmpreg, perm); + } + + static void +@@ -556,15 +589,12 @@ powerpc_rule_mulhsb (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int perm = powerpc_get_constant_full(p, 0x10001202, 0x14041606, ++ 0x18081a0a, 0x1c0c1e0e); + +- if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmulesb (p, dest, src1, src2); +- } else { +- int tmp = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 8); +- +- powerpc_emit_vmulosb (p, dest, src1, src2); +- powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, src1, tmp); +- } ++ powerpc_emit_vmulesb (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmulosb (p, dest, src1, src2); ++ powerpc_emit_vperm(p, dest, dest, p->tmpreg, perm); + } + + static void +@@ -573,15 +603,12 @@ powerpc_rule_mulhub (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int perm = powerpc_get_constant_full(p, 0x10001202, 0x14041606, ++ 0x18081a0a, 0x1c0c1e0e); + +- if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmuleub (p, dest, src1, src2); +- } else { +- int tmp = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 8); +- +- powerpc_emit_vmuloub (p, dest, src1, src2); +- powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, dest, tmp); +- } ++ powerpc_emit_vmuleub (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmuloub (p, dest, src1, src2); ++ powerpc_emit_vperm(p, dest, dest, p->tmpreg, perm); + } + + static void +@@ -590,16 +617,12 @@ powerpc_rule_mulhsw (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int perm = powerpc_get_constant_full(p, 0x10110001, 0x14150405, ++ 0x18190809, 0x1c1d0c0d); + +- if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmulesh (p, dest, src1, src2); +- } else { +- int tmp = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 8); +- +- powerpc_emit_vmulosh (p, dest, src1, src2); +- powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, dest, tmp); +- powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, dest, tmp); +- } ++ powerpc_emit_vmulesh (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmulosh (p, dest, src1, src2); ++ powerpc_emit_vperm(p, dest, dest, p->tmpreg, perm); + } + + static void +@@ -608,16 +631,12 @@ powerpc_rule_mulhuw (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int perm = powerpc_get_constant_full(p, 0x10110001, 0x14150405, ++ 0x18190809, 0x1c1d0c0d); + +- if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmuleuh (p, dest, src1, src2); +- } else { +- int tmp = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 8); +- +- powerpc_emit_vmulouh (p, dest, src1, src2); +- powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, dest, tmp); +- powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, dest, tmp); +- } ++ powerpc_emit_vmuleuh(p, p->tmpreg, src1, src2); ++ powerpc_emit_vmulouh(p, dest, src1, src2); ++ powerpc_emit_vperm(p, dest, dest, p->tmpreg, perm); + } + + static void +@@ -765,10 +784,12 @@ powerpc_rule_mulsbw (OrcCompiler *p, void *user, OrcInstruction *insn) + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + ++ powerpc_emit_vmulesb (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmulosb (p, dest, src1, src2); + if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmulesb (p, dest, src1, src2); ++ powerpc_emit_vmrghh (p, dest, p->tmpreg, dest); + } else { +- powerpc_emit_vmulosb (p, dest, src1, src2); ++ powerpc_emit_vmrglh (p, dest, p->tmpreg, dest); + } + } + +@@ -779,10 +800,12 @@ powerpc_rule_mulubw (OrcCompiler *p, void *user, OrcInstruction *insn) + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + ++ powerpc_emit_vmuleub (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmuloub (p, dest, src1, src2); + if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmuleub (p, dest, src1, src2); ++ powerpc_emit_vmrghh (p, dest, p->tmpreg, dest); + } else { +- powerpc_emit_vmuloub (p, dest, src1, src2); ++ powerpc_emit_vmrglh (p, dest, p->tmpreg, dest); + } + } + +@@ -793,10 +816,12 @@ powerpc_rule_mulswl (OrcCompiler *p, void *user, OrcInstruction *insn) + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + ++ powerpc_emit_vmulesh (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmulosh (p, dest, src1, src2); + if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmulesh (p, dest, src1, src2); ++ powerpc_emit_vmrghw (p, dest, p->tmpreg, dest); + } else { +- powerpc_emit_vmulosh (p, dest, src1, src2); ++ powerpc_emit_vmrglw (p, dest, p->tmpreg, dest); + } + } + +@@ -807,10 +832,12 @@ powerpc_rule_muluwl (OrcCompiler *p, void *user, OrcInstruction *insn) + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + ++ powerpc_emit_vmuleuh (p, p->tmpreg, src1, src2); ++ powerpc_emit_vmulouh (p, dest, src1, src2); + if (IS_POWERPC_BE (p)) { +- powerpc_emit_vmuleuh (p, dest, src1, src2); ++ powerpc_emit_vmrghw (p, dest, p->tmpreg, dest); + } else { +- powerpc_emit_vmulouh (p, dest, src1, src2); ++ powerpc_emit_vmrglw (p, dest, p->tmpreg, dest); + } + } + +@@ -848,17 +875,13 @@ powerpc_rule_mulll (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int tmp = orc_compiler_get_temp_reg(p); ++ int perm = powerpc_get_constant_full(p, 0x14151617, 0x04050607, ++ 0x1c1d1e1f, 0x0c0d0e0f); + +- if (IS_POWERPC_BE (p)) { +- int perm; +- +- powerpc_emit_vmuleuw (p, dest, src1, src2); +- perm = powerpc_get_constant_full (p, 0x04050607, 0x04050607, +- 0x0c0d0e0f, 0x0c0d0e0f); +- powerpc_emit_vperm (p, dest, dest, dest, perm); +- } else { +- powerpc_emit_vmulouw (p, dest, src1, src2); +- } ++ powerpc_emit_vmulouw (p, tmp, src1, src2); ++ powerpc_emit_vmuleuw (p, dest, src1, src2); ++ powerpc_emit_vperm (p, dest, tmp, dest, perm); + } + + static void +@@ -1428,20 +1451,11 @@ powerpc_rule_divf (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); +- int y = orc_compiler_get_temp_reg (p); +- int t = orc_compiler_get_temp_reg (p); +- int c1; +- int c0; +- +- c1 = powerpc_get_constant (p, ORC_CONST_SPLAT_L, 0x3f800000); /* 1.0 */ +- +- powerpc_emit_VX_db (p, "vrefp", 0x1000010a, y, src2); +- +- powerpc_emit_VA_acb (p, "vnmsubfp", 0x1000002f, t, y, c1, src2); +- powerpc_emit_VA_acb (p, "vmaddfp", 0x1000002e, y, y, y, t); +- +- c0 = powerpc_get_constant (p, ORC_CONST_SPLAT_L, 0x00000000); /* 0.0 */ +- powerpc_emit_VA_acb (p, "vmaddfp", 0x1000002e, dest, y, c0, src1); ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ powerpc_denormalize_sp_zero (p, src1, zero); ++ powerpc_denormalize_sp_zero (p, src2, zero); ++ powerpc_emit_VX_2(p, "xvdivsp", 0xf00002c7, dest, src1, src2); ++ powerpc_denormalize_sp_zero (p, dest, zero); + } + + static void +@@ -1521,8 +1535,10 @@ powerpc_rule_sqrtf(OrcCompiler* p, void* user, OrcInstruction* insn) + { + int src1 = ORC_SRC_ARG(p, insn, 0); + int dest = ORC_DEST_ARG(p, insn, 0); +- ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ powerpc_denormalize_sp_zero (p, src1, zero); + powerpc_emit_VX_db(p, "xvsqrtsp", 0xf000022f, dest, src1); ++ powerpc_denormalize_sp_zero (p, dest, zero); + } + + static void +@@ -1530,18 +1546,65 @@ powerpc_rule_sqrtd(OrcCompiler* p, void* user, OrcInstruction* insn) + { + int src1 = ORC_SRC_ARG(p, insn, 0); + int dest = ORC_DEST_ARG(p, insn, 0); +- ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ powerpc_denormalize_dp_zero (p, src1, zero); + powerpc_emit_VX_db(p, "xvsqrtdp", 0xf000032f, dest, src1); ++ powerpc_denormalize_dp_zero (p, dest, zero); + } + + static void +-powerpc_rule_cmpltd (OrcCompiler *p, void *user, OrcInstruction *insn) ++powerpc_rule_mind (OrcCompiler *p, void *user, OrcInstruction *insn) + { + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ int mask = powerpc_get_constant_full (p, 0x7ff80000, 0x00000000, ++ 0x7ff80000, 0x00000000); ++ int tmp2 = orc_compiler_get_temp_reg(p); ++ int tmp = p->tmpreg; ++ powerpc_denormalize_dp_zero (p, src1, zero); ++ powerpc_denormalize_dp_zero (p, src2, zero); ++ powerpc_emit_VX_2(p, "xvmindp", 0xf0000747, tmp2, src2, src1); ++ // Handle QNaN ++ powerpc_emit_VX_2(p, "xxland", 0xf0000417, tmp, src1, mask); ++ powerpc_emit_VX_2(p, "vcmpequd", 0x100000c7, tmp, tmp, mask); ++ powerpc_emit_VA(p, "xxsel", 0xf000003f, dest, tmp2, src1, tmp); ++} + +-// powerpc_emit_VXR (p, "vcmpgtfp", 0x100002c6, dest, src2, src1, FALSE); ++static void ++powerpc_rule_maxd (OrcCompiler *p, void *user, OrcInstruction *insn) ++{ ++ int src1 = ORC_SRC_ARG (p, insn, 0); ++ int src2 = ORC_SRC_ARG (p, insn, 1); ++ int dest = ORC_DEST_ARG (p, insn, 0); ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ int mask = powerpc_get_constant_full (p, 0x7ff80000, 0x00000000, ++ 0x7ff80000, 0x00000000); ++ int tmp2 = orc_compiler_get_temp_reg(p); ++ int tmp3 = orc_compiler_get_temp_reg(p); ++ int tmp = p->tmpreg; ++ powerpc_denormalize_dp_zero (p, src1, zero); ++ powerpc_denormalize_dp_zero (p, src2, zero); ++ powerpc_emit_VX_2(p, "xvmaxdp", 0xf0000707, tmp2, src2, src1); ++ // Handle QNaN ++ powerpc_emit_VX_2(p, "xxland", 0xf0000417, tmp, src2, mask); ++ powerpc_emit_VX_2(p, "vcmpequd", 0x100000c7, tmp, tmp, mask); ++ powerpc_emit_VA(p, "xxsel", 0xf000003f, tmp3, tmp2, src2, tmp); ++ powerpc_emit_VX_2(p, "xxland", 0xf0000417, tmp, src1, mask); ++ powerpc_emit_VX_2(p, "vcmpequd", 0x100000c7, tmp, tmp, mask); ++ powerpc_emit_VA(p, "xxsel", 0xf000003f, dest, tmp3, src1, tmp); ++} ++ ++static void ++powerpc_rule_cmpltd (OrcCompiler *p, void *user, OrcInstruction *insn) ++{ ++ int src1 = ORC_SRC_ARG (p, insn, 0); ++ int src2 = ORC_SRC_ARG (p, insn, 1); ++ int dest = ORC_DEST_ARG (p, insn, 0); ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ powerpc_denormalize_dp_zero (p, src1, zero); ++ powerpc_denormalize_dp_zero (p, src2, zero); + powerpc_emit_VX_2(p, "xvcmpgtdp", 0xf000035f, dest, src2, src1); + } + +@@ -1551,8 +1614,9 @@ powerpc_rule_cmpled (OrcCompiler *p, void *user, OrcInstruction *insn) + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); +- +-// powerpc_emit_VXR (p, "vcmpgefp", 0x100001c6, dest, src2, src1, FALSE); ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ powerpc_denormalize_dp_zero (p, src1, zero); ++ powerpc_denormalize_dp_zero (p, src2, zero); + powerpc_emit_VX_2(p, "xvcmpgedp", 0xf000039f, dest, src2, src1); + } + +@@ -1561,11 +1625,13 @@ powerpc_rule_convld (OrcCompiler *p, void *user, OrcInstruction *insn) + { + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); + + if (IS_POWERPC_LE (p)) { + powerpc_emit_vsldoi(p, src1, src1, src1, 4); + } + powerpc_emit_VX_db (p, "xvcvsxddp", 0xf00003e3, dest, src1); ++ powerpc_denormalize_dp_zero (p, dest, zero); + } + + static void +@@ -1573,8 +1639,19 @@ powerpc_rule_convdl (OrcCompiler *p, void *user, OrcInstruction *insn) + { + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int mask = powerpc_get_constant_full (p, 0xfff00000, 0x00000000, ++ 0xfff00000, 0x00000000); ++ int nan = powerpc_get_constant_full (p, 0x7ff00000, 0x00000000, ++ 0x7ff00000, 0x00000000); ++ int maxint = powerpc_get_constant_full (p, 0x7fffffff, 0x7fffffff, ++ 0x7fffffff, 0x7fffffff); ++ int tmp = p->tmpreg; + ++ powerpc_emit_VX_2(p, "xxland", 0xf0000417, tmp, src1, mask); ++ powerpc_emit_VX_2(p, "vcmpequd", 0x100000c7, tmp, tmp, nan); + powerpc_emit_VX_db (p, "xvcvdpsxws", 0xf0000363, dest, src1); ++ powerpc_emit_VA(p, "xxsel", 0xf000003f, dest, dest, maxint, tmp); ++ + if (IS_POWERPC_LE (p)) { + int tmp = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 32); + powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, dest, tmp); +@@ -1586,11 +1663,23 @@ powerpc_rule_convfd (OrcCompiler *p, void *user, OrcInstruction *insn) + { + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); ++ int tmp2 = orc_compiler_get_temp_reg(p); ++ int zero = powerpc_get_constant (p, ORC_CONST_ZERO, 0); ++ int mask = powerpc_get_constant_full (p, 0x7f800000, 0x00000000, ++ 0x7f800000, 0x00000000); ++ int tmp = p->tmpreg; + + if (IS_POWERPC_LE (p)) { +- powerpc_emit_vsldoi(p, src1, src1, src1, 4); ++ powerpc_emit_vsldoi(p, tmp2, src1, src1, 4); ++ } else { ++ powerpc_emit_vor(p, tmp2, src1, src1); + } +- powerpc_emit_VX_db (p, "xvcvspdp", 0xf0000727, dest, src1); ++ powerpc_emit_VX_db (p, "xvcvspdp", 0xf0000727, dest, tmp2); ++ ++ powerpc_emit_VX_2(p, "xxland", 0xf0000417, tmp, tmp2, mask); ++ powerpc_emit_VX_2(p, "vcmpequd", 0x100000c7, tmp, tmp, zero); ++ powerpc_emit_VA(p, "xxsel", 0xf000003f, tmp, dest, zero, tmp); ++ powerpc_emit_VX_2(p, "xvcpsgndp", 0xf0000787, dest, dest, tmp); + } + + static void +@@ -1604,6 +1693,7 @@ powerpc_rule_convdf (OrcCompiler *p, void *user, OrcInstruction *insn) + int tmp = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 32); + powerpc_emit_VX_2 (p, "vsro", 0x1000044c, dest, dest, tmp); + } ++ powerpc_denormalize_sp(p, dest); + } + + +@@ -1757,7 +1847,6 @@ orc_compiler_powerpc_register_rules (OrcTarget *target) + REG(cmplef); + REG(cmpltf); + REG(mulf); +- REG(divf); + REG(convfl); + REG(convlf); + +@@ -1789,6 +1878,7 @@ orc_compiler_powerpc_register_rules (OrcTarget *target) + + rule_set = orc_rule_set_new(orc_opcode_set_get("sys"), target, ORC_TARGET_POWERPC_VSX); + ++ REG(divf); + REG(sqrtf); + REG(addd); + REG(subd); +diff --git a/orc/orctarget.h b/orc/orctarget.h +index 642bfe3..53000b3 100644 +--- a/orc/orctarget.h ++++ b/orc/orctarget.h +@@ -19,7 +19,7 @@ enum { + ORC_TARGET_FAST_DENORMAL = (1<<31) + }; + +-enum { ++typedef enum { + ORC_TARGET_POWERPC_64BIT = (1<<0), + ORC_TARGET_POWERPC_LE = (1<<1), + ORC_TARGET_POWERPC_ALTIVEC = (1<<2), +diff --git a/testsuite/exec_parse.c b/testsuite/exec_parse.c +index 0858413..859ad4e 100644 +--- a/testsuite/exec_parse.c ++++ b/testsuite/exec_parse.c +@@ -20,6 +20,7 @@ main (int argc, char *argv[]) + char *code; + int n; + int i; ++ int ret; + OrcProgram **programs; + const char *filename = NULL; + +@@ -45,7 +46,11 @@ main (int argc, char *argv[]) + + for(i=0;i<n;i++){ + if (verbose) printf("%s\n", programs[i]->name); +- orc_test_compare_output_full (programs[i], 0); ++ ret = orc_test_compare_output_full (programs[i], 0); ++ if (!ret) { ++ printf("failed %s\n", programs[i]->name); ++ error = TRUE; ++ } + orc_program_free (programs[i]); + } + +diff --git a/testsuite/memcpy_speed.c b/testsuite/memcpy_speed.c +index a1a69f1..4cf1c39 100644 +--- a/testsuite/memcpy_speed.c ++++ b/testsuite/memcpy_speed.c +@@ -102,7 +102,7 @@ main(int argc, char *argv[]) + max = 140; + } + +- for(i=0;i<max;i++){ ++ for(i=0;i<max;i+=2){ + double x = i*0.1 + 6.0; + int size = pow(2.0, x); + diff --git a/user/papirus-icons/APKBUILD b/user/papirus-icons/APKBUILD index f87f1c988..3e0bab284 100644 --- a/user/papirus-icons/APKBUILD +++ b/user/papirus-icons/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=papirus-icons -pkgver=20190802 +pkgver=20190919 pkgrel=0 pkgdesc="Material, flat style icon theme" url="https://store.kde.org/p/1166289/" @@ -39,4 +39,4 @@ epapirus() { mv "$pkgdir"/usr/share/icons/ePapirus "$subpkgdir"/usr/share/icons/ } -sha512sums="880681502d0b405e8a7962d6978d0a6cac3aec386723b69655d97157f8c5140fc88b711d7983e91b2900841e420af73a58f3ecb13f5e6122cd754a6ca26d84db papirus-icons-20190802.tar.gz" +sha512sums="183765db87863f46d5036ea020ef5f4da5f74b6b519bdf9409f95e904209ba308abf46af29d5d8e86a1abe95e18975bd9114cfc929cd4620a9cef49e6a5c939b papirus-icons-20190919.tar.gz" diff --git a/user/polkit-qt-1/APKBUILD b/user/polkit-qt-1/APKBUILD index bbfcde4f2..4a109e7d7 100644 --- a/user/polkit-qt-1/APKBUILD +++ b/user/polkit-qt-1/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=polkit-qt-1 -pkgver=0.112.0 +pkgver=0.113.0 pkgrel=0 pkgdesc="Qt wrapper library for PolicyKit" url="https://www.kde.org/" @@ -12,10 +12,9 @@ depends="" depends_dev="polkit-dev glib-dev" makedepends="$depends_dev cmake qt5-qtbase-dev" subpackages="$pkgname-dev" -source="https://download.kde.org/stable/apps/KDE4.x/admin/polkit-qt-1-$pkgver.tar.bz2" +source="https://download.kde.org/stable/$pkgname/polkit-qt-1-$pkgver.tar.xz" build() { - cd "$builddir" if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi @@ -32,8 +31,7 @@ build() { } package() { - cd "$builddir" make DESTDIR="$pkgdir" install } -sha512sums="4cb17389b54a09c53052f6d72aa5cbfe09ccb19f7fd4edf8b43ccd4751f5e88609c5f89777f4af92167d32eb2ce1e78537cea7bcfb60a90072d1fe02d6a59b50 polkit-qt-1-0.112.0.tar.bz2" +sha512sums="deea5d75f547eaa0279c664ec9608b65f464db97fd5fdea27437f8ed4ec033de2b9f91d967deacb28bf0a1e54f131f997acb862cc3e1f8dfcb1f6c337e719b38 polkit-qt-1-0.113.0.tar.xz" diff --git a/user/py3-recommonmark/APKBUILD b/user/py3-recommonmark/APKBUILD index a0b15b675..2286dc298 100644 --- a/user/py3-recommonmark/APKBUILD +++ b/user/py3-recommonmark/APKBUILD @@ -4,7 +4,7 @@ pkgname=py3-recommonmark _pkgname=recommonmark _p="${_pkgname#?}" _p="${_pkgname%"$_p"}" -pkgver=0.5.0 +pkgver=0.6.0 pkgrel=0 pkgdesc="Bridge between CommonMark and docutils" url="https://pypi.org/project/recommonmark/" @@ -30,4 +30,4 @@ package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="581b3492e082ab4f0a53e50df0c9cfa3badda7ba9ee28dadbea85c55de96304257790e6aa06ebc793fba1d9ac399ce470fe821492106150b3a0db10dc734ee4b recommonmark-0.5.0.tar.gz" +sha512sums="f94f1ee426015478a95c2ed4b6ea87a75012447ae65d6623445f923d9d616b34efb055bcfde157862fcce38749c827905b839194fa1af3a1fe1cb7e11f18835a recommonmark-0.6.0.tar.gz" diff --git a/user/py3-transitions/APKBUILD b/user/py3-transitions/APKBUILD index 255e631d5..b877992d3 100644 --- a/user/py3-transitions/APKBUILD +++ b/user/py3-transitions/APKBUILD @@ -4,10 +4,10 @@ pkgname=py3-transitions _pkgname=${pkgname#py3-} _p="${_pkgname#?}" _p="${_pkgname%"$_p"}" -pkgver=0.6.9 +pkgver=0.7.1 pkgrel=0 pkgdesc="Python state machine library" -url="https://pypi.org/project/passlib/" +url="https://pypi.org/project/transitions/" arch="noarch" options="!check" # requires nose, pygraphviz license="MIT" @@ -30,4 +30,4 @@ package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="0cef11d547ae631afcb3dad557ab81b425f825028639787337f700f19073d7cb4c69ba9b6284155b3be85fb3eac4c4abd5b0cf3104dff8d2098c219729de4352 transitions-0.6.9.tar.gz" +sha512sums="4802e6a914270a183f66e70cf648c5f09c25b63e9233fdeb65b231ad24847d023182c6a45eaa1d47780d1f5d7f6f23695a6e578d4eaae55bf7a7ff121561e06b transitions-0.7.1.tar.gz" diff --git a/user/recode/APKBUILD b/user/recode/APKBUILD index fc95087c1..274706d9a 100644 --- a/user/recode/APKBUILD +++ b/user/recode/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=recode -pkgver=3.7.2 +pkgver=3.7.6 pkgrel=0 pkgdesc="Character set conversion utilities" url=" " @@ -33,4 +33,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="b5371c41cc0f08c5a15b4682b777b5dbf754aecea6fe61a90661ec0020ca6325c7a11cb04b21b87e08d1da51ee4e226fd84cbb74d61bbca9d181e51d9bb17042 recode-3.7.2.tar.gz" +sha512sums="ababefc445fcc47b6bf9ed640b767aed374bb8ce93cdccb641dd1ba5d298360583dd79070a0bb458f1190a8d6f1ddeb3b04eec34a61305b69def0963cec5843f recode-3.7.6.tar.gz" diff --git a/user/rsibreak/APKBUILD b/user/rsibreak/APKBUILD index 0757ad517..fd3864d48 100644 --- a/user/rsibreak/APKBUILD +++ b/user/rsibreak/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=rsibreak -pkgver=0.12.10 +pkgver=0.12.11 pkgrel=0 pkgdesc="Helps you avoid wrist injury by telling you when to stop for a rest" url="https://www.kde.org/applications/utilities/rsibreak/" @@ -39,4 +39,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="0e5c5dabe0efa05f53b5a0b5823ef856ca6806ac1a3a1a45f57f236789190718b2ab73af35ee6617a42eb672e06554687dd41f3ab02e9c37d25ef926fee2240c rsibreak-0.12.10.tar.xz" +sha512sums="78498b747eeef842e40170236ace9d1ddd8b1f4bcc378134f2935cd2cf1c6933d44fa232f2f9b0724ee6b2638a34e4f71ebee2eac7664946093ed4df8eeb12ec rsibreak-0.12.11.tar.xz" diff --git a/user/shared-mime-info/APKBUILD b/user/shared-mime-info/APKBUILD index 3e132dee4..4c5f6198b 100644 --- a/user/shared-mime-info/APKBUILD +++ b/user/shared-mime-info/APKBUILD @@ -1,24 +1,23 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=shared-mime-info -pkgver=1.12 +pkgver=1.14 pkgrel=0 pkgdesc="MIME database for desktop software" url="https://freedesktop.org/wiki/Software/shared-mime-info" arch="all" license="GPL-2.0+" depends="" -makedepends="glib-dev intltool libxml2-dev libxml2-utils" +makedepends="glib-dev itstool libxml2-dev libxml2-utils" subpackages="$pkgname-doc $pkgname-lang" install="$pkgname.post-deinstall" triggers="$pkgname.trigger=/usr/share/mime" -source="https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/80c7f1afbcad2769f38aeb9ba6317a51/$pkgname-$pkgver.tar.xz" +source="https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/aee9ae9646cbef724bbb1bd2ba146556/shared-mime-info-1.14.tar.xz" build() { ac_cv_func_fdatasync=no ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ - --enable-default-make-check \ --disable-update-mimedb make -j1 } @@ -31,4 +30,4 @@ package() { make -j1 DESTDIR="$pkgdir" install } -sha512sums="c9db138586fe4c789b5a89d3cdcf865d5b3258241accd254deecd7665e8b51fc538adeaeeda4fe332474f7d7ffa84f101cba26539a58e134201673d6d1495a2f shared-mime-info-1.12.tar.xz" +sha512sums="c25a4cec2e5aaa1e6aaef14f48f5910de5ccff1a5f3605da07fffea63e13624b945d7f40dfbe74fbfafd5364f143de88541c7fc5336d000ee16ad2eb06701c11 shared-mime-info-1.14.tar.xz" diff --git a/user/squashfs-tools/0001-mksquashfs-fix-rare-race-in-fragment-waiting-in-file.patch b/user/squashfs-tools/0001-mksquashfs-fix-rare-race-in-fragment-waiting-in-file.patch deleted file mode 100644 index 51f588818..000000000 --- a/user/squashfs-tools/0001-mksquashfs-fix-rare-race-in-fragment-waiting-in-file.patch +++ /dev/null @@ -1,60 +0,0 @@ -From de03266983ceb62e5365aac84fcd3b2fd4d16e6f Mon Sep 17 00:00:00 2001 -From: Phillip Lougher <phillip@squashfs.org.uk> -Date: Thu, 18 Sep 2014 01:28:11 +0100 -Subject: [PATCH] mksquashfs: fix rare race in fragment waiting in filesystem - finalisation - -Fix a rare race condition in fragment waiting when finalising the -filesystem. This is a race condition that was initially fixed in 2009, -but inadvertantly re-introduced in the latest release when the code -was rewritten. - -Background: - -When finalising the filesystem, the main control thread needs to ensure -all the in-flight fragments have been queued to the writer thread before -asking the writer thread to finish, and then writing the metadata. - -It does this by waiting on the fragments_outstanding counter. Once this -counter reaches 0, it synchronises with the writer thread, waiting until -the writer thread reports no outstanding data to be written. - -However, the main thread can race with the fragment deflator thread(s) -because the fragment deflator thread(s) decrement the fragments_outstanding -counter and release the mutex before queueing the compressed fragment -to the writer thread, i.e. the offending code is: - - fragments_outstanding --; - pthread_mutex_unlock(&fragment_mutex); - queue_put(to_writer, write_buffer); - -In extremely rare circumstances, the main thread may see the -fragments_outstanding counter is zero before the fragment -deflator sends the fragment buffer to the writer thread, and synchronise -with the writer thread, and finalise before the fragment has been written. - -The fix is to ensure the fragment is queued to the writer thread -before releasing the mutex. - -Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> ---- - squashfs-tools/mksquashfs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c -index 87b7d86..f1fcff1 100644 ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -2419,8 +2419,8 @@ void *frag_deflator(void *arg) - write_buffer->block = bytes; - bytes += compressed_size; - fragments_outstanding --; -- pthread_mutex_unlock(&fragment_mutex); - queue_put(to_writer, write_buffer); -+ pthread_mutex_unlock(&fragment_mutex); - TRACE("Writing fragment %lld, uncompressed size %d, " - "compressed size %d\n", file_buffer->block, - file_buffer->size, compressed_size); --- -2.10.2 - diff --git a/user/squashfs-tools/APKBUILD b/user/squashfs-tools/APKBUILD index 227faf11d..e33b06b16 100644 --- a/user/squashfs-tools/APKBUILD +++ b/user/squashfs-tools/APKBUILD @@ -1,35 +1,33 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=squashfs-tools -pkgver=4.3 -pkgrel=5 +pkgver=4.4 +pkgrel=0 pkgdesc="Tools for SquashFS, a highly compressed read-only filesystem" url="http://squashfs.sourceforge.net" arch="all" options="!check" # No test suite. license="GPL-2.0+" -depends= -makedepends="zlib-dev xz-dev lzo-dev lz4-dev attr-dev" -source="http://downloads.sourceforge.net/sourceforge/squashfs/squashfs$pkgver.tar.gz +depends="" +makedepends="attr-dev lz4-dev lzo-dev xz-dev zlib-dev" +source="https://downloads.sourceforge.net/squashfs/squashfs$pkgver.tar.gz fix-compat.patch - vla-overlow.patch - CVE-2015-4645.patch - 0001-mksquashfs-fix-rare-race-in-fragment-waiting-in-file.patch -" -builddir="$srcdir/squashfs$pkgver" + " +builddir="$srcdir/squashfs$pkgver/$pkgname" + +# secfixes: +# 4.3-r5: +# - CVE-2015-4645 +# 4.4-r0: +# - CVE-2015-4646 build() { - cd "$builddir"/$pkgname make XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1 } package() { - cd "$builddir"/$pkgname mkdir -p "$pkgdir"/sbin cp -a mksquashfs unsquashfs "$pkgdir"/sbin } -sha512sums="854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79 squashfs4.3.tar.gz -868e3923f98a7f8bb980fe8ab0d648e9ae9a55e324bea3830d6047aa348a4302dcb96d65bf59c6e04665891d822e18fad367a37c6704505b8492f64d749fc140 fix-compat.patch -975d09d047f4122866e83c4322ce3a15795c051b850d14a85a615c3beef970378e5a620ee16058b9c5104c53f973f9b3804d96c3ba1ab4f622f1e096c04e0360 vla-overlow.patch -77431a0a4a529ce63f1613a65a23af2fb8683a16d14ad1a5cfed3a9fac4df6a1212f081d1879ede188a25b77e860445058012131423c546657fb562069865d2c CVE-2015-4645.patch -1b2338a448ec8a2b75880ddc8c13f99392451847ab26277e1bc82b49a3a804796934e212dd1ba54a502940537a61891ee0103e913d0bda65cff0ca2827b8b41c 0001-mksquashfs-fix-rare-race-in-fragment-waiting-in-file.patch" +sha512sums="e7119f82cea0eda8dffcbf15c9ee511ad457e004bfc0c5a5685e84785e49cf34f3c053036449af6bba0012cef48426f65958c97b9958d58f1b31175cb0bbbe24 squashfs4.4.tar.gz +12f5739aa32b9e15ba3d22e5953034f17867a8837475f13bde5bbc378dbded0483cde42c0cdfc5d33ab3723b9de752c71b5ba8f4301ca7b59aa4054d669c262d fix-compat.patch" diff --git a/user/squashfs-tools/CVE-2015-4645.patch b/user/squashfs-tools/CVE-2015-4645.patch deleted file mode 100644 index f69025f18..000000000 --- a/user/squashfs-tools/CVE-2015-4645.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c -index ecdaac796f09..2c0cf63daf67 100644 ---- a/squashfs-tools/unsquash-4.c -+++ b/squashfs-tools/unsquash-4.c -@@ -31,9 +31,9 @@ static unsigned int *id_table; - int read_fragment_table_4(long long *directory_table_end) - { - int res, i; -- int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments); -- int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments); -- long long fragment_table_index[indexes]; -+ size_t bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments); -+ size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments); -+ long long *fragment_table_index; - - TRACE("read_fragment_table: %d fragments, reading %d fragment indexes " - "from 0x%llx\n", sBlk.s.fragments, indexes, -@@ -44,6 +44,11 @@ int read_fragment_table_4(long long *directory_table_end) - return TRUE; - } - -+ fragment_table_index = malloc(indexes*sizeof(long long)); -+ if(fragment_table_index == NULL) -+ EXIT_UNSQUASH("read_fragment_table: failed to allocate " -+ "fragment table index\n"); -+ - fragment_table = malloc(bytes); - if(fragment_table == NULL) - EXIT_UNSQUASH("read_fragment_table: failed to allocate " diff --git a/user/squashfs-tools/fix-compat.patch b/user/squashfs-tools/fix-compat.patch index 2a3b33ca9..e93b6b827 100644 --- a/user/squashfs-tools/fix-compat.patch +++ b/user/squashfs-tools/fix-compat.patch @@ -1,6 +1,6 @@ ---- squashfs4.3.orig/squashfs-tools/action.c -+++ squashfs4.3/squashfs-tools/action.c -@@ -1905,6 +1905,9 @@ +--- squashfs-tools/action.c ++++ squashfs-tools/action.c +@@ -2236,6 +2236,9 @@ return 1; } @@ -10,9 +10,9 @@ TEST_FN(name, ACTION_ALL_LNK, \ return fnmatch(atom->argv[0], action_data->name, ---- squashfs4.3.orig/squashfs-tools/mksquashfs.c -+++ squashfs4.3/squashfs-tools/mksquashfs.c -@@ -4391,6 +4391,9 @@ +--- squashfs-tools/mksquashfs.c ++++ squashfs-tools/mksquashfs.c +@@ -4665,6 +4665,9 @@ return paths; } @@ -22,19 +22,9 @@ int excluded_match(char *name, struct pathname *path, struct pathnames **new) { ---- squashfs4.3.orig/squashfs-tools/pseudo.c -+++ squashfs4.3/squashfs-tools/pseudo.c -@@ -32,6 +32,7 @@ - #include <stdlib.h> - #include <sys/types.h> - #include <sys/wait.h> -+#include <sys/stat.h> - #include <ctype.h> - - #include "pseudo.h" ---- squashfs4.3.orig/squashfs-tools/unsquashfs.c -+++ squashfs4.3/squashfs-tools/unsquashfs.c -@@ -1410,6 +1410,9 @@ +--- squashfs-tools/unsquashfs.c ++++ squashfs-tools/unsquashfs.c +@@ -1457,6 +1457,9 @@ free(paths); } diff --git a/user/squashfs-tools/vla-overlow.patch b/user/squashfs-tools/vla-overlow.patch deleted file mode 100644 index a9840fe01..000000000 --- a/user/squashfs-tools/vla-overlow.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- ./squashfs-tools/unsquashfs.c.orig -+++ ./squashfs-tools/unsquashfs.c -@@ -2099,7 +2099,9 @@ - */ - void *inflator(void *arg) - { -- char tmp[block_size]; -+ char *tmp = malloc(block_size); -+ if(tmp == NULL) -+ EXIT_UNSQUASH("Out of memory allocating block buffer\n"); - - while(1) { - struct cache_entry *entry = queue_get(to_inflate); -@@ -2122,6 +2124,7 @@ - */ - cache_block_ready(entry, res == -1); - } -+ free(tmp); - } - - diff --git a/user/upower/APKBUILD b/user/upower/APKBUILD index ea8652b3e..376ca208c 100644 --- a/user/upower/APKBUILD +++ b/user/upower/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=upower -pkgver=0.99.10 +pkgver=0.99.11 pkgrel=0 pkgdesc="Power Management Services" url="https://upower.freedesktop.org" @@ -10,8 +10,8 @@ license="GPL-2.0+" depends="" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" makedepends="dbus-glib-dev docbook-xsl gobject-introspection-dev gtk+-dev - intltool libgudev-dev libusb-dev libxslt linux-headers polkit-dev" -source="https://gitlab.freedesktop.org/upower/upower/uploads/c438511024b9bc5a904f8775cfc8e4c4/upower-0.99.10.tar.xz" + libgudev-dev libusb-dev libxslt linux-headers polkit-dev" +source="https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-0.99.11.tar.xz" build() { DATADIRNAME=share ./configure \ @@ -34,4 +34,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="aefe1b2ff5a390f1ea9676fe7e753750bebc56034365a9183e946a8463904047da0a4ac71340eb2efedc16bce6f6d9ef4609ddca37dc1fc31b56bcdbfbbfa59d upower-0.99.10.tar.xz" +sha512sums="67219a0beb98c97ac4512e4fe8ba83fc80a1035d1edb5367dda6911da50c672b047051f2f528e8703be29ab47547d92b6c71a7ef695226a1bdb5bc33e6d18803 upower-0.99.11.tar.xz" |