From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 451593857C5A for ; Thu, 14 Sep 2023 08:41:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 451593857C5A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b962535808so11040521fa.0 for ; Thu, 14 Sep 2023 01:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694680882; x=1695285682; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0mOmlaN9lvuR4MyqMYvf5ql00ncNQbf+hrCj6K11x/o=; b=XP4sM936YZX1wJs72TahCTSpRkOTtewUnTunstvzA6xuk0dR84X6WqsgvJxM13vMA+ OXgMwTKzrWSP1owBVcTJcqG0s6r2/kUb6YLbMzgC7nzn9sY4IRbRp2/4lfYXEBBk3Ft3 omtIWO8YSNeRvYKXGcTMZP2MqWmPOyfbhJ3Zp6WLMsQNi3pd9bO18QjgE0CNP4W3eNCL wuazkOr2pVb1UV/Gj82IsxDthDluU7nGuTilrdY/spYAhRc7/HMFkxaSW6hE0FJZvj3g bMr1amIR/WEKNbdM+Kgtaa6vsjxOxRqXvt8qNTbNn4KTkVTcCMWzMWoVbYmAdh0SVrSm 97Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694680882; x=1695285682; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0mOmlaN9lvuR4MyqMYvf5ql00ncNQbf+hrCj6K11x/o=; b=M0CVGsCTqK2FqDjHNczY5JP9EA1KLW5hbxCIylb6rgr+9/C1wIcKxavlsEazGewzt3 Kk6ImEOBPCDmKindV6gxnV+RvVgXnFUPKIQHNNH/wD73QvPoKuFhPnsJ5nlIi3Dvjjc2 D16I56Z52ojaSjZ8p8lxTvwaci0fqlJSd3yHP0vtzf5ofg8UeksxaLap65PP5H0J6uCB yu0CI4UIwIeid1JOApp/1KZobJBXEbddz1E51Azvh7OsASsZhPJ32/VaClHoHEkD6V8O 3hGGTzr/BRb34V8khuC8yl3GGtjXpY6zjRAcfupA9UO27VroVHQfAATcVxH50AsVOGj8 3Nkw== X-Gm-Message-State: AOJu0Yyzbd6fGUVl6+NChhzucgrI6OLQo3RuLdFjSDYHSsnd0LP+DnTS rzVH1NAaIxL/mkTw3z4Z2Z+lGov/y3mja3it9LtZQA== X-Google-Smtp-Source: AGHT+IHRtzgKZ4kKw45OU4B+K5V4vsff8eBwQZCxVpzML2zvV/fnMNvbi7Iul/dMDtz889bkZTtLQ0a6yg4uPw8tlOc= X-Received: by 2002:a05:651c:1045:b0:2bc:e470:1405 with SMTP id x5-20020a05651c104500b002bce4701405mr4232976ljm.46.1694680881695; Thu, 14 Sep 2023 01:41:21 -0700 (PDT) MIME-Version: 1.0 References: <20230913123226.2083892-1-jwakely@redhat.com> In-Reply-To: From: Christophe Lyon Date: Thu, 14 Sep 2023 10:41:12 +0200 Message-ID: Subject: Re: [PATCH] libstdc++: Remove some more unconditional uses of atomics To: Jonathan Wakely Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000f62b4b06054da3b4" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000f62b4b06054da3b4 Content-Type: text/plain; charset="UTF-8" On Thu, 14 Sept 2023 at 10:17, Jonathan Wakely wrote: > On Thu, 14 Sept 2023 at 08:44, Christophe Lyon > wrote: > > > > Hi, > > > > > > On Wed, 13 Sept 2023 at 14:32, Jonathan Wakely > wrote: > >> > >> Tested x86_64-linux and aarch64-linux. I intend to push this to trunk. > >> > >> -- >8 -- > >> > >> These atomics cause linker errors on arm4t where __sync_synchronize is > >> not defined. For single-threaded targets we don't need the atomics. > >> > > > > I ran the tests on arm-eabi default config (so, armv4t) with this patch, > and here is the list of remaining UNRESOLVED tests: > > 29_atomics/atomic/compare_exchange_padding.cc > > 29_atomics/atomic/cons/value_init.cc > > 29_atomics/atomic_float/value_init.cc > > 29_atomics/atomic_integral/cons/value_init.cc > > 29_atomics/atomic_ref/compare_exchange_padding.cc > > 29_atomics/atomic_ref/generic.cc > > 29_atomics/atomic_ref/integral.cc > > 29_atomics/atomic_ref/pointer.cc > > experimental/polymorphic_allocator/construct_pair.cc > > > > all of them are due to undefined reference to __sync_synchronize > > (some also reference __atomic_compare_exchange_4, etc...) > > > > > > IIUC, this should not be the case for > experimental/polymorphic_allocator/construct_pair.cc ? > > The reference for __sync_synchronize is near the beginning of test0[123] > > from a call to __atomic_load_n line 835 of atomic_base.h > > not sure where it comes from, the .loc directive indicates line 28 of > the testcase which is the opening brace > > Doh, I removed the atomics from but this is > , which has a separate implementation. > > I'll make a change to as well, thanks > for catching my silly mistake. > > You're welcome. So I'll shrink my patch and add dg-require-thread-fence only to the few 29_atomics tests listed above. Christophe --000000000000f62b4b06054da3b4--