From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id 471673857C66 for ; Thu, 14 Sep 2023 08:41:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 471673857C66 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-x22a.google.com with SMTP id 38308e7fff4ca-2bcb50e194dso10633031fa.3 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=vXLHLyATRknp9WE35OY4Mj+4/cbbb/+tTOdmd70S6XzQfNBCSTlIu2TAItSsgkNWnx kBVFxJOB8Hp92CCDySu7A/YXpA9drHGgaJG506czHOiAeD457tst+n6j2Q7MMC9etd3y tzG8Bde5VZyRNqr7bUAC8ADj/Yh4WuRelN+GuTohl95uG2A7TykmvOPbB8s8tW85Kzil p6oScnMlz50PVyhjyAa+asl04mVtMUzbwVD4CzFhF8XExgql4bdaXEU1MjpHsd0E0A5/ 6wzfwQ+F46gceAGU/C0AQG1ks6OHu3Ixd0dNEwWvd+f22HtrZJLDCkq/XEcLp9jy4U/J OaSg== X-Gm-Message-State: AOJu0YxyV/MVKD1A/W9ut6kf0qLmOnUIs75EExD4GvAXRq+BNVuV2KNf GTzbzivm1iHUPM0RmQCXarP3XaWqBdP8S+NyT7+Ra48aZOdT6prkn0M= 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=-2.8 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=unavailable 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--