From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 135E43858C60 for ; Wed, 8 Dec 2021 19:21:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 135E43858C60 Received: from mail-yb1-f200.google.com (mail-yb1-f200.google.com [209.85.219.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-193-FVZm-PZrMKWB7SGJ7_D18g-1; Wed, 08 Dec 2021 14:21:34 -0500 X-MC-Unique: FVZm-PZrMKWB7SGJ7_D18g-1 Received: by mail-yb1-f200.google.com with SMTP id j18-20020a258152000000b006000d292a42so6292121ybm.0 for ; Wed, 08 Dec 2021 11:21:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GNzznSKqpjZXZqzcaM5xfQDIiwpCeZNhkOv8dvra6zA=; b=c/DEMlFr9LDHZnTVk5QAsDB9GrGn7u4Ra6eH6jzN6/KWKVX5T/AYldJH6XUn0nvIU0 RXmks+p+5Dm4DAy4tu6JerILTwdDZQ4I9xoBnOXSdwcVAB9k/K5JGFlY1IBfiMc8w00f Fd7je4IEYGVl/m6L0G5dK4zPnuZwaEKmXwU319NOBJkkhk4To1eKtZNa5YikuO5zbOeo GiWw2wDdiR1r0SF2GUMQMe/WoLZGuZHt9qjtaIwsQjMZQ8m8spT3au6WP6nfUANNoSYt WmUv1Z9IzIH4MjbT2Si4YsFueungrMswugiYVr8Wxv9KoDbawC6LwnndTbqQfTBOaG/S s6uw== X-Gm-Message-State: AOAM53013Gz7x3+XiBmX1IAFVPHt+waQRMZIutCKn+mj/HH0UEPg36k4 gIpc6nriusZ8ACW3BLlW0QqWuULy/q+8MN8B3ajaeHfiHwWDHSh5RRx0Aa4R1RF9Ep6ch37okcM spMQmExthwQIVanFegodoE1R0fFBgKjM= X-Received: by 2002:a25:3854:: with SMTP id f81mr810848yba.316.1638991294231; Wed, 08 Dec 2021 11:21:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGBrqnIuRY25/XYbDRrwkzOYIwdekcwZATUX35u8SE2bGa0HImIw8azQx0oMYQ+h1u8JXsUklom8EyR4L9FQ4= X-Received: by 2002:a25:3854:: with SMTP id f81mr810823yba.316.1638991293973; Wed, 08 Dec 2021 11:21:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 8 Dec 2021 19:21:22 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Skip atomic instructions in _Sp_counted_base::_M_release when both counts are 1 To: Rainer Orth Cc: Jonathan Wakely via Gcc-patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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:21:37 -0000 On Wed, 8 Dec 2021 at 19:17, Rainer Orth wrote: > > 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/p= recompiled/stdc++.h:82: > /var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/sparc= v9/libstdc++-v3/include/bits/shared_ptr_base.h: In member function 'void st= d::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = =3D __gnu_cxx::_S_atomic]': > /var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/sparc= v9/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 | =3D 1LL + (1LL << (__CHAR_BIT__ * sizeof(_Atomic_word= ))); > | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~ > make[9]: *** [Makefile:1875: sparc-sun-solaris2.11/bits/stdc++.h.gch/O2gg= nu++0x.gch] Error 1 > > For 64-bit SPARC, _Atomic_word is long. Ah yes, so we need to disable this optimization. Patch coming up ...