From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80047.outbound.protection.outlook.com [40.107.8.47]) by sourceware.org (Postfix) with ESMTPS id 2E2523858427 for ; Fri, 12 Aug 2022 15:15:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E2523858427 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=GgVSokFktk/gW6yMqPUN7NmrUos7zRjhYClq7bDkiFS/szkAq6MUZmFubW03R9XMpWaYwZVL33uSlBYJdQHwozuoWeboB52XKT9owwwUp4+FTaMglenNrn//AhLb/bPc6wffDc9uOcyaHxTUqaK6IQqZY2CaQ1IUhb5eVzpYtIfg9VjT80GnYXzgXgrP4VNW/V9s/ras9P8HrACvw/HZAJpeytfdwXPW2/qfO0s13xFXUQEDHBjgQGs23DQoKzAlyO71SO2ISsYtINSswWx/Rt0JYTQ1F28SVFESsinMDbZlT2GosDPf3OA6pm+BpEcUlmCbhEDaMGolZUxvzDnZ8A== 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=oern6JZzTuBJuFHRNmvWuttHDLJYPWNXpefGUtMugIo=; b=iBl3I7p3fSiJdq8hRhNsHUwZTnyh5sh+ceo0rKzt8MQpt+/l6Tor+CrF6t788kc1VIQ9ZhF6ljaLxQq/Fl4TT1PdDZgBZ1mR4jTGm1ZUf/KNNAL0kJAzB1INTGJmU1ryfc8ahyBDydwXCJpDn50ozBffD5ksF1082ZukfG36ZWVek65oHf/sUs/GWqq/Z3HxSqUEdV8hiFMFpekvmgXwNZK2jmUNSliGrBVram8I+Qr4YJKECuqccA9qnXsoaZNHNsd2/nt08j/p5CRIvjL65k7EJ4bgmzrTfE3Er/V9MNwMSb6iYEzKKpi4VKJvpY7F4jbKm6bwOZjZxsTIIZ2rgw== 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] dmarc=[1,1,header.from=arm.com]) Received: from FR3P281CA0162.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a2::14) by VE1PR08MB5262.eurprd08.prod.outlook.com (2603:10a6:803:106::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Fri, 12 Aug 2022 15:15:35 +0000 Received: from VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:d10:a2:cafe::21) by FR3P281CA0162.outlook.office365.com (2603:10a6:d10:a2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.8 via Frontend Transport; Fri, 12 Aug 2022 15:15:35 +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 VE1EUR03FT051.mail.protection.outlook.com (10.152.19.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11 via Frontend Transport; Fri, 12 Aug 2022 15:15:34 +0000 Received: ("Tessian outbound fa99bf31ee7d:v123"); Fri, 12 Aug 2022 15:15:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 250e29847aef1dee X-CR-MTA-TID: 64aa7808 Received: from 458d1337e22a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D4FD5D14-94C1-4796-A0A9-8FFE2EF205E6.1; Fri, 12 Aug 2022 15:15:27 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 458d1337e22a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 Aug 2022 15:15:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mvVw8h5jOS4g2TDwJkGa+Y9MIZi1abz3TEjfs3//Ucme7Jc8zLoi0KrGLAhp0mtXuCM5RETe8fSZINjVHWs5E/J9KL7cDxPmVtfg6J92HINerf4Rj4yjTlV0c65hyoiwnRtQhehdh+LZ1iDJcQA1PkOYMX1Vwm9sjXx2y8x81Xm7JEA+JUajVMMiDKuRDr0ckj9ivP5E/oDEevaoGLZcn3Zesj3IhUG7f4sHwi7aiIk7UjnKoD41pvCcTbTHQ3+Xk9lEGn/RZPUvPZNBv8PZ5ytU0Nv4K2pMTpkLknrFrB9TuaidnmEiIZt2yseYWvqN6paSeuRGhY2Cr7kmUVbbPA== 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=oern6JZzTuBJuFHRNmvWuttHDLJYPWNXpefGUtMugIo=; b=YTmulri4QUAQ0KmhGHO/NYhe0v7Pk0y6dZhkif8o9yjYZRTSZW1DgB7Qgn9+HXIGZe+Sp5eOXpFx/U+2vwVMwlz+Lz8wU43pezYGfS41fYPtFp4/dLWxJ1k/WNd78oSkWCLy1FzCrC6OoRZQ+q4X+SF1gQNOQHAEQ0u0n10ZG3kEztBzzeYwUtzHt/hvF1IYwWAPMF8b1oaGXfNVu6fws/rqpKt0XlnHj6XVOjDr4ZU0gDIttbR1h6gs3/MAtYx8EYMX45vzJlSP9qM4MXHVWPOZB97GTadyac8/SBFq2S7oQ5saNlpy7iU+AmN//n0w/7VDTBLvXVLHXSfXOzi9PA== 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 Received: from FR3P281CA0016.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1d::21) by AM0PR08MB4049.eurprd08.prod.outlook.com (2603:10a6:208:12c::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.17; Fri, 12 Aug 2022 15:15:25 +0000 Received: from VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:d10:1d:cafe::1) by FR3P281CA0016.outlook.office365.com (2603:10a6:d10:1d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.10 via Frontend Transport; Fri, 12 Aug 2022 15:15:25 +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 VE1EUR03FT050.mail.protection.outlook.com (10.152.19.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5525.11 via Frontend Transport; Fri, 12 Aug 2022 15:15:25 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2507.9; Fri, 12 Aug 2022 15:15:19 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.9; Fri, 12 Aug 2022 15:15:19 +0000 Received: from e124257 (10.34.105.24) 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; Fri, 12 Aug 2022 15:15:18 +0000 From: Andrea Corallo To: Andrea Corallo via Gcc-patches CC: Richard Earnshaw , nd Subject: [PATCH 2/15] arm: Add Armv8.1-M Mainline target feature +pacbti References: Date: Fri, 12 Aug 2022 17:15:18 +0200 In-Reply-To: (Andrea Corallo via Gcc-patches's message of "Fri, 12 Aug 2022 16:26:49 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 242d5d4d-f11d-419e-86f4-08da7c758149 X-MS-TrafficTypeDiagnostic: AM0PR08MB4049:EE_|VE1EUR03FT051:EE_|VE1PR08MB5262: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: wIyUgjJchbStH6dCqZ86uUTSeg6+3Vp1Z5M/6hQuimfmwI7LJZz09WBPcsovw0IRNoGj3WW458XDbNV/l4fTRg/cev+U6AA/xGMsZ4X6hbU2Vc2bRT72iHCk5Uv9pq2SM6UtmuoislT3iyhSRprpl1MZJ5Xu8w9g1jjils9HXa3/q3Q8bjghMr5i/kkD/PJl8dYXjFit7MLTWz0tvxL0vMBduMw62AQQlIAGTSt0v6jVocg4Wlrc6eGwBgvHXY+ZnfZQqe/StLdPSpPN19RJv8ZsV779R8MMvBVYCdXJaXjlPCLATkdIJhjXdYL3Z1johZkpsZ+HE05zQm53dZYKxG5P4eVXPkX6ITv8qQD2blPJKapkjWiarTJZspmKySE4I9Qjg1XrnB4UZDTitb3HJE96OwqDOWZ3XN2N7x1V288gvyF1MCMbn+/7AF3QQY/HBZPq503HZMfrzPFxeApHENZ5To364p31FnIga/TW2xneT9jiKZu3VYfGHA54z6tt2sHs0VO3MAKQWHvDrlBRAcmrrWc/+zST1EznxJ5gSHpdchKZZWRY6FtpqeVncA7Rq6KojL82qANtwykyP06y/97tvl3CK9yINtZJBSE6GO9j/GiXXQ+Eu/qMIVDzIT8KaQLdtE7YakEwFJl+zNx0yPIWpL134BeEjJbeWBgmgzjX6jfh3iSjgEdxxTylMYS3YzZ7Ao4jiyETgbdksYfC97c8kIQNUwZpoby78MbbLLaADHqo3RzN3rOnDGAJl7/DtcEtvO/K3tHhgbcR+nwUyAbpUBu8G5xPtTYyhj6tLKxUgyBzrAQv0zDGEyy2b7+2OT4UDr+QLYfrziFPtXt091LyFbr2N2qEdcml43HVhI+GmrNeXoTc54ci2I4ryltT 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)(136003)(39860400002)(346002)(376002)(396003)(40470700004)(46966006)(36840700001)(82740400003)(478600001)(6916009)(186003)(86362001)(33964004)(47076005)(26005)(36860700001)(54906003)(41300700001)(81166007)(83380400001)(336012)(426003)(40460700003)(8936002)(44832011)(2616005)(8676002)(4326008)(5660300002)(235185007)(2906002)(82310400005)(316002)(40480700001)(70206006)(70586007)(36756003)(356005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4049 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9c6e0b57-5c3b-4295-83db-08da7c757bc6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u90ff1fkIFgRmd0/37+/oHFKQrbh5yI0vdNgs5U0SdWO+4HEonWDllsf7s1GvdJGxkyE+eHOQr2AV5BTlNz+SchUXfVObIBbCSbsZM0poicz00ydUyUMpCBNUFUhaeQ7nHNfYhclDI97PX7S1YLMcijuKED+qQ8Iv6ftHLiql2G3p0t2HYs6DP5DbKS3MVSKOClRaMjIl+ezraFf4Qepy594u2LihLIHhpk9jr7yyKMeJiHfXfoB/miBgTz8q5KympSFRsUkSyR8e66qna3DjmU5cl/3hOAc+mFlM/53TnxWBFdjAnigiH+Sfbfy9M06wI4dunESkdhq/4S1WGfwXzjQI9YdyW8mFvgDNO6vkIPJDqvyvT5Uswgl7tGYffUr5CqLQsJvBg7eJ3xudUg4xVQs2SOTu6EeL0tYpdzBtAnc4RKy6teM5QK4R8dJ5G9N5msRuSU0zvL6JPSGruONYLm6MKFA3MaFQSQGEJzW5Vq7Ii5KpTuxnv3dkgSL3Yz7jzwO97F0DcRg5F5e0q7fJDUmEGLstHfDx2Q1W9N+N7+UquPAWzuJf4TcDEjrvZkqKyuNIrOTJHPhIyMofiaiVrxS5Rt/y0WxNt7Ewjlf7SWiZfeGB24rXQ3Txrgqsa9AIWMtdoLTYlXAAWy6Pe8P/icEjzl/hDSfrv3Fz6Y4b9yTeKa9xeZAFA7d9W7DuUXeFvU+HQmBkDI8205VIb4/CjyXDm3d0MvfSLgo3qlBrjPk/n3ApZCasBSx7Q/gm3uWezT+xqhW6VACxyjY6K4WwHWfpqbmHGLRWz/nCzLyZr/HzaD4LV72fqzIZpP8+0CtYGNrutx7gHfUhBKLs7HDfA== 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)(396003)(39860400002)(136003)(376002)(346002)(46966006)(40470700004)(36840700001)(70206006)(70586007)(5660300002)(235185007)(44832011)(8936002)(8676002)(4326008)(2906002)(316002)(6916009)(86362001)(54906003)(82310400005)(40480700001)(36756003)(82740400003)(41300700001)(36860700001)(33964004)(26005)(478600001)(40460700003)(47076005)(186003)(336012)(426003)(2616005)(83380400001)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2022 15:15:34.7193 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 242d5d4d-f11d-419e-86f4-08da7c758149 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: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5262 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, 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-List-Received-Date: Fri, 12 Aug 2022 15:15:40 -0000 --=-=-= Content-Type: text/plain This patch adds the -march feature +pacbti to Armv8.1-M Mainline. This feature enables pointer signing and authentication instructions on M-class architectures. Pre-approved here . gcc/Changelog: * config/arm/arm.h (TARGET_HAVE_PACBTI): New macro. * config/arm/arm-cpus.in (pacbti): New feature. * doc/invoke.texi (Arm Options): Document it. Co-Authored-By: Tejas Belagod --=-=-= Content-Type: text/plain; charset="utf-8" Content-Disposition: attachment; filename="2-15.patch" diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in index 0d3082b569f..9502a34fa97 100644 --- a/gcc/config/arm/arm-cpus.in +++ b/gcc/config/arm/arm-cpus.in @@ -229,6 +229,10 @@ define feature cdecp5 define feature cdecp6 define feature cdecp7 +# M-profile control flow integrity extensions (PAC/AUT/BTI). +# Optional from Armv8.1-M Mainline. +define feature pacbti + # Feature groups. Conventionally all (or mostly) upper case. # ALL_FPU lists all the feature bits associated with the floating-point # unit; these will all be removed if the floating-point unit is disabled @@ -743,6 +747,7 @@ begin arch armv8.1-m.main isa ARMv8_1m_main # fp => FPv5-sp-d16; fp.dp => FPv5-d16 option dsp add armv7em + option pacbti add pacbti option fp add FPv5 fp16 option fp.dp add FPv5 FP_DBL fp16 option nofp remove ALL_FP diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index f479540812a..3495ab857ea 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -335,6 +335,12 @@ emission of floating point pcs attributes. */ isa_bit_mve_float) \ && !TARGET_GENERAL_REGS_ONLY) +/* Non-zero if this target supports Armv8.1-M Mainline pointer-signing + extension. */ +#define TARGET_HAVE_PACBTI (arm_arch8_1m_main \ + && bitmap_bit_p (arm_active_target.isa, \ + isa_bit_pacbti)) + /* MVE have few common instructions as VFP, like VLDM alias VPOP, VLDR, VSTM alia VPUSH, VSTR and VMOV, VMSR and VMRS. In the same manner it updates few registers such as FPCAR, FPCCR, FPDSCR, FPSCR, MVFR0, MVFR1 and MVFR2. All diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 3936aef69d0..079e34ed98c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21002,6 +21002,9 @@ Disable the floating-point extension. @item +cdecp0, +cdecp1, ... , +cdecp7 Enable the Custom Datapath Extension (CDE) on selected coprocessors according to the numbers given in the options in the range 0 to 7. + +@item +pacbti +Enable the Pointer Authentication and Branch Target Identification Extension. @end table @item armv8-m.main --=-=-=--