From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 6694B385843A; Wed, 8 Dec 2021 19:15:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6694B385843A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 32BC1D2A; Wed, 8 Dec 2021 20:15:26 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QBOcHyBJ-c6S; Wed, 8 Dec 2021 20:15:25 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb8cc.dip0.t-ipconnect.de [79.221.184.204]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id A4D139F9; Wed, 8 Dec 2021 20:15:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1638990925; bh=+/7Sm5vTxsLWYiyOGEMwQ/pj58aBMp9aAFLsL+4TX00=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=f/IOyZLLIzUC4uXFLfRFRSv6KGzCNZwxbfuYviz13N2c6D9ipV5o3oqRvuTqTCkIr laEDm2jCWzDBk9aFpAFapQb7hDdk+D0xldxgliWNJ9I2F6rN3IYWWm87923jmtl2FX tgvB+qxfRla0om00QKRhPHkyD7vKS+rRm673qJnFybiqMz53NKe7t75gQCJcRnyU6J IaLtzjhpSNtEJ0aG+9uxXAjLGqqy3UK2gbo3hUMPvHuRx138sWFlKfObh9OXt7FIPA eB/rFJrrGmLIRyIUT5otDB/aHfWCJEY7gB9pMoLuo+qAiLsrip2SmatfQnhJHojw/d isxAcn8ovoqUA== From: Rainer Orth To: Jonathan Wakely via Gcc-patches Cc: Maged Michael , Jonathan Wakely , libstdc++ Subject: Re: [PATCH] libstdc++: Skip atomic instructions in _Sp_counted_base::_M_release when both counts are 1 References: Date: Wed, 08 Dec 2021 20:15:24 +0100 In-Reply-To: (Jonathan Wakely via Gcc-patches's message of "Wed, 8 Dec 2021 11:49:33 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3787.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2021 19:15:29 -0000 Hi Jonathan, > I've pushed this change to trunk now (it was posted and reviewed in > stage 1, I just didn't get around to pushing it until now). > > The final version of the patch is attached to this mail. unfortunately, it breaks Solaris/SPARC bootstrap: In file included from /var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/include/bits/shared_ptr.h:53, from /var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/include/memory:77, from /vol/gcc/src/hg/master/local/libstdc++-v3/include/precompiled/stdc++.h:82: /var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/include/bits/shared_ptr_base.h: In member function 'void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]': /var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/include/bits/shared_ptr_base.h:329:26: error: right operand of shift expression '(1 << 64)' is greater than or equal to the precision 64 of the left operand [-fpermissive] 329 | = 1LL + (1LL << (__CHAR_BIT__ * sizeof(_Atomic_word))); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[9]: *** [Makefile:1875: sparc-sun-solaris2.11/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1 For 64-bit SPARC, _Atomic_word is long. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University