From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2045.outbound.protection.outlook.com [40.107.7.45]) by sourceware.org (Postfix) with ESMTPS id 086B93875445; Wed, 4 Oct 2023 15:15:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 086B93875445 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JhEbGoyRR9zFKcf10mKnPtP75KoVJ9bqzzA+hH6NCfEtpvSdGYu5icpDXmBFfQfda83LNvyOfzl6pAXbYooLN2ZzyEZIKaNBnGMZhuyJThxcLsuZvvqXgLFe0T3r3jP2lHhvmEiLTR4/tiPpMx4D25FdAJ+SF9XxF22r8wlWrdzF7QRBGOFIMKsVmRm8pvpkwySbY5QWR92DJ7PJd9GYt/WoOkBVERqLVP439y5ckYYNIF35+CL70unlZIEqJb+dh/qEtU91IYI2wJZ3015jKRcDUCg6/Ac4vFTHy3RTRnFYkYSsXszLQeIFmrgFV9Dk+QJXkdTDUHKvQPohxKTJcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pAbnqczLl11gx28H4AarOarhnmY3wfQvNFbkvA2y4gU=; b=nWFT7DtRhsEAmdkEBia9tTS2/SghVfi9wT3ljDtIQPngGpQJ9qeF1BzY13CbHzHAga2dDiWDZZrbU33pgnf8IJ+d2Jlc/ZKcpAKNPw1Nc/9t/ERg4cXrpChstARAnjMMNIeDiLzNi3gv3NvRJouXnmamUL5dMX8/rMGiO63PnGgj/83i9zqIrhxNVRDiBc0UXgYt16jlLerIScOLdTyJ81mL5jUm9oiVBioczmX8ggSKaqOeawTD1ulZzRsImqD0wRG3R2b4Iu7pjfvPeRkO1/iAknS8skxN8hksT2jOSVbz6fSDLaLOL8+4PEl8ZmEwNGpxuN9tWgCq3mzDamZpHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 195.60.68.100) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=axis.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pAbnqczLl11gx28H4AarOarhnmY3wfQvNFbkvA2y4gU=; b=YbGvtuFUTsttglFGvgK3zhe1mxraoe2y+fGyQxF9YxSxL4AQUWyG4dQyNc9QyIuf4kj1/C0c2QqQKr3Iy2PD6eCMRleQeKyZOL1KYRzshplk0zxf3w+8QseGTlJTrnkZFwvU80q6G35/bro61jD9XmMGx+MJAQNXrN7efCKisdw= Received: from AS9PR05CA0312.eurprd05.prod.outlook.com (2603:10a6:20b:491::16) by PR3PR02MB6313.eurprd02.prod.outlook.com (2603:10a6:102:75::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.29; Wed, 4 Oct 2023 15:15:29 +0000 Received: from AM1PEPF000252DC.eurprd07.prod.outlook.com (2603:10a6:20b:491:cafe::b2) by AS9PR05CA0312.outlook.office365.com (2603:10a6:20b:491::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.26 via Frontend Transport; Wed, 4 Oct 2023 15:15:29 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Fail (protection.outlook.com: domain of axis.com does not designate 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; Received: from mail.axis.com (195.60.68.100) by AM1PEPF000252DC.mail.protection.outlook.com (10.167.16.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Wed, 4 Oct 2023 15:15:28 +0000 Received: from SE-MAILARCH01W.axis.com (10.20.40.15) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 4 Oct 2023 17:15:28 +0200 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAILARCH01W.axis.com (10.20.40.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 4 Oct 2023 17:15:28 +0200 Received: from se-intmail01x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 4 Oct 2023 17:15:28 +0200 Received: from pchp3.se.axis.com (pchp3.se.axis.com [10.88.21.53]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id 3041B26FF; Wed, 4 Oct 2023 17:15:28 +0200 (CEST) Received: by pchp3.se.axis.com (Postfix, from userid 171) id 2ADB12043D; Wed, 4 Oct 2023 17:15:28 +0200 (CEST) From: Hans-Peter Nilsson To: Jonathan Wakely CC: , , In-Reply-To: (message from Jonathan Wakely on Wed, 4 Oct 2023 09:29:43 +0100) Subject: Re: [PATCH 2/2] testsuite: Replace many dg-require-thread-fence with dg-require-atomic-exchange MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20230926143439.B589920431@pchp3.se.axis.com> <20231004031136.8B8BA2042A@pchp3.se.axis.com> Message-ID: <20231004151528.2ADB12043D@pchp3.se.axis.com> Date: Wed, 4 Oct 2023 17:15:28 +0200 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM1PEPF000252DC:EE_|PR3PR02MB6313:EE_ X-MS-Office365-Filtering-Correlation-Id: b885b339-e4e4-4ae1-7066-08dbc4ecbe57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +AqdWj3FRjLCrIsEdqU8l7Boqf+ZJzD4KOOJXn72urGCojmq9szawlHVEm4J7hbVqoW0f3dntsUELiVrLSpw+mHnT841h/vbIweqMYwQ88ZwfThVaGJ4Rh/R41WFeuYlJCHxXWKNHzXNBSlAtDBgXpJ7tjXqcvzDdiiAXoKA7K+xGN56gXO8AcZKQ7VfBXLpiuBNU7K3/ePiQf3fdQScFFGJXIXBovwcorklDV8SGldHdqzrVuClJqN9hY8On4Hb7vcy5wRs86H5TdF7Uz6p1fzNujgaxMjcKNpfT3MQhO7juUQI7wb4NGrELr9sTB/WYiqNXm8QxGEiRiEE423iCUShbIzXdGxNI20SaqUGPWcr5e7/2uY4OnLfAVIUEZl1MgT5sC07hwfWPFH3hGi11VmUSdCGr0d91KYKSNt9lYmO9kRYd7kALqbIK8NX6N7dNFitEsidfsJgb0S5Uhnfm4q7NP4kEZ1nKwi++uV5kgktQJTbDuuFt3EMBUOTyMw8uO+YhgLyX/Fs35GYmHsjBL59RScTmBm2ybEayzzMvgwvQB6XxRoP9sdvznKl5xcXa6SGVbL2jWLTlTFbhE7QLwf/0/B6WVykD/qLSodrYeXo2MQBRHBs2mndfD4RNCu1B2zYmoI2SMIJJ/q74r1GfuFifyD5ALufC2Rx8RDqoWmewcUvVz5QfaF10RmDCgzxlRQDNDiK2H0L2l2aKgHH2vtdvcmYonUhpAmI84LtBxym0xB5FUmCK1wy0iNNeqcqYkCJKOV/i7m7Ib663uD/eQ== X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(396003)(376002)(346002)(39860400002)(230922051799003)(186009)(82310400011)(451199024)(1800799009)(64100799003)(36840700001)(40470700004)(46966006)(40480700001)(5660300002)(2906002)(8936002)(426003)(6266002)(336012)(36860700001)(356005)(478600001)(26005)(47076005)(82740400003)(1076003)(81166007)(40460700003)(8676002)(4326008)(316002)(70206006)(6916009)(42186006)(41300700001)(70586007)(54906003)(33656002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2023 15:15:28.7003 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b885b339-e4e4-4ae1-7066-08dbc4ecbe57 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AM1PEPF000252DC.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR02MB6313 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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: > From: Jonathan Wakely > Date: Wed, 4 Oct 2023 09:29:43 +0100 > The new dg-require proc checks for __atomic_exchange, which is not the > same as compare-exchange, and not the same as test-and-set on > atomic_flag. Does it just happen to be true for arm that the presence > of __atomic_exchange also implies the other atomic operations? I missed pointing out that if the target implements something that emits actual insns for __atomic_exchange (and/or __atomic_compare_exchange), it has also implemented test-and-set. Cf. optabs.cc:expand_atomic_test_and_set (at r14-4395-g027a94cf32be0b). Similarly a insn-level __atomic_compare_exchange implementation (atomic_compare_and_swapM) also does it for __atomic_exchange. > The new proc also only tests it for int, which presumably means none > of these tests rely on atomics for long long being present. Some of > the tests use atomics on pointers, which should work for ILP32 targets > if atomics work on int, but the new dg-require-atomic-exchange isn't > sufficient to check that it will work for pointers on LP64 targets. Right, I'll amend to test a uintptr_t... > Maybe it happens to work today for the targets where we have issues, > but we seem to be assuming that there will be no LP64 targets where > these atomics are absent for 64-bit pointers. Are there supported > risc-v ISA subsets where that isn't true? ...but generally, I'd like to leave future amendments like that to the Next Guy, just like the Previous Guy left dg-require-thread-fence for me (us) to split up. But, perhaps we can prepare for such amendments by giving it a more specific name: suggesting dg-require-atomic-cmpxchg-word (bikeshedding opportunity), testing __atomic_compare_exchange. IOW, I don't think we should make a distinction, looking for other operations and sizes at this time. > And we're assuming that > __atomic_exchange being present implies all other ops are present, > which seems like a bad assumption to me. I would be more confident > testing for __atomic_compare_exchange, because with a wait-free CAS > you can implement any other atomic operation, but the same isn't true > for __atomic_exchange. Yes, I switched them around. New version coming up. brgds, H-P