From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60084.outbound.protection.outlook.com [40.107.6.84]) by sourceware.org (Postfix) with ESMTPS id 165293858439 for ; Tue, 19 Jul 2022 11:28:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 165293858439 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LiVFVMiKGTWZkmIlUBnPATjbZHdeaMRtbsiPRRQdSF04ijkOrpfWgpKRpDx2D/M6vJcbWAKFII0mDWfKkl829L1NGIeYUc15VlEVXXxVgDrBxmFTGZmxo9gQgltaHUqOy4OM2U/IEW0NHuvF3aqYN32gXzD2VnyaCqbIX4eqVjkTkytNbEizO1wc49VrZq69TvpsepAm/ZwxcuL9YdHJBxz1CBcsmfmRrP1m8F7Y+VPGQHZEh1WnmqlE10HmNwFYPIkjvQwEFHv14b5g+DPipLJrB6o8r1FAKB54kBRFRUpqmQjtyrDWES7Ic8vL7WkIvrkqSh4/x37n26b5MQPSFQ== 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=m+BUnqQIc5KcZ4Mq2rEpJuzQgCJhW3d8+/EGcCoySsY=; b=nG6Ibj7hLaoY6q2DqaSuTwaLsr/KGFnR1gRc4ORLzJRTrWHd+Lt0xMrLG0ehMuYQ2HpbEFtGZ6IedqzDdThvCkpZz7T3kbYw368axK0pcfE0UxPUSTcuOPJDTy4Kpmrq0vDTFrqUZ55YAjX1CvZWl58S4XYWu9j/Hyfu1bu3f92sydiLng8nxYAs0O6EJj0bjgOT1HH90ckDxCDmQsTkPsl39RipPI0PjrjchzfPjpfDfs2824xPNVRrfpHJ+NTkthcA0Mw6Ewv8JzZxlhaeGUzVVH5AJCab47RvXQE1cZgCWNtvCVDV0Pb6b4KHSBq9GZYkl0+nTqsQ0Y7pRonaHQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from DB7PR03CA0100.eurprd03.prod.outlook.com (2603:10a6:10:72::41) by AS8PR08MB6038.eurprd08.prod.outlook.com (2603:10a6:20b:23f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.15; Tue, 19 Jul 2022 11:28:33 +0000 Received: from DBAEUR03FT061.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:72:cafe::79) by DB7PR03CA0100.outlook.office365.com (2603:10a6:10:72::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23 via Frontend Transport; Tue, 19 Jul 2022 11:28:33 +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 DBAEUR03FT061.mail.protection.outlook.com (100.127.143.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Tue, 19 Jul 2022 11:28:33 +0000 Received: ("Tessian outbound cc6a8ab50b6b:v123"); Tue, 19 Jul 2022 11:28:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 290a708656cdfbd5 X-CR-MTA-TID: 64aa7808 Received: from a61e5e76543a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DDABF077-4AC6-446E-AA73-EF10C708F04C.1; Tue, 19 Jul 2022 11:28:26 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a61e5e76543a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 19 Jul 2022 11:28:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CodwV30TFvFP6v272AHIcRax3+Y2tzkUxRvCUr9p4rIF1KjorwtT2R6MIlSikOOGWtFKO+YgxEMxFImA5I7VuqALQsSiQRsOq5Ef33PB/pUt/I4W+QcXvMho56KbJwtCi/CfIGOtgXXOphqan9FHgy7LUVbYVtNTp6XNedrBKoNuJmpugmMj9EmdTrrnqZKlPDYn6ZRU2YWq8mSpVDSRMV1575U4sKRJK+Mi2fC/khvJZW87MAFYsXm3PWSJs7GV5MKtdRgsph2zNi0XEnupoe/yjwdhgf/UdM7XW1LgD4/2cq4ueM7QVF8qoUQO2eLsMXoRAgdUWtIoxg/a4uN+5Q== 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=m+BUnqQIc5KcZ4Mq2rEpJuzQgCJhW3d8+/EGcCoySsY=; b=haghzqvERn+gpBZysNGyYkWX58Hg0DkErrg+moQKfp+9PkxnxjpltXl9JdFtZE6nhSHzPgWgs6vEzfzjK1IQxvOa0s8i9a64XNJHzG/UHFHfRAT57tYw7hwtsqf4/51kmIDOSShlUi+JfqpZkgATPqE2iwmjIguq2+pMaktdLkAuTdv4F29j3XcJfoHP+6ZDzW/B4oeIyCsSirCka9/TsFRA7KTypWE2o/2sARPTVBUmXwDFu312yP83XGqjYd79PztAGYHm9alh4i3GdRmXvVId6CwFwLLNLCCStDjFIAuyS3zJSUgBVjwfisOxvjqaZUsFk2l/Dr7hUiFUHM4AHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.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 Received: from AS9PR06CA0416.eurprd06.prod.outlook.com (2603:10a6:20b:461::10) by PR2PR08MB4714.eurprd08.prod.outlook.com (2603:10a6:101:1c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14; Tue, 19 Jul 2022 11:28:21 +0000 Received: from VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:461:cafe::19) by AS9PR06CA0416.outlook.office365.com (2603:10a6:20b:461::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.19 via Frontend Transport; Tue, 19 Jul 2022 11:28:21 +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 VE1EUR03FT049.mail.protection.outlook.com (10.152.19.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5438.12 via Frontend Transport; Tue, 19 Jul 2022 11:28:20 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.9; Tue, 19 Jul 2022 11:28:18 +0000 Received: from e125768 (10.2.78.50) by mail.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.9 via Frontend Transport; Tue, 19 Jul 2022 11:28:18 +0000 From: "Victor L. Do Nascimento" To: Richard Earnshaw CC: , Subject: Re: [PATCH][Binutils][GAS] arm: Add cfi expression support for ra_auth_code In-Reply-To: <137e4b3a-0d13-1fbe-8e44-56cf5a3447d2@foss.arm.com> (Richard Earnshaw's message of "Tue, 19 Jul 2022 10:44:50 +0100") References: <20220718160129.15652-1-victor.donascimento@arm.com> <137e4b3a-0d13-1fbe-8e44-56cf5a3447d2@foss.arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) Date: Tue, 19 Jul 2022 12:28:18 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 5f8d4246-0aec-4db3-8b88-08da6979d04f X-MS-TrafficTypeDiagnostic: PR2PR08MB4714:EE_|DBAEUR03FT061:EE_|AS8PR08MB6038:EE_ 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: JLXEiP21mF08XvToZi3D0Yri9dW+A0u1W/utPM7Kwbh4Uk6pCbMWC/2oQXLy4SpBYNcMKpZ2hcElFr7uuEnBQYR53U2AfSlo9SLnJf6SkwdY3kHKnOilpGhMkfeeDwPNv4GaQuWWR0M/5x+9CVHa4/m4+Dk2HEoc6z/dUUc5V9lAF+V9yWtFVEspOKdpiCVrRn6xCyc78jOi2DlmcoJWwRyqPhFqxjCgGuUR+DyW3QaKissZdQixa1SJRpLmiUfrPJYj79jQufZo2kD+KZo7C2kxsX/fo2i7YEqQUtJdWErpuJkDUAiqgESKlSjg+D6Ehq48KB10iMg2YQAw+pP0Esbo7vYIxP0X+ZnkyH/fNHXJFImbClLvGLPgurTqGujoIAq1F8YMb2+hM2TWnxIZ3dDsKPY3A5I4Ai26CJhgVSDjk5QUpy1YpMvgZTCw1V64GepqXNWMV50qz7vJZJr/DCkmdW6qN+LXcTQluM8vHFSypYGtJiMN42Xp2evqyN2vKSONESIU/JgNjLuCoZQgjUA6qyrQCcjoO1kw/pfN8tqjqScDZGwHMsgwFIRz9NqqLsjQCWVe/zsjXfQk2a8wBWz9yyM7uJE2C/SyO6fcZOYw/pH7dLq5B6rgWSMAXphxA8w0DcTqZbitJx63+0J+Irkd0UtYOt/ZBUy4ImUyobMwmvYBQuRbFvKY+d0EMuEzN2AJH1mq9Yt+A2PRjxe50tk/ILHuoFRjWeFdtHi0Pc9+u1/zcAcVc8Ww4cOSPsLg6jQrtNmaiaZdWsvcKxIXs65o7FxdP8LzhLd2YWtJjX1EfNiFm1GnsynI1hxriBm9ZShI+3nQYsbXl6cJ+n9Qsg== 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:(13230016)(4636009)(396003)(346002)(376002)(39860400002)(136003)(36840700001)(46966006)(40470700004)(8936002)(86362001)(6862004)(8676002)(4326008)(70206006)(70586007)(356005)(36756003)(40460700003)(82740400003)(54906003)(53546011)(316002)(26005)(41300700001)(426003)(2616005)(186003)(83380400001)(36860700001)(82310400005)(478600001)(81166007)(2906002)(47076005)(40480700001)(5660300002)(336012)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4714 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT061.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 60fde0e8-8f59-4dc8-f724-08da6979c875 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nTMAU6h4AdQoGMara2UgnfMiwAkWXiAxMhEG3IoMaVR6D3uFP7+cuG1ioqZR8OQ9VgnVNSJbmBD24B88+8D+qcy2+wbNe/5h+M6ZwLcgkwCrrJtpnFlyKlWYam8wgSIznw8u/+s6ijVLUerI66W5aplVcZdgseIyMMinEIPY6S4OWaMIxs8oh7TohirGgpsUd8SPIVT3RD2U5v3njKRCCwKvvbv6wx3amiexD584FQOiesLJEkVsbhHywtrMwoC5gLOZpVGOMGsBEDWRD/bveEnK52KnKGzjyQuso/PDQwd2KVGXzz7x7UvC35Zro89oVvn3jhp007vHsWvzYEEC1RS7GRSNXluDrnI1U2hUHcTqgOyyUeuPAaHHWvaa1r9GRgSyElsJVhz4Jt52ZFPgi+MPXNyCkFSk5/wH41NHnjah9Cm3N36E4LV6mrHnxsIqkXtbVBMDD4k/pa2rRZxVNVBIwB/n0Qh5dnBfRVFXBe4f0BH/k28ZaCYouj/xzlzs1+ntr4O3ZCexVSlcaQOkEyOR61MYsvYMNj8dMJUK6s/7Q2PwbJBID3elphVTZwGEJjoM3Ed3LYOjksIUrLCXo+1eoVKUwEJrJm2XBPUK/GffDZc1z3luSJrjZQQsGgJ/+SWJ/NdWT1V48NgqXfXWx53+p5wHNsYwontEeS+MC16MmBMPqlJ1fSDH47Gp7fpXu3RGBiOU82Xolj/HnuUX/GSXo1yLfc0v/bJlmALd4D9UJM9mqPQiI+ncfP724PSeXMmMDftRGfbpNBEiQ2fcvvG0m8xdQG/KESvBHYUxQpJrkQvwQraANt5Yl5dd7tLO 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:(13230016)(4636009)(346002)(396003)(39860400002)(376002)(136003)(36840700001)(46966006)(40470700004)(4326008)(36756003)(5660300002)(8936002)(6862004)(82310400005)(70206006)(8676002)(40460700003)(70586007)(36860700001)(2616005)(40480700001)(2906002)(86362001)(82740400003)(41300700001)(478600001)(26005)(83380400001)(81166007)(47076005)(316002)(336012)(426003)(53546011)(186003)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2022 11:28:33.3179 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f8d4246-0aec-4db3-8b88-08da6979d04f 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: DBAEUR03FT061.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6038 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2022 11:28:46 -0000 Richard Earnshaw writes: > On 18/07/2022 17:01, Victor Do Nascimento via Binutils wrote: >> Hi all, >> This patch extends assembler support for the use of ra_auth_code register, >> particularly in the context of CFI directives, mapping the register to >> the correct DWARF-2 register number. >> Tested for arm-none-eabi. >> Thanks, >> Victor. >> gas/Changelog: >> * gas/config/tc-arm.c (tc_arm_regname_to_dw2regnum): Add >> REG_TYPE_PSEUDO handling. >> * gas/testsuite/gas/arm/cfi-pacbti-m-readelf.d: New. >> * gas/testsuite/gas/arm/cfi-pacbti-m.s: New. >> --- >> gas/config/tc-arm.c | 9 ++++++ >> gas/testsuite/gas/arm/cfi-pacbti-m-readelf.d | 31 ++++++++++++++++++++ >> gas/testsuite/gas/arm/cfi-pacbti-m.s | 22 ++++++++++++++ >> 3 files changed, 62 insertions(+) >> create mode 100644 gas/testsuite/gas/arm/cfi-pacbti-m-readelf.d >> create mode 100644 gas/testsuite/gas/arm/cfi-pacbti-m.s >> diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c >> index 2e6d175482e..bf912ccf2d5 100644 >> --- a/gas/config/tc-arm.c >> +++ b/gas/config/tc-arm.c >> @@ -27933,6 +27933,15 @@ tc_arm_regname_to_dw2regnum (char *regname) >> if (reg != FAIL) >> return reg + 256; >> + reg = arm_reg_parse (®name, REG_TYPE_PSEUDO); >> + switch (reg) >> + { >> + case 12: >> + return 143; > > Sorry, this doesn't look right. The comment where the pseudos are defined says: > > /* DWARF ABI defines RA_AUTH_CODE to 143. It also reserves 134-142 for future > expansion. RA_AUTH_CODE here is given the value 143 % 134 to make it easy > for tc_arm_regname_to_dw2regnum to translate to DWARF reg number using > 134 + reg_number should the range 134 to 142 be used for more pseudo regs > in the future. This also helps fit RA_AUTH_CODE into a bitmask. */ > > though I'll note that 143 % 134 is 9, not 12. > > So really, the code here should be adding back the base for the range that it > covers rather than just handling a special case. > > And, of course, either the comment needs fixing, or the assigned internal number > needs fixing. > > R. Thanks for catchig this stale comment. I should have updated this when I re-numbered RA_AUT_CODE. The numerical mismatch between internal numbering of the pseudo-register arising from the modulo operation described above and the physical reg it mapped onto made the handling of mixed register lists (e.g. via s_arm_unwind_save_mixed) seem unnecessarily complex at the time of implementation. A pragmatic, albeit less elegant, solution was to have RA_AUTH_CODE pseudo be numbered according to the restrictions imposed by the PAC/PACBTI assembly instructions, which save the generated PAC code in R12. If you've no objections, will update the comment and resubmit. V. >> + default: >> + break; >> + } >> + >> return FAIL; >> } >> diff --git a/gas/testsuite/gas/arm/cfi-pacbti-m-readelf.d >> b/gas/testsuite/gas/arm/cfi-pacbti-m-readelf.d >> new file mode 100644 >> index 00000000000..997ea75f179 >> --- /dev/null >> +++ b/gas/testsuite/gas/arm/cfi-pacbti-m-readelf.d >> @@ -0,0 +1,31 @@ >> +#readelf: -wf >> +#source: cfi-pacbti-m.s >> +#name: Call Frame information for Armv8.1-M.Mainline PACBTI extension >> +# This test is only valid on ELF based ports. >> +#notarget: *-*-pe *-*-wince >> +# VxWorks needs a special variant of this file. >> +#skip: *-*-vxworks* >> + >> +Contents of the .eh_frame section: >> + >> + >> +00000000 00000010 00000000 CIE >> + Version: 1 >> + Augmentation: "zR" >> + Code alignment factor: 2 >> + Data alignment factor: -4 >> + Return address column: 14 >> + Augmentation data: 1b >> + DW_CFA_def_cfa: r13 ofs 0 >> + >> +00000014 00000020 00000018 FDE cie=00000000 pc=00000000..0000000c >> + DW_CFA_advance_loc: 4 to 00000004 >> + DW_CFA_register: r143 in r12 >> + DW_CFA_advance_loc: 4 to 00000008 >> + DW_CFA_def_cfa_offset: 8 >> + DW_CFA_offset: r14 at cfa-8 >> + DW_CFA_offset: r12 at cfa-4 >> + DW_CFA_advance_loc: 4 to 0000000c >> + DW_CFA_restore_extended: r143 >> + DW_CFA_restore: r14 >> + DW_CFA_def_cfa_offset: 0 >> diff --git a/gas/testsuite/gas/arm/cfi-pacbti-m.s b/gas/testsuite/gas/arm/cfi-pacbti-m.s >> new file mode 100644 >> index 00000000000..515400d86f5 >> --- /dev/null >> +++ b/gas/testsuite/gas/arm/cfi-pacbti-m.s >> @@ -0,0 +1,22 @@ >> + .arch armv8.1-m.main >> + .arch_extension pacbti >> + .eabi_attribute Tag_PAC_extension, 2 >> + .eabi_attribute Tag_BTI_extension, 2 >> + .eabi_attribute Tag_BTI_use, 1 >> + .eabi_attribute Tag_PACRET_use, 1 >> + .syntax unified >> + .text >> + .thumb >> +.Lstart: >> + .cfi_startproc >> + pacbti ip, lr, sp >> + .cfi_register ra_auth_code, ip >> + push {ip, lr} >> + .cfi_def_cfa_offset 8 >> + .cfi_offset lr, -8 >> + .cfi_offset ip, -4 >> + pop {ip, lr} >> + .cfi_restore 143 >> + .cfi_restore 14 >> + .cfi_def_cfa_offset 0 >> + .cfi_endproc