From owner-svn-src-projects@freebsd.org Sun Oct 7 09:21:41 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21EF810B9B95 for ; Sun, 7 Oct 2018 09:21:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5C2C7BDD9; Sun, 7 Oct 2018 09:21:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7CA675B95A; Sun, 7 Oct 2018 11:21:31 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_8D1B162B-12B0-484C-9C23-AC8514586B97"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r337979 - projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/Targets Date: Sun, 7 Oct 2018 11:21:27 +0200 In-Reply-To: Cc: src-committers , svn-src-projects@freebsd.org To: Antoine Brodin References: <201808171626.w7HGQ0Sp020544@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2018 09:21:41 -0000 --Apple-Mail=_8D1B162B-12B0-484C-9C23-AC8514586B97 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 7 Oct 2018, at 10:57, Antoine Brodin wrote: > > On Fri, Aug 17, 2018 at 6:26 PM Dimitry Andric wrote: >> Author: dim >> Date: Fri Aug 17 16:25:59 2018 >> New Revision: 337979 >> URL: https://svnweb.freebsd.org/changeset/base/337979 >> >> Log: >> For now, revert upstream clang r323281 (by Wei Mi): >> >> Adjust MaxAtomicInlineWidth for i386/i486 targets. >> >> This is to fix the bug reported in >> https://bugs.llvm.org/show_bug.cgi?id=34347#c6. Currently, all >> MaxAtomicInlineWidth of x86-32 targets are set to 64. However, i386 >> doesn't support any cmpxchg related instructions. i486 only supports >> cmpxchg. So in this patch MaxAtomicInlineWidth is reset as follows: >> For i386, the MaxAtomicInlineWidth should be 0 because no cmpxchg is >> supported. For i486, the MaxAtomicInlineWidth should be 32 because >> it supports cmpxchg. For others 32 bits x86 cpu, the >> MaxAtomicInlineWidth should be 64 because of cmpxchg8b. >> >> Differential Revision: https://reviews.llvm.org/D42154 >> >> This should fix buildworld on i386, because of our system libraries >> missing __atomic_load_8, and possibly other 64 bit atomic functions, for >> that architecture. >> >> We should really fix that at some point, but since we have been actually >> using cmpxchg8b for years now, it does not seem to matter much... > > Hi, > > Is it possible to backport something similar on stable/11 and maybe do > an EN for 11.2? The change I reverted here was made after 6.0, so there is no need to revert in stable/11. It doesn't change the fact that we don't have 64 bit atomic support at all for i386, so this is going to keep on being an issue. In my opinion, the best solution would be to stop pretending we support "real" i486 CPUs, and raise the minimum CPU to at least i586 (but going directly towards i386-with-SSE would even be better!). -Dimitry --Apple-Mail=_8D1B162B-12B0-484C-9C23-AC8514586B97 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCW7nQFwAKCRCwXqMKLiCW o0eJAJ45sOYQsc0+BZwjJRhQ+n7WP4GG2gCeNl1RRKOcjsdF0Qs5fiOLfGr/Pxg= =Ry5k -----END PGP SIGNATURE----- --Apple-Mail=_8D1B162B-12B0-484C-9C23-AC8514586B97--