From nobody Wed Mar 23 17:05:06 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BF0321A350D9; Wed, 23 Mar 2022 17:05:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KNvqQ4v6mz3HJ2; Wed, 23 Mar 2022 17:05:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648055106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wURr1ZUJDUep0IuPqWA2BsTqT34WdoPALgN7XDzL5s=; b=HP4Xz3R8ssO9R9W6WSkR+5kOCZJcK7qNNYNXYYCDdioS2AwMCwsxH2J6Suvx4z1EtRl2ye tK5d2zlTcLTvTzGuCo1xfKWE0FiQ+C5LE+KyxyXum11z4p5WvP4czchogDkQKftw94vGB2 zXWBvjcebjEgOs+Y7coQdq41KFywjUfY74BmK1BA9yYJJlqmipOQje/o9F4n92jeVFzCXR y4hPZ3dNXE9c5jEm0T/xUCm7jzUb6pqEbRAHjxqjA/dnixFNf0Tif+7fWgvyLpy1X6E/Id eZua1JJnyaZrn33tJt50b8NLQ7gMd9ay5CkS9cvJICjJ6I8lc3Lr7vNdjTG2Rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7149A276B6; Wed, 23 Mar 2022 17:05:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22NH56WN090854; Wed, 23 Mar 2022 17:05:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22NH56Ih090853; Wed, 23 Mar 2022 17:05:06 GMT (envelope-from git) Date: Wed, 23 Mar 2022 17:05:06 GMT Message-Id: <202203231705.22NH56Ih090853@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: 6826232807a2 - main - science/cgribex: fix build on powerpc64le with LLVM 13 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6826232807a27b783581c5f52e778da85ae61497 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648055106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wURr1ZUJDUep0IuPqWA2BsTqT34WdoPALgN7XDzL5s=; b=nt8H+J4BMoCFQy/mcTI4iSDLa0IJijuxbxAmk8/b/FKBRK2wZMcct6fbkJYQz+H6GDmXcQ qlzYEKQParm+/pe2Xuy9Og3Xv4R4IEQUWDgKOE3cXELd2CTRf/stUluPOji/8wF0M/54qr Zf2wC3yta5yso91hzNHqKD8s01CNTZQsBrNjpN0DdPU5+FG754R/G0pWWEXT9F0/sZZT94 ErYmHfNWuZHp6c1kWqkWvamupaow/D+eO0/P0XJQYIor9hWKML4IOqeP1nxtWSF4hyiizq B8vbmGAaNRVG2l7BaYWr23YLBxtw2V0Q55jYO3pcW570hA7Riuc8hoejFUWGDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648055106; a=rsa-sha256; cv=none; b=JMSa4nCVnLEMHqL+klILZyW+KhKyKQAMWgRvdpqp8Uh3vSVVB6d6MNRUC2rHgnMmhHMiE0 IROjmu7Ohxv8t0lnMzAHneSGLpg5qtiSTqJAZItRL1293ip3n8K8+/B/QYaQuwjQ65TYsT HsKBlo4tRwz/ia3nkGjodkrftBFKHmhcXV4G1dFyUZpRtcSVz5TSq56KvAWfoX0lu4qbyL UdQUwDKtYVUSDAHjLukq2BsaOYiYktrfai6ZwahJKVTOVi1k5/+yTfJKs8qDZ4+iJdzAv9 avokWadDAuXQI1qz6ixD8Qawx93QLS9hAdTb7yaEVWaDouHTqYq6Y9wkQhtrDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=6826232807a27b783581c5f52e778da85ae61497 commit 6826232807a27b783581c5f52e778da85ae61497 Author: Piotr Kubaj AuthorDate: 2022-03-23 16:55:52 +0000 Commit: Piotr Kubaj CommitDate: 2022-03-23 16:55:52 +0000 science/cgribex: fix build on powerpc64le with LLVM 13 ./minmax_val.c:324:2: error: address of register variable requested dmin[j] = data[0]; ^~~~ While here, remove the __fsel implementation and switch to __builtin_ppc_fsel that LLVM provides. --- science/cgribex/files/patch-src_minmax__val.c | 59 ++++++++++++++++++--------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/science/cgribex/files/patch-src_minmax__val.c b/science/cgribex/files/patch-src_minmax__val.c index e0a99df817db..be2b27531f86 100644 --- a/science/cgribex/files/patch-src_minmax__val.c +++ b/science/cgribex/files/patch-src_minmax__val.c @@ -1,22 +1,41 @@ ---- src/minmax_val.c.orig 2021-01-26 13:07:53 UTC +--- src/minmax_val.c.orig 2022-03-21 21:31:13 UTC +++ src/minmax_val.c -@@ -292,6 +291,19 @@ void sse2_minmax_val_double(const double *restrict buf - #endif // SIMD +@@ -303,8 +303,8 @@ void pwr6_minmax_val_double_unrolled6(const double *re + size_t i, j; + size_t residual = datasize % __UNROLL_DEPTH_1; + size_t ofs = datasize - residual; +- double register dmin[__UNROLL_DEPTH_1]; +- double register dmax[__UNROLL_DEPTH_1]; ++ double dmin[__UNROLL_DEPTH_1]; ++ double dmax[__UNROLL_DEPTH_1]; - #if defined(_ARCH_PWR6) -+ -+#ifndef __fsel -+static __inline__ double __fsel(double x, double y, double z) -+ __attribute__((always_inline)); -+static __inline__ double -+__fsel(double x, double y, double z) -+{ -+ double r; -+ __asm__("fsel %0,%1,%2,%3" : "=d"(r) : "d"(x),"d"(y),"d"(z)); -+ return r; -+} -+#endif -+ - static - void pwr6_minmax_val_double_unrolled6(const double *restrict data, size_t datasize, double *fmin, double *fmax) - { + for ( j = 0; j < __UNROLL_DEPTH_1; j++) + { +@@ -316,21 +316,21 @@ void pwr6_minmax_val_double_unrolled6(const double *re + { + for (j = 0; j < __UNROLL_DEPTH_1; j++) + { +- dmin[j] = __fsel(dmin[j] - data[i+j], data[i+j], dmin[j]); +- dmax[j] = __fsel(data[i+j] - dmax[j], data[i+j], dmax[j]); ++ dmin[j] = __builtin_ppc_fsel(dmin[j] - data[i+j], data[i+j], dmin[j]); ++ dmax[j] = __builtin_ppc_fsel(data[i+j] - dmax[j], data[i+j], dmax[j]); + } + } + + for (j = 0; j < residual; j++) + { +- dmin[j] = __fsel(dmin[j] - data[ofs+j], data[ofs+j], dmin[j]); +- dmax[j] = __fsel(data[ofs+j] - dmax[j], data[ofs+j], dmax[j]); ++ dmin[j] = __builtin_ppc_fsel(dmin[j] - data[ofs+j], data[ofs+j], dmin[j]); ++ dmax[j] = __builtin_ppc_fsel(data[ofs+j] - dmax[j], data[ofs+j], dmax[j]); + } + + for ( j = 0; j < __UNROLL_DEPTH_1; j++) + { +- *fmin = __fsel(*fmin - dmin[j], dmin[j], *fmin); +- *fmax = __fsel(dmax[j] - *fmax, dmax[j], *fmax); ++ *fmin = __builtin_ppc_fsel(*fmin - dmin[j], dmin[j], *fmin); ++ *fmax = __builtin_ppc_fsel(dmax[j] - *fmax, dmax[j], *fmax); + } + } + #undef __UNROLL_DEPTH_1