From patchwork Fri Nov 11 14:22:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 18846 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp768720wru; Fri, 11 Nov 2022 06:23:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf6A9zjfLPWWzQdBDTrb6gbKniphaWdCxVlDVXECq07542IhvCdp7b4EoYmB8BQCaM6A6i0i X-Received: by 2002:a05:6402:148c:b0:458:d7b5:9793 with SMTP id e12-20020a056402148c00b00458d7b59793mr1568289edv.377.1668176610774; Fri, 11 Nov 2022 06:23:30 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hg2-20020a1709072cc200b0078dc3cb8b41si2160623ejc.507.2022.11.11.06.23.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:23:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=XgZZKqbj; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 706963858298 for ; Fri, 11 Nov 2022 14:23:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 706963858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668176605; bh=sIVk4CTK1iJXlslFoEanPhNdTlF9EtzgLpJ0tIX08Hc=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=XgZZKqbj0BneHrs1oOmuVHJmEsSkIUamgcGnN2C/OlwkkTYN1ihvcYEsyXwxZyQw1 faRuGIj0BpqsCXXSLl58C/HxAXSyQGbl0R0FMDLn9q29hGq8wbqVkPrjrJZ4pxvYdg Fti8Ncvg2N/kackvk8/n3U7T6lvw3+d+71tpV+8k= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2081.outbound.protection.outlook.com [40.107.247.81]) by sourceware.org (Postfix) with ESMTPS id 9C8103858D20 for ; Fri, 11 Nov 2022 14:22:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C8103858D20 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ZJsEvdG57wmvxhxL1BvQTgluqU2PQo7VKutUr9DtyX7j/EdEwC6Mu/L9IEnnyAepAzNdS8Qbw5tXNTIHmvnrAqyVKzb21hDEGzWV6Q2sfA/2t/oyQxrIy67x0a1VMARsrl1vbQZiVpEz6QE0ZJXvfp4lLFgDJ1gwZitWO3mHoRX62UsSSuXq0DXEFYnnJkcJUIP3RzHQbaDxILFjFGWkOc1G9kt2ehzP/sLPHHJXQ0LNPx1OBXC8TV+MxHLt19U6i5XuBPfhj5aanQbQXFBOeXxncFHez0Yhs2NtVeEY/BBh8zNR+1aXDGyLLxofsGOKER9LfBzKITiTHEtm+NuETw== ARC-Message-Signature: i=2; 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=sIVk4CTK1iJXlslFoEanPhNdTlF9EtzgLpJ0tIX08Hc=; b=QkwHyBtwzm5JYMSMKYuyvAqnqFjqYomrQrDNWJzxlNLHLKnDqVyWrDEbDOmUuikCM5PfHGHKcsByUW8Mmkcj8IT1f++7eP+fIS4YZElgb4QUOa+VaQUlc0H27jlc1HkwgynnRhr1ehFNVE9pM+RFPFIVekMki9LFNvrz7Xvq6dQaaQyUGjSdNH4xyPyCnSgdTUvhUgKsdngFclaOe+b8hF/gu+br7dZCJaI9nhxAf8XVJ5g2iYC44qMBLQU8s2YIcnh2gPWiOIzBpVEXg0bH1wwP0gS3dH+Bjuzmb8RQNV+3Zy0/fLZNYbYGDf80UgWfcbf+9WJSYA1ucPk03LP+dQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) Received: from FR3P281CA0133.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:94::20) by DBBPR08MB6089.eurprd08.prod.outlook.com (2603:10a6:10:206::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 14:22:32 +0000 Received: from VI1EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:d10:94:cafe::1d) by FR3P281CA0133.outlook.office365.com (2603:10a6:d10:94::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 14:22:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VI1EUR03FT033.mail.protection.outlook.com (100.127.144.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12 via Frontend Transport; Fri, 11 Nov 2022 14:22:31 +0000 Received: ("Tessian outbound 73ab5f36653e:v130"); Fri, 11 Nov 2022 14:22:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4c5638220cc3154b X-CR-MTA-TID: 64aa7808 Received: from 5eb7aee474a3.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C7F773A6-8A27-4E07-A41F-2A74C8FFF3C6.1; Fri, 11 Nov 2022 14:22:18 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5eb7aee474a3.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 11 Nov 2022 14:22:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OajOJrVMb1thljS0fTIf4oScV3sv8xhkIxvqk2stOESAjsTYpu7dLMvTdB4ZxJMl65zm8s8QYx0j6MJjlN0kP0M8xrALBmkPLNGX9hoUFVAeJ6xvjCO1vno3+CpTA/NT+JEGYDQKKLdRVnu8woX0r+xGmvwrs3RBBcGQZAbvmJWRF0H8YUSgcvYhqOQZp30BZUsiOBz1eDrYRrobVziTVxMyp2DFZkgyCvTTGWQw+6ooO0rZoVeLw9lppq3wfEcw1tCjL4Q+n9XZ+d6RAyzyzuJPC/hhsObQnJg4OGaILcwUodasHbCSjvESYkUouSKGPW+iWJaJhokEFg4M8l2xng== 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=sIVk4CTK1iJXlslFoEanPhNdTlF9EtzgLpJ0tIX08Hc=; b=mNMczshSQZFE4A5cskduoIv6Gev/XXJp2LRkg2v3+LyeXNbEi2LXxb8GgxWkPIaS0v7KKloBqwLU/H1NMib3Dc7pZ5rjXQPbUHDlU+ELX/TryDN8XIlnMtcRxiuuskoPe5JtRuWmyy2SuNbBjAS6SqVtnzQIDIkgNvMqH4pmyW1Hf5RYFCSx9gT8eSU9AoW7wyMCY8+F5zyx5AlyGlmIbdg1Zp48HbZKVU1hkrj565aUvtqQnz4pP2Li53wwKusn94g9oRAQBowsKn1LwR3I2Opi+MjFlOTZdzgeCw4C3LF1FZAPH60Zpp+E4HCVcMKiTPni1NL8UGRyU4wnNEjXRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by DU0PR08MB8279.eurprd08.prod.outlook.com (2603:10a6:10:40d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11; Fri, 11 Nov 2022 14:22:17 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::4c73:7d14:fc39:a3cb]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::4c73:7d14:fc39:a3cb%3]) with mapi id 15.20.5813.013; Fri, 11 Nov 2022 14:22:16 +0000 To: GCC Patches CC: Richard Sandiford , Kyrylo Tkachov Subject: [PATCH] libatomic: Add support for LSE and LSE2 Thread-Topic: [PATCH] libatomic: Add support for LSE and LSE2 Thread-Index: AQHY9daotEyJo5c7lUmJKpeQyhTuFA== Date: Fri, 11 Nov 2022 14:22:16 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|DU0PR08MB8279:EE_|VI1EUR03FT033:EE_|DBBPR08MB6089:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b02173d-1917-40bc-098a-08dac3f02b94 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: WYiO+Bvs31i3YtupT9ExVyHtw2t69AUz2bMjiDfADYcQKGRc7nhTzbOEXRK+QAzsqgRXF2sUeX2TkFulppPbxs9TJaYWjPx+U94lUpYKXS9ne5yPEmB6BZrQpcCLbPYlcTZSNP5SUAGDRdQZ7JDJVJbUEriCrlMKc8kb8Fil9jG+oKL2pt1kVz9DrLK1SpgMPEbSklYNL6ZbhOlduc2sFh2t9SaawHQDcU8DK80l585cp2kdBI/8AQbEDGW+VnOir2dLTWoqa+WlJ8FtG1TXI4QvVfDtCPyz9x7Be2FsH9BDVbAKLhxnDPUf7tnm3/ejEPcu3AzRzUCeR/rq48oQ9hzBk9bFQXFYY/BjJaAPuWNT6NXQVGqWS+jJsz8yHXgCfhnRfRCUchFWgeNF1qcjy800tjKHroKZd6IImWXneu4h/1oq+cbCLZ8h/2uH2KxUQkx/bmiY67SU4rLnCLSE4CO7bbMMN0k9d3zzEWtjqUfosDvUlC7Pps+ajkI7e9OJZiOVI6fg5sMP1CpgCybHNvSe11oeP0cYTvnMOiFkOCoYruL7np++HEYHV2XZ+csIOrcm+qVZpXXdl3dJyJrLj7qK2UuBxxAzlaOlrrNczcsf5WgfpVtANLCHSpbtpB1K1FhCIsnF5JEBvhGzGKp7clJusQJpkxK47Plu4eXTY7dUs5MFy4IU2FO5oL7W90IUKc0esAIRQhS6VBX5lfiIKoiAxntks6pDKpLkYqOMe5YVD/JSsFDvktN8QKn03F1aUc5UVa8AS7oPPKjn8+8iC2cgGBdYnIoF2LcYTCiB3fUOuMZ+RBoxSgt5JyAL4z3H X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8982.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(346002)(39860400002)(396003)(366004)(451199015)(38070700005)(33656002)(86362001)(55016003)(186003)(30864003)(26005)(83380400001)(2906002)(9686003)(122000001)(316002)(6506007)(7696005)(64756008)(4326008)(91956017)(66476007)(66946007)(66556008)(8676002)(71200400001)(52536014)(5660300002)(38100700002)(478600001)(41300700001)(76116006)(6916009)(8936002)(54906003)(66446008)(2004002)(579004); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8279 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4caef429-e358-4c09-ba75-08dac3f0229e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N09+FAmmoclSBH9w1QVktwEgIssZWk4apUR8bAJK0vLJme+UDGaBBaL+40iy/h5qgrACQWJ/UhoJR89Gk91Y0XsTDN3UVedXcIwYDn803uESTCVb0KZ9Mj8H9fcTR0MjZN94Uv3q6FKVNY/VgYdWtDrutrHy2l0fgqDhH1dahp8T9na0zlHIj4e8B0AgHy9z/tiiypyetahkrFSilKjNopE8ZE1DVRyrb4o8VI3Aj0pTxyYEyUfVJJ0kuaQO0J+/NtMXlMpfWthIcLuyecBHCUGCn4lgyVdTEFPbFqEqIJz1dEYQOq/HZpYGFA3COalvT8S7sdv4DxjYz2Vi4ChrhQbpZ2rAQJBshCy/NJyZtFwclpiinn9JowmHUolOza/K+L92z28FUgwWyWeCJo01kIhUwiOuCQSmIl3VcsOuCC411f78+fj4nIqrgSTBhYYy1YIBO912u6sG6iYff1Ne3aR5tAVoSRPK4TkKOOSj+7mqlt9hcOEosXriBCTcwmhDdheguAeClNUXCatyCtmxD3CJ0ApDGs2jKJO4OweSwWXJtfpZNXYmoSpE4ikHtPIvDDWF8KRHbnBlzbY3bCPAMpdibAcEVSa9pUHxxshIQFAEDAz4Ih/5FKIyiewjcmiu0m926CO0wKE+lUEXM9CvsjaFv4G1UUf/lpc3oa0+syqE4mb+O9HUZ0NEne4PF/0DUU/EvE+Gze7+C7fU+1tshM7nGD+4LcO57H/SItXR6aAttLJe6HpACbUfQTnGn8E2vQdB6n70lz7WidaRm6p8F0KUZuYLgiB5Og6gjSbtbfgH0PI1dvkIEvysXucvPBIE X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(396003)(346002)(39860400002)(451199015)(36840700001)(46966006)(40470700004)(30864003)(82310400005)(86362001)(2906002)(40460700003)(33656002)(356005)(82740400003)(4326008)(7696005)(6506007)(81166007)(316002)(26005)(70206006)(6916009)(54906003)(9686003)(70586007)(478600001)(8676002)(8936002)(40480700001)(5660300002)(36860700001)(52536014)(47076005)(336012)(83380400001)(41300700001)(55016003)(186003)(2004002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 14:22:31.5161 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b02173d-1917-40bc-098a-08dac3f02b94 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VI1EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6089 X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SCC_10_SHORT_WORD_LINES, SCC_20_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Wilco Dijkstra via Gcc-patches From: Wilco Dijkstra Reply-To: Wilco Dijkstra Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749209957414349551?= X-GMAIL-MSGID: =?utf-8?q?1749209957414349551?= Add support for AArch64 LSE and LSE2 to libatomic. Disable outline atomics, and use LSE ifuncs for 1-8 byte atomics and LSE2 ifuncs for 16-byte atomics. On Neoverse V1, 16-byte atomics are ~4x faster due to avoiding locks. Note this is safe since we swap all 16-byte atomics using the same ifunc, so they either use locks or LSE2 atomics, but never a mix. This also improves ABI compatibility with LLVM: its inlined 16-byte atomics are compatible with the new libatomic if LSE2 is supported. Passes regress, OK for commit? libatomic/ Makefile.in: Regenerated with automake 1.15.1. Makefile.am: Add atomic_16.S for AArch64. configure.tgt: Disable outline atomics in AArch64 build. config/linux/aarch64/atomic_16.S: New file - implementation of ifuncs for 128-bit atomics. config/linux/aarch64/host-config.h: Enable ifuncs, use LSE (HWCAP_ATOMICS) for 1-8-byte atomics and LSE2 (HWCAP_USCAT) for 16-byte atomics. diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am index d88515e4a03bd812334ae0b7bf4c0bba119455dc..41e5da28512150780a2018386e22b4e70afcfa3f 100644 --- a/libatomic/Makefile.am +++ b/libatomic/Makefile.am @@ -127,6 +127,8 @@ if HAVE_IFUNC if ARCH_AARCH64_LINUX IFUNC_OPTIONS = -march=armv8-a+lse libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS))) +libatomic_la_SOURCES += atomic_16.S + endif if ARCH_ARM_LINUX IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in index 80d25653dc75cca995c8b0b2107a55f1234a6d52..89e29fc60a7fb74341b2f0f805e461847073082c 100644 --- a/libatomic/Makefile.in +++ b/libatomic/Makefile.in @@ -90,13 +90,14 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@am__append_1 = $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS))) -@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@am__append_2 = $(foreach \ +@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@am__append_2 = atomic_16.S +@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@am__append_3 = $(foreach \ @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@ s,$(SIZES),$(addsuffix \ @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@ _$(s)_1_.lo,$(SIZEOBJS))) \ @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@ $(addsuffix \ @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@ _8_2_.lo,$(SIZEOBJS)) -@ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@am__append_3 = $(addsuffix _8_1_.lo,$(SIZEOBJS)) -@ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@am__append_4 = $(addsuffix _16_1_.lo,$(SIZEOBJS)) \ +@ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@am__append_4 = $(addsuffix _8_1_.lo,$(SIZEOBJS)) +@ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@am__append_5 = $(addsuffix _16_1_.lo,$(SIZEOBJS)) \ @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@ $(addsuffix _16_2_.lo,$(SIZEOBJS)) subdir = . @@ -154,8 +155,11 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) +@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@am__objects_1 = \ +@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@ atomic_16.lo am_libatomic_la_OBJECTS = gload.lo gstore.lo gcas.lo gexch.lo \ - glfree.lo lock.lo init.lo fenv.lo fence.lo flag.lo + glfree.lo lock.lo init.lo fenv.lo fence.lo flag.lo \ + $(am__objects_1) libatomic_la_OBJECTS = $(am_libatomic_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -165,9 +169,9 @@ libatomic_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libatomic_la_LDFLAGS) $(LDFLAGS) -o $@ libatomic_convenience_la_DEPENDENCIES = $(libatomic_la_LIBADD) -am__objects_1 = gload.lo gstore.lo gcas.lo gexch.lo glfree.lo lock.lo \ - init.lo fenv.lo fence.lo flag.lo -am_libatomic_convenience_la_OBJECTS = $(am__objects_1) +am__objects_2 = gload.lo gstore.lo gcas.lo gexch.lo glfree.lo lock.lo \ + init.lo fenv.lo fence.lo flag.lo $(am__objects_1) +am_libatomic_convenience_la_OBJECTS = $(am__objects_2) libatomic_convenience_la_OBJECTS = \ $(am_libatomic_convenience_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) @@ -185,6 +189,16 @@ am__v_at_1 = depcomp = $(SHELL) $(top_srcdir)/../depcomp am__depfiles_maybe = depfiles am__mv = mv -f +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CCASFLAGS) $(CCASFLAGS) +AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) +am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) +am__v_CPPAS_0 = @echo " CPPAS " $@; +am__v_CPPAS_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -369,6 +383,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -404,9 +419,8 @@ noinst_LTLIBRARIES = libatomic_convenience.la @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun libatomic_version_info = -version-info $(libtool_VERSION) libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags) -libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ - fenv.c fence.c flag.c - +libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c \ + init.c fenv.c fence.c flag.c $(am__append_2) SIZEOBJS = load store cas exch fadd fsub fand fior fxor fnand tas EXTRA_libatomic_la_SOURCES = $(addsuffix _n.c,$(SIZEOBJS)) libatomic_la_DEPENDENCIES = $(libatomic_la_LIBADD) $(libatomic_version_dep) @@ -432,8 +446,8 @@ all_c_files := $(foreach dir,$(search_path),$(wildcard $(dir)/*.c)) # Then sort through them to find the one we want, and select the first. M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ - _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \ - $(am__append_3) $(am__append_4) + _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_3) \ + $(am__append_4) $(am__append_5) @ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 @@ -450,7 +464,7 @@ all: auto-config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .S .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../multilib.am $(am__configure_deps) @@ -559,6 +573,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fence.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fenv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flag.Plo@am__quote@ @@ -570,6 +585,27 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Plo@am__quote@ +.S.o: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< + +.S.obj: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.S.lo: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po diff --git a/libatomic/config/linux/aarch64/atomic_16.S b/libatomic/config/linux/aarch64/atomic_16.S new file mode 100644 index 0000000000000000000000000000000000000000..5f23dba4529528c39425221402323d07a14cc518 --- /dev/null +++ b/libatomic/config/linux/aarch64/atomic_16.S @@ -0,0 +1,422 @@ +/* Copyright (C) 2022 Free Software Foundation, Inc. + + This file is part of the GNU Atomic Library (libatomic). + + Libatomic is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + Libatomic is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + + + .arch armv8-a+lse + +#define ENTRY(name) \ + .global name; \ + .hidden name; \ + .type name,%function; \ + .p2align 4; \ +name: \ + .cfi_startproc; \ + hint 34 // bti c + +#define END(name) \ + .cfi_endproc; \ + .size name, .-name; + +#define res0 x0 +#define res1 x1 +#define in0 x2 +#define in1 x3 +#define tmp0 x6 +#define tmp1 x7 +#define exp0 x8 +#define exp1 x9 + +#ifdef __AARCH64EB__ +# define reslo x1 +# define reshi x0 +# define inlo x3 +# define inhi x2 +# define tmplo x7 +# define tmphi x6 +#else +# define reslo x0 +# define reshi x1 +# define inlo x2 +# define inhi x3 +# define tmplo x6 +# define tmphi x7 +#endif + +#define RELAXED 0 +#define CONSUME 1 +#define ACQUIRE 2 +#define RELEASE 3 +#define ACQ_REL 4 +#define SEQ_CST 5 + + +ENTRY (libat_load_16_i1) + cbnz w1, 1f + ldp res0, res1, [x0] + ret +1: + cmp w1, ACQUIRE + b.hi 2f + ldp res0, res1, [x0] + dmb ishld + ret +2: + ldp res0, res1, [x0] + dmb ish + ret +END (libat_load_16_i1) + + +ENTRY (libat_store_16_i1) + cbnz w4, 1f + stp in0, in1, [x0] + ret +1: + dmb ish + stp in0, in1, [x0] + cmp w4, SEQ_CST + beq 2f + ret +2: + dmb ish + ret +END (libat_store_16_i1) + + +ENTRY (libat_exchange_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + stxp w4, in0, in1, [x5] + cbnz w4, 1b + ret +2: + cmp w4, ACQUIRE + b.hi 4f +3: + ldaxp res0, res1, [x5] + stxp w4, in0, in1, [x5] + cbnz w4, 3b + ret +4: + cmp w4, RELEASE + b.ne 6f +5: + ldxp res0, res1, [x5] + stlxp w4, in0, in1, [x5] + cbnz w4, 5b + ret +6: + ldaxp res0, res1, [x5] + stlxp w4, in0, in1, [x5] + cbnz w4, 6b + ret +END (libat_exchange_16_i1) + + +ENTRY (libat_compare_exchange_16_i1) + ldp exp0, exp1, [x1] + mov tmp0, exp0 + mov tmp1, exp1 + cbz w5, 2f + cmp w5, RELEASE + b.hs 3f + caspa exp0, exp1, in0, in1, [x0] +0: + cmp exp0, tmp0 + ccmp exp1, tmp1, 0, eq + bne 1f + mov x0, 1 + ret +1: + stp exp0, exp1, [x1] + mov x0, 0 + ret +2: + casp exp0, exp1, in0, in1, [x0] + b 0b +3: + b.hi 4f + caspl exp0, exp1, in0, in1, [x0] + b 0b +4: + caspal exp0, exp1, in0, in1, [x0] + b 0b +END (libat_compare_exchange_16_i1) + + +ENTRY (libat_fetch_add_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + adds tmplo, reslo, inlo + adc tmphi, reshi, inhi + stxp w4, tmp0, tmp1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + adds tmplo, reslo, inlo + adc tmphi, reshi, inhi + stlxp w4, tmp0, tmp1, [x5] + cbnz w4, 2b + ret +END (libat_fetch_add_16_i1) + + +ENTRY (libat_add_fetch_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + adds reslo, reslo, inlo + adc reshi, reshi, inhi + stxp w4, res0, res1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + adds reslo, reslo, inlo + adc reshi, reshi, inhi + stlxp w4, res0, res1, [x5] + cbnz w4, 2b + ret +END (libat_add_fetch_16_i1) + + +ENTRY (libat_fetch_sub_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + subs tmplo, reslo, inlo + sbc tmphi, reshi, inhi + stxp w4, tmp0, tmp1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + subs tmplo, reslo, inlo + sbc tmphi, reshi, inhi + stlxp w4, tmp0, tmp1, [x5] + cbnz w4, 2b + ret +END (libat_fetch_sub_16_i1) + + +ENTRY (libat_sub_fetch_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + subs reslo, reslo, inlo + sbc reshi, reshi, inhi + stxp w4, res0, res1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + subs reslo, reslo, inlo + sbc reshi, reshi, inhi + stlxp w4, res0, res1, [x5] + cbnz w4, 2b + ret +END (libat_sub_fetch_16_i1) + + +ENTRY (libat_fetch_or_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + orr tmp0, res0, in0 + orr tmp1, res1, in1 + stxp w4, tmp0, tmp1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + orr tmp0, res0, in0 + orr tmp1, res1, in1 + stlxp w4, tmp0, tmp1, [x5] + cbnz w4, 2b + ret +END (libat_fetch_or_16_i1) + + +ENTRY (libat_or_fetch_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + orr res0, res0, in0 + orr res1, res1, in1 + stxp w4, res0, res1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + orr res0, res0, in0 + orr res1, res1, in1 + stlxp w4, res0, res1, [x5] + cbnz w4, 2b + ret +END (libat_or_fetch_16_i1) + + +ENTRY (libat_fetch_and_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + and tmp0, res0, in0 + and tmp1, res1, in1 + stxp w4, tmp0, tmp1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + and tmp0, res0, in0 + and tmp1, res1, in1 + stlxp w4, tmp0, tmp1, [x5] + cbnz w4, 2b + ret +END (libat_fetch_and_16_i1) + + +ENTRY (libat_and_fetch_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + and res0, res0, in0 + and res1, res1, in1 + stxp w4, res0, res1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + and res0, res0, in0 + and res1, res1, in1 + stlxp w4, res0, res1, [x5] + cbnz w4, 2b + ret +END (libat_and_fetch_16_i1) + + +ENTRY (libat_fetch_xor_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + eor tmp0, res0, in0 + eor tmp1, res1, in1 + stxp w4, tmp0, tmp1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + eor tmp0, res0, in0 + eor tmp1, res1, in1 + stlxp w4, tmp0, tmp1, [x5] + cbnz w4, 2b + ret +END (libat_fetch_xor_16_i1) + + +ENTRY (libat_xor_fetch_16_i1) + mov x5, x0 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + eor res0, res0, in0 + eor res1, res1, in1 + stxp w4, res0, res1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + eor res0, res0, in0 + eor res1, res1, in1 + stlxp w4, res0, res1, [x5] + cbnz w4, 2b + ret +END (libat_xor_fetch_16_i1) + + +ENTRY (libat_fetch_nand_16_i1) + mov x5, x0 + mvn in0, in0 + mvn in1, in1 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + orn tmp0, in0, res0 + orn tmp1, in1, res1 + stxp w4, tmp0, tmp1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + orn tmp0, in0, res0 + orn tmp1, in1, res1 + stlxp w4, tmp0, tmp1, [x5] + cbnz w4, 2b + ret +END (libat_fetch_nand_16_i1) + + +ENTRY (libat_nand_fetch_16_i1) + mov x5, x0 + mvn in0, in0 + mvn in1, in1 + cbnz w4, 2f +1: + ldxp res0, res1, [x5] + orn res0, in0, res0 + orn res1, in1, res1 + stxp w4, res0, res1, [x5] + cbnz w4, 1b + ret +2: + ldaxp res0, res1, [x5] + orn res0, in0, res0 + orn res1, in1, res1 + stlxp w4, res0, res1, [x5] + cbnz w4, 2b + ret +END (libat_nand_fetch_16_i1) + + +ENTRY (libat_test_and_set_16_i1) + mov w2, 1 + cbnz w1, 2f + swpb w0, w2, [x0] + ret + +2: swpalb w0, w2, [x0] + ret +END (libat_test_and_set_16_i1) + diff --git a/libatomic/config/linux/aarch64/host-config.h b/libatomic/config/linux/aarch64/host-config.h index 769ba6edc600099122b03af754cbbb079134596a..d9b5ab31bc85cfe1d5f3773c42442e408b174cbc 100644 --- a/libatomic/config/linux/aarch64/host-config.h +++ b/libatomic/config/linux/aarch64/host-config.h @@ -22,14 +22,22 @@ . */ #if HAVE_IFUNC -#include +#include -# ifdef HWCAP_ATOMICS -# define IFUNC_COND_1 (hwcap & HWCAP_ATOMICS) +#ifdef HWCAP_USCAT +# if N == 16 +# define IFUNC_COND_1 (hwcap & HWCAP_USCAT) # else -# define IFUNC_COND_1 (false) +# define IFUNC_COND_1 (hwcap & HWCAP_ATOMICS) # endif -# define IFUNC_NCOND(N) (1) +#else +# define IFUNC_COND_1 (false) +#endif +#define IFUNC_NCOND(N) (1) + +#if N == 16 && IFUNC_ALT != 0 +# define DONE 1 +#endif #endif /* HAVE_IFUNC */ diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt index 33f8c91ce7718336b05e1077d3e91feb5b706730..113420f7beca143b5040fc9eb871461c2163ae44 100644 --- a/libatomic/configure.tgt +++ b/libatomic/configure.tgt @@ -49,6 +49,7 @@ case "${target_cpu}" in fi ;; esac + XCFLAGS="${XCFLAGS} -mno-outline-atomics" ;; arm*) ARCH=arm