From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id B83183858D1E for ; Thu, 19 Oct 2023 16:41:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B83183858D1E 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 B83183858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.119.248.222 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697733689; cv=none; b=oqkY/p2922HsDdpNpiyMoEVDmAxAPTIY/dl41jL5I7nfh2yC4Gb+Ilu7hoLxbx1YUR70Cw8T8cxdLZeyfFh9bZGtI6DSFikqHyEspjf5ZEdWSEZRT6cCp4iH9bBTTNsxj0pwbTlVN/+nXWuR9zprN0458ZH3nGUlyizkMr3ph94= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697733689; c=relaxed/simple; bh=eBSUH+QDUxtLdRTz1eocLt0fk0vzgNsCUiDxwcRZIKw=; h=From:Mime-Version:Subject:Message-Id:Date:To; b=VlAZT7Ucj3JpkEBYsizwz1zozryjDuiD4FwV3gJGDHoeJYlCYlvT2qGps8u46EG6pMXRx2XZcdVYzGbT0oHFhh9dIZE2BeiAhxcZ+dj1hfkG68nW+3S+HMvEgtAhBU9Ur+sipPhdnVGGkitv6WzWKeEztirEFMWWuWW3P5JfpuM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: (qmail 1594 invoked from network); 19 Oct 2023 16:41:25 -0000 X-APM-Out-ID: 16977336850159 X-APM-Authkey: 257869/1(257869/1) 2 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 19 Oct 2023 16:41:25 -0000 From: Iain Sandoe Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Arm assembler crc issue Message-Id: <57A1A46D-12B5-4AC3-8E44-7D952B056E5F@sandoe.co.uk> Date: Thu, 19 Oct 2023 17:41:24 +0100 Cc: GCC Development To: Richard Sandiford X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,KAM_COUK,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,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, I am being bitten by a problem that falls out from the code that emits .arch Armv8.n-a+crc when the arch is less than Armv8-r. The code that does this, in gcc/common/config/aarch64 is quite recent = (2022-09). ------ (I admit the permutations are complex and I might have miss-analyzed) - = but it appears that llvm assembler (for mach-o, at least) sees an = explict mention of an attribute for a feature which is mandatory at a = specified arch level as demoting that arch to the minimum that made the = explicit feature mandatory. Of course, it could just be a bug in the = handling of transitive feature enables... the problem is that, for example: .arch Armv8.4-a+crc no longer recognises fp16 insns. (and appending +fp16 does not fix = this). =3D=3D=3D=3D Even if upstream LLVM is deemed to be buggy (it does not do what I would = expect, at least), and fixed - I will still have a bunch of assembler = versions that are broken (before the fix percolates through to = downstream xcode) - and the LLVM assembler is the only current option = for Darwin. So, it seems that this ought to be a reasonable configure test: .arch armv8.2-a .text m: crc32b w0, w1, w2=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. - I am asking here before constructing the patch, in case there=E2=80=99s = some reason that doing this at configure time is not acceptable. thanks Iain