From patchwork Wed Oct 23 10:35:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 99390 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DCEC63858CDB for ; Wed, 23 Oct 2024 10:39:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20624.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::624]) by sourceware.org (Postfix) with ESMTPS id 9FBB93858C35 for ; Wed, 23 Oct 2024 10:37:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FBB93858C35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9FBB93858C35 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2614::624 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729679826; cv=pass; b=hYt3uQRqqeyYu989KGDm8WdSSFXHPRyNyn8jQrYBxpnPdDYHQAUy3xUpCe3LwNJC2DfhPQmBiy1+UM38GqpRJeNg3ig587OSfLYK9tJf+iowNCzBWRX6z8aQJghUrxz+LGygXevX7/N5fBVJw7qtPm3AuZ74XFaUZhIbd4Mapkc= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729679826; c=relaxed/simple; bh=2heKqwioEZxRX0yKTpoKwvjKEvMgfcXx++IkLakab70=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=CV2HBdLhDvtOiOdu6nroz1lBdn4jby/O089UwJ7PLroYbGLOEKvIleTq8cr4pZtP5Cu+MNo95mL/ybjmW7UpF8R1vCa4gRG3aoVvimRQq4SzmAfarjanF2z9gN5ggCiyzcB12UJ1FoqEGXYr1hANZ2I6UAQe/j9AI6EVzz2mMWE= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=q/jrScQFi9R9i12c/+6Di5JRpvpf23E7G9MG9OYi3yGEHQSh5We3l7U0OFpg9vSACvHYhFxGen2IPS3km8D8zYLBekRUVZbpuM1A6N0YnBasknZ4BVrqJRaeBqO5WGhsxy9ARUY/DfeHshXoreYYy2dmllZxSxg3Ewe1AqCKEQCphvVZaaLjTUZPhIjuVu97EhwSkWoxxvqxOWKzHQKG/QfRQ2YFcdYTbhslgVem0U6MHq/pi1A+Mwj1jkhwyUxVoKi0ui8xvnZgf5inKLhHqVDJXw5Iv88YYeFPZLQQEAVSX1a4C10FNpBWtmc+vhxtDAqd70vefF3qEyfzxuR49g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=NNtUEY/tJTWyyIiNFdHlYR1HwV76rMguuZ4QmDwMpfA=; b=h4vmXd8NRCvFJbDV2GRImmy54LupeAymJq1JOPRfAL7P+QcAEksLEgjYNq/UDVYCx6lvFgoK9jh+THGLjQtgVUIlVpn3p++6JAg562b4TX0Dsad7m0tmXUG24WSJe1/TV06fHgd8RA8FFoygI8wQujrB26WkrSURAYampIxeAI0fMdekHTPXzsEulyl/eT0FM7TGZYfZpAVg198ecPw0mMf19lBS2X9AJsMk3blMJKXPNVMuLLg2ZKm2G1w8RqLBCwRwt4K6n9RZtYGDsooi4EPJBrQ4OqsW1wLQeaEFIcjwUgGGdGt2oIZxhwbBl+vp4iEdCvFZzvX2s2tBWf6/Ig== 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=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NNtUEY/tJTWyyIiNFdHlYR1HwV76rMguuZ4QmDwMpfA=; b=iLUw2KwYzwetjH9+X9dm0xyaemsBI5sP8y06US1ORbq3b4RdDoHzF2JxLY8Rkp4KGCTytffuWCVZUWh1m5ChTKw/lcwH5VO8DbrWmVsGf5pRQem/RkfvD9Z06jKkhuMGkEHddD+9rLX+/vYAIA+Zd3S7iqZT9YCI4Qjm+13kyf8= Received: from AS4P251CA0009.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d2::20) by GVXPR08MB11211.eurprd08.prod.outlook.com (2603:10a6:150:1fa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Wed, 23 Oct 2024 10:36:53 +0000 Received: from AMS0EPF000001A6.eurprd05.prod.outlook.com (2603:10a6:20b:5d2:cafe::e1) by AS4P251CA0009.outlook.office365.com (2603:10a6:20b:5d2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17 via Frontend Transport; Wed, 23 Oct 2024 10:36:53 +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=arm.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 AMS0EPF000001A6.mail.protection.outlook.com (10.167.16.233) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 10:36:51 +0000 Received: ("Tessian outbound 5e8afd4f8faf:v473"); Wed, 23 Oct 2024 10:36:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b43e9504d6b6d130 X-TessianGatewayMetadata: ZIl91K3oGDu9b2CC9PDYAyLDbM6BiZX7umJhTNECMB4WFa7SC9dwJqoG85vkje5LUdjgaN2bDr5ofLj4/2WsESgm8hDojMxIezN4/C/txfCs2EmMdryWWIBunJAyomI/Op6lTu65zS5BlqTeHBKKRjkOYW3x6nhxOS7eDtlN7L8= X-CR-MTA-TID: 64aa7808 Received: from Lba5b7c2169b2.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EC39A1CF-1710-4726-9F89-94F817117534.1; Wed, 23 Oct 2024 10:36:40 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lba5b7c2169b2.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 23 Oct 2024 10:36:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=niTXupYfKYwhpiwrRCtKElMR/jEBl97mY0/3c5ohlJCpM1ZSTf9PtquHR3mDtRcVjpaWI4uTUwnTPYuaTzHw29aEXk401C1xi8ypZpBsNfb0yl2dO83lPe5aXT7azT2otU0RNwen7bdjKNJtbMlYnWAWqwMscr1QdZngT0VQNQhwTmm5+ri+D9HztxjzSJRrlfpUCGxwWFMqwxqzSVtx6NOxqHflzUAOkg2NXvKmsg5AIXoR6jdcFk/GNyai60+kJs9bIIGprG7mydeH6q3dF6xrDleCQlMb3OPSumqlMrrISLN9WhaE2qpafypSvIzfhwK1TftTTNUS+u2q+bhMbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=NNtUEY/tJTWyyIiNFdHlYR1HwV76rMguuZ4QmDwMpfA=; b=Tk3jIC0A/cbtoVyCSMeWF9hWd24QZB09bhYY4rBOSSA5URxAwxEYGdA5kaDMQQRKjzjTq24SkbP1r2uiPnfJSkSboxA5pTM8VKRecVuhneriwwXjHZSnZsibjOhzMWA7ssaXUpCyDevCYSS5i46BTHUm/BimIB58LCag13QYxgkdVgTrGbbi2+RglXT0SeSlUdJal91TeFE9ij5SttL2tTFOR+Ssrc6wUgsYCs8zZWU1CX0/oMUPqdR0BgJGt8FpPH4ghcCrrgytCkI/HQBQswyvO12Jr2JaigpBXD2f6J2nCRTWxOW6nYXakOfV3M5J19t7vq78jY156fIdMrggdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NNtUEY/tJTWyyIiNFdHlYR1HwV76rMguuZ4QmDwMpfA=; b=iLUw2KwYzwetjH9+X9dm0xyaemsBI5sP8y06US1ORbq3b4RdDoHzF2JxLY8Rkp4KGCTytffuWCVZUWh1m5ChTKw/lcwH5VO8DbrWmVsGf5pRQem/RkfvD9Z06jKkhuMGkEHddD+9rLX+/vYAIA+Zd3S7iqZT9YCI4Qjm+13kyf8= Received: from AS9PR06CA0723.eurprd06.prod.outlook.com (2603:10a6:20b:487::6) by VI1PR08MB10102.eurprd08.prod.outlook.com (2603:10a6:800:1cf::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Wed, 23 Oct 2024 10:36:34 +0000 Received: from AMS1EPF00000047.eurprd04.prod.outlook.com (2603:10a6:20b:487:cafe::be) by AS9PR06CA0723.outlook.office365.com (2603:10a6:20b:487::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18 via Frontend Transport; Wed, 23 Oct 2024 10:36:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AMS1EPF00000047.mail.protection.outlook.com (10.167.16.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 10:36:34 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 23 Oct 2024 10:36:32 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 23 Oct 2024 10:36:32 +0000 Received: from PW070M4K.arm.com (10.57.85.41) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 23 Oct 2024 10:36:31 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Richard Sandiford , Srinath Parvathaneni , Kyrylo Tkachov , "Eric Gallager" , Matthieu Longo Subject: [PATCH v2 3/4] aarch64: improve assembly debug comments for AEABI build attributes Date: Wed, 23 Oct 2024 11:35:59 +0100 Message-ID: <20241023103600.500910-4-matthieu.longo@arm.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241023103600.500910-1-matthieu.longo@arm.com> References: <20241023103600.500910-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS1EPF00000047:EE_|VI1PR08MB10102:EE_|AMS0EPF000001A6:EE_|GVXPR08MB11211:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b238301-c75c-4782-160b-08dcf34e9b6d x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info-Original: nLTrKjgasQf4WLYm1zTMGaSrDq3hc8CD0I6KrnLQVYwFrgA3zkZJE15rco3U4+zQvWwr5GAAjRfQRyMg1Cdc94zzwmZs9WOCl/2Cx9S5QC5fR6yevJtB6PRyR1g3vuuOKIOQYXYoQlWqPXBVh28WARAsa4KyykVUA9+vP38DS9FnVl4DdcmpT9okVd8Uo530GZ9wOrMYasEuUhsj9Zr/JoMlS5nHU0VTZ+ACq2lCkoLg5SZtxPYhwh+TEO9NTiO5VMxF2Rsm1c8NtnroDyeoiG6cb7XCf0g+sZXLbkZtfIeGQi5eFdOzZMLfZPn+20KLFRDns8uvxdHzBW8SaYLzAoy3+KAgqT338qg4s7iD9+Ko0S55dRBU7s4LgclTHFkdP055AEtBNuCNLecwyZTtnFNKbTI3G6LKZ7ePiYmL+BgGlWHiZ0FykXbkP1IcdLfGF1AedJG5QeJUdirk8VPjKdtqxEMYVp3VNkLGKZC1ONRjUGvon1vVqHDpBw3Y7rTOYuCb8f8Q/rlxHQPmuLWi0lIliHbNSQ8BJaqk8Hcc6UV69ZeTHR6oqC54wOOM2CtiEfwiZwIOzqmul3jO97ACq0WzeNA/JyTrYJVeU1Ft3Wremp1mbNK0Alr6uqcCVwN357iytrXjjVHvQNNQ/1AuNNpXWDzeOpbHSzKuuNFJkjvP5NZpj+ZbosRqdlZjCe/KS3jcNe8dJfEUq0PEhi9Bj5Mh3QHgyVCJllkpgfWRFefS+PIwkW8HvbHXlhzYH5A1jZqHELQd2t9iG4TpZzfQDmSWunM+5/vOUmtW7BcZcqQhmUpEZpNHYt83FGTxZExwLBl6Vl+mHZbm1pzc8LA5lfna1ZEzEZEyBLYY533FXfGAaPBGgbo8cHWQq9t+HHWbfvOcRxBh1U/vWA6ezAokift93mA2mFdXcU4RGtrCIQ+fzQDqUOudnUXo8OTLqPu7/0DZYHGhpReW4Lbba6wwp6QjK1iMDeJO9Aue5cKwPhS1f+0DSGyBpjs6xWLXbJJfSOGFONU7pj1gtWo0ETj9yi91wrkvAI567XFuyEfAw6xla0zhCoxol9xM+GtT4Al0DrE0p5XbJAxRW03pnLYd9/kSMMLO00NC3h/p/1QL90xF8BepUMJrF2VrmH+rZlJZkgqWcd8mUIj17NJ1S7FteLW4ZSgG4qUY2QM3mppw8p7cz2ByP47L/VuIRUpHj1d1dAN6yNJTO2EPTTE9/IyogvpOqyZjghoYvfXzUkIp4KkhYpgGIV0oniLLis9rj3Hiu59l0WbLFWEUuQMSQxEnBinWJiLHyZjajPeh72LES/uZRGywNpvO4dpRz/GFMN7soWjUtrRDMKPpCDLb4HtqvZUHZRSmfSXh6uu26c21CEY= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(376014)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10102 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:487::6]; domain=AS9PR06CA0723.eurprd06.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001A6.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 04a3226a-6fda-410e-e791-08dcf34e90bd X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: 8OqYOmUcLn0elgtVYy8diS66WHzFuMKaNU6rGwTCbeuHE2YBwnTjgmzqy0BmMJNd7TNSxI61OkLIiwSo7KiViCdgSS7eQIL/zMjNJToYpkVG8QrAi2FQPyUQ5VE/G0f1RCzpDfm6KMV2B5WT9/BG225lXRvFo+vGZSwiMbGKC7Zw8pq0erVY58jvuuOdYBp6yQwFUpMthEvumtbFLScFFonZkh5Tthf2/BEwQARf2hux57a/YW0K+hiwyj1KdZvdLkJKLZBByhmIdC+SxeU1Xsr1oQBVEtCFMH4hjelQdqZER22qZCya5ZrfBJAQwLJE4cJqsUP533TLhhnUrvPvxhS637znDEkW/4x0Lw7HxK1Yhgh4ezvXPF65NeJfeP4/7CzvwaRR/jjpbtgzihuwPgpu8H8LV5kyRS3G6jiTrK143dWL1U1r7CKhMbrQRI4Cr6J4sx3e9fKkhxB/w+j6Fz7/T+QN27hkGaSsCAwCMV3ThFJ4joy1poyqZHqNBPFxBZgniGBZIRG8PMImzQztifVjTciu9UBG920/XPkzvdbI8IuFPNdObrpEyzYDGPBo2/aIPsZgtIzPY+KqCxMpr4AlylXy3lQk+GcVdInaPPiQ5hJB5DuTbZ6kChnUp8vCnKTFGWlcj0hxcj42iQ32dGr0bF/b9oc0JOw5lT0Hi/c81P0sbiImCHf2ICESTSEXRcPQDOmBpNyR7hymAeQ3CDjc0sZpHLuvemNFb6X8LdhJHgIKD4TAAtYzfmq4VCSDxNwr/CfkT5cUVUxaVeimGrpCyO5mzKNFTbU1at34NAPz2s6hcWV2bTyHXcHQztlBgNi9eSQgfVAChJmaxfneAVpi8dHvHDAF2pkiaq16dIXVOpYApLXXv9pMumdcnAAVO1hUghIj8vdgmR2fTchkvknjr6RuNMQbFR3TBePSlknvZzoL1tqc+ei41Oy6Dcvf/bnzKQnW5u5iJQjhCidl65dnt9IH3KOGKOXHzZA+lCe8WPN2/qHuQ0+sX20NAwm+tRrdhDx7fhoRpS9z6mGBcnC4Xxva+T+ljSuBskV21f7iYF9U6oWjn7CZxHFmnabTA2eUpkx6D8ptyBk9t9kBJvgIH9444SmOgZh/IJ7eTAGMAR8DoeTk2yiMTx06h2dDLDApOK1X2UP3tN29DIQNwCwFOgiTWN6+Yy2cwhrNSrUmfva8epLvMoA8aL+AOTCl5Uxun4981YznBW0Oi9AmMqg6AH2/bX5rmIHSu5O6y7ZiRMHMmWEhk0QGj74tdTTmVBiLmndfUgBqEpVCftfHN3+qxSVS0e6qrCNmALIYKIx5px005gB1wsSDdOmK7MOfZU4fpFyQ9Jg7SrmVPBvk21CbXSpTxfFqIb0zhuJbdls= 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:ErrorRetry; CAT:NONE; SFS:(13230040)(35042699022)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 10:36:51.9759 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b238301-c75c-4782-160b-08dcf34e9b6d 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: AMS0EPF000001A6.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB11211 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org The previous implementation to emit AEABI build attributes did not support string values (asciz) in aeabi_subsection, and was not emitting values associated to tags in the assembly comments. This new approach provides a more user-friendly interface relying on typing, and improves the emitted assembly comments: * aeabi_attribute: ** Adds the interpreted value next to the tag in the assembly comment. ** Supports asciz values. * aeabi_subsection: ** Adds debug information for its parameters. ** Auto-detects the attribute types when declaring the subsection. Additionally, it is also interesting to note that the code was moved to a separate file to improve modularity and "releave" the 1000-lines long aarch64.cc file from a few lines. Finally, it introduces a new namespace "aarch64::" for AArch64 backend which reduce the length of function names by not prepending 'aarch64_' to each of them. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_emit_aeabi_attribute): Delete. (aarch64_emit_aeabi_subsection): Delete. (aarch64_start_file): Use aeabi_subsection. * config/aarch64/aarch64-dwarf-metadata.h: New file. gcc/testsuite/ChangeLog: * gcc.target/aarch64/build-attributes/build-attribute-gcs.c: Improve test to match debugging comments in assembly. * gcc.target/aarch64/build-attributes/build-attribute-standard.c: Likewise. --- gcc/config/aarch64/aarch64-dwarf-metadata.h | 226 ++++++++++++++++++ gcc/config/aarch64/aarch64.cc | 48 +--- .../build-attributes/build-attribute-gcs.c | 4 +- .../build-attribute-standard.c | 4 +- 4 files changed, 243 insertions(+), 39 deletions(-) create mode 100644 gcc/config/aarch64/aarch64-dwarf-metadata.h diff --git a/gcc/config/aarch64/aarch64-dwarf-metadata.h b/gcc/config/aarch64/aarch64-dwarf-metadata.h new file mode 100644 index 00000000000..01f08ad073e --- /dev/null +++ b/gcc/config/aarch64/aarch64-dwarf-metadata.h @@ -0,0 +1,226 @@ +/* DWARF metadata for AArch64 architecture. + Copyright (C) 2024 Free Software Foundation, Inc. + Contributed by ARM Ltd. + + This file is part of GCC. + + GCC 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, or (at your option) + any later version. + + GCC 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. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + . */ + +#ifndef GCC_AARCH64_DWARF_METADATA_H +#define GCC_AARCH64_DWARF_METADATA_H + +#include "system.h" +#include "vec.h" + +namespace aarch64 { + +enum attr_val_type : uint8_t +{ + uleb128 = 0x0, + asciz = 0x1, +}; + +enum BA_TagFeature_t : uint8_t +{ + Tag_Feature_BTI = 1, + Tag_Feature_PAC = 2, + Tag_Feature_GCS = 3, +}; + +template +struct aeabi_attribute +{ + T_tag tag; + T_val value; +}; + +template +aeabi_attribute +make_aeabi_attribute (T_tag tag, T_val val) +{ + return aeabi_attribute{tag, val}; +} + +namespace details { + +constexpr const char * +to_c_str (bool b) +{ + return b ? "true" : "false"; +} + +constexpr const char * +to_c_str (const char *s) +{ + return s; +} + +constexpr const char * +to_c_str (attr_val_type t) +{ + return (t == uleb128 ? "ULEB128" + : t == asciz ? "asciz" + : nullptr); +} + +constexpr const char * +to_c_str (BA_TagFeature_t feature) +{ + return (feature == Tag_Feature_BTI ? "Tag_Feature_BTI" + : feature == Tag_Feature_PAC ? "Tag_Feature_PAC" + : feature == Tag_Feature_GCS ? "Tag_Feature_GCS" + : nullptr); +} + +template < + typename T, + typename = typename std::enable_if::value, T>::type +> +constexpr const char * +aeabi_attr_str_fmt (T phantom __attribute__((unused))) +{ + return "\t.aeabi_attribute %u, %u"; +} + +constexpr const char * +aeabi_attr_str_fmt (const char *phantom __attribute__((unused))) +{ + return "\t.aeabi_attribute %u, \"%s\""; +} + +template < + typename T, + typename = typename std::enable_if::value, T>::type +> +constexpr uint8_t +aeabi_attr_val_for_fmt (T value) +{ + return static_cast(value); +} + +constexpr const char * +aeabi_attr_val_for_fmt (const char *s) +{ + return s; +} + +template +void +write (FILE *out_file, aeabi_attribute const &attr) +{ + asm_fprintf (out_file, aeabi_attr_str_fmt (T_val{}), + attr.tag, aeabi_attr_val_for_fmt (attr.value)); + if (flag_debug_asm) + asm_fprintf (out_file, "\t%s %s: %s", ASM_COMMENT_START, + to_c_str (attr.tag), to_c_str (attr.value)); + asm_fprintf (out_file, "\n"); +} + +template < + typename T, + typename = typename std::enable_if::value, T>::type +> +constexpr attr_val_type +deduce_attr_av_type (T value __attribute__((unused))) +{ + return attr_val_type::uleb128; +} + +constexpr attr_val_type +deduce_attr_av_type (const char *value __attribute__((unused))) +{ + return attr_val_type::asciz; +} + +} // namespace details + +/* AEABI subsections can be public or private. A subsection is public if it is + prefixed with "aeabi", private otherwise. The header of an AEABI subsection + is composed of a name (usually a vendor name), a status whether it is + optional or not, and the expected type of its associated attributes (ULEB128 + or asciz). Note: The attributes in the same subsection have all the same + type. An attribute is composed of a tag identifier (ULEB128), and its value + (ULEB128 or asciz). + + Syntax: + .aeabi_subsection NameOfTheSubsection: string (=asciz), + Optional: boolean (=ULEB128), + AttributeValueType: enum{ULEB128, asciz} (=ULEB128) + [ + .aeabi_attribute TagIdentifier: ULEB128, + TagValue: Variant[ULEB128|asciz] + ]* + + Example: + .aeabi_subsection .aeabi-feature-and-bits, 1, 0 + // Optional: true, AttrValType: ULEB128 + .aeabi_attribute 3, 1 // Tag_Feature_GCS: true + + Note: The textual representations of the tag and its value are emitted as a + comment along their numerical representations to annotate the assembler + output when the developer flag '-dA' is provided. */ +template < + typename T_tag, /* The type of a tag. */ + typename T_val, /* The type of a value. */ + size_t N = 0 /* The number of expected attributes if we know it. */ +> +class aeabi_subsection +{ + public: + aeabi_subsection (const char *name, bool optional) + : m_name (name), + m_optional (optional), + m_avtype (details::deduce_attr_av_type (T_val{})) + {} + + /* Append an attribute to the subsection. */ + void append (aeabi_attribute &&attr) + { + m_attributes.quick_push (std::move (attr)); + } + + /* Write the data to the assembly file. */ + void write (FILE *out_file) const + { + asm_fprintf (out_file, "\t.aeabi_subsection %s, %u, %u", + m_name, static_cast (m_optional), + static_cast (m_avtype)); + if (flag_debug_asm) + asm_fprintf (out_file, "\t%s Optional: %s, AttrValType: %s", + ASM_COMMENT_START, + details::to_c_str (m_optional), + details::to_c_str (m_avtype)); + asm_fprintf (out_file, "\n"); + + for (auto const &attr : m_attributes) + details::write (out_file, attr); + } + + /* Indicate if the subsection is empty. */ + bool empty () const + { + return m_attributes.is_empty (); + } + + private: + const char *m_name; + bool m_optional; + attr_val_type m_avtype; + auto_vec, N> m_attributes; +}; + +} // namespace aarch64 + +#endif /* GCC_AARCH64_DWARF_METADATA_H */ \ No newline at end of file diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 90aba0fff88..e5a94738f70 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -84,6 +84,7 @@ #include "rtlanal.h" #include "tree-dfa.h" #include "asan.h" +#include "aarch64-dwarf-metadata.h" #include "aarch64-feature-deps.h" #include "config/arm/aarch-common.h" #include "config/arm/aarch-common-protos.h" @@ -24787,33 +24788,6 @@ aarch64_post_cfi_startproc (FILE *f, tree ignored ATTRIBUTE_UNUSED) asm_fprintf (f, "\t.cfi_b_key_frame\n"); } -/* This function is used to emit an AEABI attribute with tag and its associated - value. We emit the numerical value of the tag and the textual tags as - comment so that anyone reading the assembler output will know which tag is - being set. - example: .aeabi_attribute 3, 1 // Tag_Feature_GCS */ - -void -aarch64_emit_aeabi_attribute (const char *name, uint8_t num, uint8_t val) -{ - asm_fprintf (asm_out_file, "\t.aeabi_attribute %u, %u", num, val); - if (flag_debug_asm) - asm_fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, name); - asm_fprintf (asm_out_file, "\n"); -} - -/* This function is used to emit an AEABI subsection with vendor name, - optional status and value type. - example: .aeabi_subsection .aeabi-feature-and-bits, 1, 0 */ - -void -aarch64_emit_aeabi_subsection (const char *name, uint8_t num, uint8_t val) -{ - asm_fprintf (asm_out_file, "\t.aeabi_subsection %s, %u, %u\n", - name, num, val); -} - - /* Implements TARGET_ASM_FILE_START. Output the assembly header. */ static void @@ -24834,17 +24808,21 @@ aarch64_start_file (void) asm_fprintf (asm_out_file, "\t.arch %s\n", aarch64_last_printed_arch_string.c_str ()); - /* Check whether the current assembly supports gcs build attributes, if not - fallback to .note.gnu.property section. */ + /* Check whether the current assembler supports AEABI build attributes, if + not fallback to .note.gnu.property section. */ #if (HAVE_AS_AEABI_BUILD_ATTRIBUTES) - if (aarch64_gcs_enabled ()) - { - aarch64_emit_aeabi_subsection (".aeabi-feature-and-bits", 1, 0); - aarch64_emit_aeabi_attribute ("Tag_Feature_GCS", 3, 1); - } + using namespace aarch64; + aeabi_subsection + aeabi_subsec (".aeabi-feature-and-bits", true); + + aeabi_subsec.append ( + make_aeabi_attribute (Tag_Feature_GCS, aarch64_gcs_enabled ())); + + if (!aeabi_subsec.empty ()) + aeabi_subsec.write (asm_out_file); #endif - default_file_start (); + default_file_start (); } /* Emit load exclusive. */ diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c index 26938d84dab..bafd3261b22 100644 --- a/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c @@ -6,7 +6,7 @@ int main() return 0; } -/* { dg-final { scan-assembler "\.aeabi_subsection \.aeabi-feature-and-bits, 1, 0" } } */ -/* { dg-final { scan-assembler "\.aeabi_attribute 3, 1\t\/\/ Tag_Feature_GCS" } } */ +/* { dg-final { scan-assembler "\.aeabi_subsection \.aeabi-feature-and-bits, 1, 0\t\/\/ Optional: true, AttrValType: ULEB128" } } */ +/* { dg-final { scan-assembler "\.aeabi_attribute 3, 1\t\/\/ Tag_Feature_GCS: true" } } */ /* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ /* { dg-final { scan-assembler "\.word\t0x4\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(GCS\\)" } } */ \ No newline at end of file diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c index 6a41b52d298..1ca7166ad29 100644 --- a/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c @@ -6,7 +6,7 @@ int main() return 0; } -/* { dg-final { scan-assembler "\.aeabi_subsection \.aeabi-feature-and-bits, 1, 0" } } */ -/* { dg-final { scan-assembler "\.aeabi_attribute 3, 1\t\/\/ Tag_Feature_GCS" } } */ +/* { dg-final { scan-assembler "\.aeabi_subsection \.aeabi-feature-and-bits, 1, 0\t\/\/ Optional: true, AttrValType: ULEB128" } } */ +/* { dg-final { scan-assembler "\.aeabi_attribute 3, 1\t\/\/ Tag_Feature_GCS: true" } } */ /* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ /* { dg-final { scan-assembler "\.word\t0x7\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(BTI, PAC, GCS\\)" } } */ \ No newline at end of file