From nobody Sat Dec 25 11:55:35 2021 X-Original-To: dev-commits-src-all@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 BDA4718F3081; Sat, 25 Dec 2021 11:55:39 +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 4JLj6x0nYXz4l06; Sat, 25 Dec 2021 11:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 E05FA16C55; Sat, 25 Dec 2021 11:55:35 +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 1BPBtZFZ006494; Sat, 25 Dec 2021 11:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BPBtZ6C006493; Sat, 25 Dec 2021 11:55:35 GMT (envelope-from git) Date: Sat, 25 Dec 2021 11:55:35 GMT Message-Id: <202112251155.1BPBtZ6C006493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1a398266112e - stable/12 - compilert-rt: build out-of-line LSE atomics helpers for aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1a398266112e73f91a4f2e2701ceefd3f2948aac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640433337; 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=3wY6f7pu7eHO2ROKtKT5bLKh/+MbmUh1hI24cjvnIz8=; b=J9u2ildDo2IXL7Cn0K8I0nAbnijqzJx4+y/7+TnAEppe/Ri5tEuVFn6l0eM+RYH9CJmzu3 aihqaJV3lNX0xgqGM8sWs5v9eMWWNqVMIJJAHa/fK4v/SwrEw/qngq1hjjCBIRBEp31aoP E1SOgUErcsU2xN+Wx9W4le18WFhe+X5zi/ij2nqe7x8tJ0iAgfVBxr6+45uqk+6RxnBQ6e +j39k8H7gqpertFgdfv6UVQuQ/who4FzOGBVGRaTWG1/EA7Ab2G37+t9WBzmgcs48EVNrc 6zk32463qAMJLA6YM7U6V6m61Nl7c8UKQRoBRgAjaoNIA3PA4X27Q61KRqe6EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640433337; a=rsa-sha256; cv=none; b=qE1o/F90IC/jCVfjUImSn2iCoyOlsjj4msYQ/XU3nvIrwXbSK/NguzOeVY6WLpNRipAwzr WOOAUvV1ocmwEyKi6S/eM0v1Y3npjM0ON3AoV+FzJ4eHK1UDpG17qDfTWcryfBeRrcKTrG 524uUT/TLQBGxg9hcu0LA6k2Pzz1fpZnO+lci9DxcY9so2ZYVsc0UMbMvcDh4aLBLtJgVf Ks3kXkAk9p9Y5hfaC5JqcIEWsZpGC+Omlw+SE9c886JY9XGj6p4dxvPD9Ovwv3EEPkTZCJ 1zrBTqkC/NLwW/9bYKx/0nfBqrJI6IrtZc2wE0LCIshxznmr5s3Zocs55BZiOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1a398266112e73f91a4f2e2701ceefd3f2948aac commit 1a398266112e73f91a4f2e2701ceefd3f2948aac Author: Dimitry Andric AuthorDate: 2021-07-28 20:30:04 +0000 Commit: Dimitry Andric CommitDate: 2021-12-25 11:51:11 +0000 compilert-rt: build out-of-line LSE atomics helpers for aarch64 Both clang >= 12 and gcc >= 10.1 now default to -moutline-atomics for aarch64. This requires a bunch of helper functions in libcompiler_rt.a, to avoid link errors like "undefined symbol: __aarch64_ldadd8_acq_rel". (Note: of course you can use -mno-outline-atomics as a workaround too, but this would negate the potential performance benefit of the faster LSE instructions.) Bump __FreeBSD_version so ports maintainers can easily detect this. PR: 257392 MFC after: 2 weeks (cherry picked from commit cc55ee8009a550810d38777fd6ace9abf3a2f6b4) --- lib/libcompiler_rt/Makefile | 20 ++++++++++++++++++++ sys/sys/param.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index 0f42dd516c51..9088c9452125 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -19,6 +19,26 @@ NO_WERROR.gcc= .include "Makefile.inc" +# Out-of-line LSE atomics helpers for aarch64 +.if ${MACHINE_CPUARCH} == "aarch64" +. for pat in cas swp ldadd ldclr ldeor ldset +. for size in 1 2 4 8 16 +. for model in 1 2 3 4 +. if ${pat} == "cas" || ${size} != "16" +# Use .for to define lse_name, to get a special loop-local variable +. for lse_name in outline_atomic_${pat}${size}_${model}.S +CLEANFILES+= ${lse_name} +STATICOBJS+= ${lse_name:R}.o +ACFLAGS.${lse_name}+= -DL_${pat} -DSIZE=${size} -DMODEL=${model} -I${CRTSRC} +${lse_name}: lse.S + ln -sf ${.ALLSRC} ${.TARGET} +. endfor # lse_name +. endif +. endfor # model +. endfor # size +. endfor # pat +.endif + .if ${MK_INSTALLLIB} != "no" SYMLINKS+= libcompiler_rt.a ${LIBDIR}/libgcc.a .endif diff --git a/sys/sys/param.h b/sys/sys/param.h index 4aa0c765e96c..d31ba8da1ffa 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1203503 /* Master, propagated to newvers */ +#define __FreeBSD_version 1203504 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,