From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 437F13858D1E for ; Thu, 19 Oct 2023 21:58:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 437F13858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sandoe.co.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 437F13858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.119.248.221 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697752693; cv=none; b=W6IEqQBvmyEAnDAMWowUIgTj44Pb4wOWB1AgyyDKBssZwxL+HQXywdqq1fNlXH5Qqg4sFrcsrMarHr+SzmiOQzBzMEEJXwt2umMzrxQZfOzIRsbirBgAPlN8pDyowKmI3+rFoovfy+4fyqa9X7Hqu35ZLu8uYLSY7xO3HTsM+qQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697752693; c=relaxed/simple; bh=SexXWtU5INnJnvhMl11yFpwUfH+hQk5X5eZW3r16TPg=; h=Mime-Version:Subject:From:Date:Message-Id:To; b=WUcjuifs+UpQK3k7rL+/mLWqOUeZxU5pfBqCsVW51x4hFv2YKWPLGHbfe7rksYidXZ2So0V4hID+JShDfwAgKCz1xhNEaTxF/SfwXAcB4lJSMoXRJAhLxfAvNBDI/3GdG2EzRNJQHfzhE+vHEl8k2K2xvJpKIOFKpfIYQCTQG+c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: (qmail 23825 invoked from network); 19 Oct 2023 21:58:11 -0000 X-APM-Out-ID: 16977526902382 X-APM-Authkey: 257869/1(257869/1) 7 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 19 Oct 2023 21:58:11 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: Arm assembler crc issue From: Iain Sandoe In-Reply-To: Date: Thu, 19 Oct 2023 22:58:10 +0100 Cc: GCC Development Content-Transfer-Encoding: quoted-printable Message-Id: <38EDD868-06D5-46D7-B40B-5BC20FF55B74@sandoe.co.uk> References: <57A1A46D-12B5-4AC3-8E44-7D952B056E5F@sandoe.co.uk> To: Richard Sandiford X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,KAM_COUK,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Richard, > On 19 Oct 2023, at 22:49, Richard Sandiford = wrote: > Iain Sandoe writes: >> I am being bitten by a problem that falls out from the code that = emits >>=20 >> .arch Armv8.n-a+crc >>=20 >> when the arch is less than Armv8-r. >> The code that does this, in gcc/common/config/aarch64 is quite = recent (2022-09). >=20 > Heh. A workaround for one assembler bug triggers another assembler = bug. Indeed =E2=80=A6 the good news is that the LLVM bug seems fixed on = current release (17) and main. The bad news is that it will likely take some to percolate through (and = it won=E2=80=99t help released toolsets anyway). >> So, it seems that this ought to be a reasonable configure test: >>=20 >> .arch armv8.2-a >> .text >> m: >> crc32b w0, w1, w2=20 >>=20 >> and then emit HAS_GAS_AARCH64_CRC_BUG (for example) if that fails to = assemble which can be used to make the +crc emit conditional on a broken = assembler. >=20 > AIUI the problem was in the CPU descriptions, so I don't think this > would test for the old gas bug that is being worked around. I see, > Perhaps instead we could have a configure test for the bug that you've > found, and disable the crc workaround if so? OK - I=E2=80=99ll work in that direction, thanks Iain >=20 > Thanks, > Richard >=20 >>=20 >> - I am asking here before constructing the patch, in case there=E2=80=99= s some reason that doing this at configure time is not acceptable. >>=20 >> thanks >> Iain