From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130050.outbound.protection.outlook.com [40.107.13.50]) by sourceware.org (Postfix) with ESMTPS id BBBA13858D28 for ; Fri, 12 Aug 2022 15:22:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BBBA13858D28 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=CJ5krxo0a++MpY67dP8yoC1LjlhfRl1YVz7ogM77OHY5ahZU5WEhY2/iYQu0Eyp//hFkvBB17nDnQg2Ieud6lzu5BheO/FXuGkOdl1lBQH0PoJDZTYtMPTn+fQ82129Lzm1PuwWs7SnRwMM6gR2W0AfzN+ln2iiyeRAAdcfkNlOVZU6s/xP1zKbJXnLsIbqWrsehWeuS3dlrimBcfIHZRxYCMF0BRq15GyBdKmZdqVUDDiYzhl88bKHFDjUeOWWwiciA0nVU1vK/tvKfNcmlgIT22I6NpvhaXeA89cd9xYQvaN8jccGTzIwj/mDJTDD3Fbzz0C4yQu/5klGCwi+5bQ== 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=86AdRSobdnOzVIrPfC7+PDiE+OOfF+0Yn6CKC6fK2ts=; b=mH4mRkgq3T532RcC81oblkHULSoppI5I12+Ee69G8hQi3AtRSBJhWtyOMuvSUZ68/xRA0pueXqj96yUaL6m/Nkll0Xo9XW9lnluX/XI+cDc8hMTNgIkO7Gdi8FhTzRNo/i68ieIVrDYUN0ZVHWkGnk620V8ijeEDXUxE4gMMDbhntPI3IQwrNpNqUnLZ46OHOxHS596cwUuLyoNtuHA/rh0mWBI+e/BAB2aYf3ZojMz2yAjvEhSzLeJgYIz08VL9ZUq+g2qV36SWIFvVjt+AQRxVcdmue2YRNjkICBOwba2aTEzj7cLHAfnC7nKg9hkX+A8+fR/4AbsxD+mF8eVT5w== 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 DB8PR04CA0028.eurprd04.prod.outlook.com (2603:10a6:10:110::38) by VI1PR08MB3117.eurprd08.prod.outlook.com (2603:10a6:803:42::22) 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:22:56 +0000 Received: from DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:110:cafe::90) by DB8PR04CA0028.outlook.office365.com (2603:10a6:10:110::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.14 via Frontend Transport; Fri, 12 Aug 2022 15:22:56 +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 DBAEUR03FT032.mail.protection.outlook.com (100.127.142.185) 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:22:56 +0000 Received: ("Tessian outbound fa99bf31ee7d:v123"); Fri, 12 Aug 2022 15:22:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: aad359c8b4d3d753 X-CR-MTA-TID: 64aa7808 Received: from 216906d1b640.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 40F26553-3E05-424D-AA04-7B4862FB5D58.1; Fri, 12 Aug 2022 15:22:49 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 216906d1b640.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 Aug 2022 15:22:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P+wb4GBnvAFBaMdndift28Fv9i5LnvMdKmJJvk8G0TksMDtNLeaPWhomhbvvN+3AGtguRhcS6rYr/ZOSdM6FSIB7AaKpaiBHtp5MrRtOd2W3+sn0E9AD2AXjWvAG5d5lZKhycwJoeRL24MIMjvE9jSTwwLFXn9JxtQe98kDIHal19/EBwlFf0P3H3COKdVzzhnDCtZakC6b9sxMroVWGFdfHM2IWBtXiOEyh5/BGxMaHWlqGYH3tZc96yi4aGclzE01FduCc9Ib1RzcgE+cb0SlB7t8uv4T8HXiuKzepUMJQLwX1/g0o/rYdP8cknE7tiDs4H5gt8juBSc+VjUeuEg== 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=86AdRSobdnOzVIrPfC7+PDiE+OOfF+0Yn6CKC6fK2ts=; b=iLw9jUjc1DJ5lBItIRQaFqqQqpTRrV5iedjr903dCU28/1wb+3NR3o6A88fOTFJJq6TnqST/QqNbutudeboIgbhTupG6E6OroNddSo1a3twCD5R6y0M31oJCGY1un+qp3F7j+7eGZMoXfaJuZEnccImZ6/v53fLgVzA8MNAHBCjBi/aJwoWe72FChJpo5TA97f2NBBqm4dDHCzYJ8ZdkGy59HWbsF6DjiPg8Spbkcy8mk1R6BmMwxPlSh7raC6zGAdd9wTxoeYoGdFpDcaUTKJsk6g0xe+C4B8j15oPqxMGZKfiBilZEZKZ30TDqJ6KDTQgQC+5Sdq7jE27YIJm0ag== 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 AM7PR02CA0017.eurprd02.prod.outlook.com (2603:10a6:20b:100::27) by PAXPR08MB6623.eurprd08.prod.outlook.com (2603:10a6:102:155::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Fri, 12 Aug 2022 15:22:47 +0000 Received: from VE1EUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::5) by AM7PR02CA0017.outlook.office365.com (2603:10a6:20b:100::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.13 via Frontend Transport; Fri, 12 Aug 2022 15:22:47 +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 VE1EUR03FT004.mail.protection.outlook.com (10.152.18.106) 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:22:47 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Fri, 12 Aug 2022 15:22:46 +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:22:45 +0000 From: Andrea Corallo To: Andrea Corallo via Gcc-patches CC: Richard Earnshaw , nd Subject: [PATCH 4/15] arm: Add testsuite library support for PACBTI target References: Date: Fri, 12 Aug 2022 17:22:45 +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: b6109157-254f-4dce-37e1-08da7c768842 X-MS-TrafficTypeDiagnostic: PAXPR08MB6623:EE_|DBAEUR03FT032:EE_|VI1PR08MB3117: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: syWxgHshlA3I7UmsJ6mr8kJlpAMLm8kyU4iA3tnMqHfK3AccPMEJEumgHDfdHwLLirafHUpnhIWUIGUBoQFnCLqtgfukF4w7eRGi1wz8GSh33iuFSZm6CIW939+KYX7E4AjacOuo6HsylpcXuF3Vho9SEakgHe1IPcg1uiW21mYQo2duCoUPxE/stxETp1aICLSTHd9nTCx1hqeheIjQM4AFXT46Nsm342JFiBpxMFU8mXRM3CjV8tGaz34FycBPV38kPvGfGue6w5P7R2AV3nDV+fJPvcDhKdmIhXYDKoybComhJXz5A/E0qT2rYWUlTFwqv7/mLVHpAPkBx2cyJkV2dlEX8zOwnLUUluviuPa3BP+wosXhmeXMrYSshL7dj9DYeM3dhEDTBmjXRhkIhH+U3jOxVklWsnCMsEVjXOzC8HywW+oxOOocT+lyNuJdtHb+Sh5Uc3aIgIGA0bZFVpgptwsTlkueg+K+t4pm1jFvB58kViNjB2Ol9JY5Ms5nKbDihPoxs0dQHmGfUbrkmHm+JiwULWUajqkOAl3UMtml9zUctpHt6qiBRWQyy+dqGEXkFAUMsvCvZjoDSIZeuQMg5gZEit8oyg06pMD2asIAGulI1isShTC3IsbpOOQdRr6lIMGPY0LhaDdDoCSSFxqpBL9sNkjG3y5jeY0STsP1V4AS8HmpCKoBH+ttnUzltfk4exT9L45t5p+xh0f+GJoIuy4oSflhblahecwhZxX8o/uXw5FaW4A4cizNYeh+SGDNwd/esULqTHAkVbeidTiLLF6OngE8XFxex6KejzOIB3xVdo2mfNAb+uERBK1RWJZlU1+h4C/pPh38XowjOG18SGrORsb3jshtV1ob9AaoYthYREm2ZkCAXXTpPV8U 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)(136003)(39860400002)(40470700004)(36840700001)(46966006)(356005)(82740400003)(81166007)(316002)(82310400005)(40460700003)(5660300002)(235185007)(86362001)(478600001)(8936002)(26005)(33964004)(8676002)(4326008)(44832011)(2906002)(70586007)(2616005)(70206006)(6916009)(54906003)(40480700001)(426003)(336012)(36756003)(83380400001)(41300700001)(36860700001)(186003)(47076005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6623 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4500fa23-d99a-4656-17d8-08da7c768333 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CS1VmNnYfm6o3qhNXhTOiIqtctnAeYX9qVTpBl3GFoouxJ9KT9Wz76FFY/lh5kqV0zB3X/ERgCBaHhIXhLGi1yidsz4oqo+/lpjQ/dy7bDgnpbxeC6rU370iRug0fleM1DBgKgQe2QYcihElovb7GqFKTbNCe6EVgU0ahuC8Fjz2EP0OBOM431cFqJLRUgBlPLLKpLreCE66V0otpUdv/QOBhyn89FAZusbvd8IlYNbFlAva3yvkfSvuJ0P2lXVPV++uVXahPcjzxP7HCZUJfdNjAy2q3y42w9UJflXdqCgFBVsBNd1aWx6m3t3fxWi6lSVLX3J6p24ZKaoFm6EKho1ooZSN7CK+L2Zwl96fK5Mzxpim7IeQQ46oV1odbu3OLdmr8pDcoJjj2zcl6LZ7DFR1Tto42Eq6x3+V08RC022hLzlHrnbodvqvRQcQEp+m5k6QpG0lXVA0/5jHJnHdwy9JO3ClLDpETchGJWjV0xVxDnV5ENazQLAAeJ6WBiCFhv5JxDB6iDenvQN3R2FylheCLFgeP57jFZfcBzxN5wqebTQpIS4afxbZJKFAtOZc8goupITZp6W8S4XhAqGMjKEznaxqeV0CjUl57fJUtaNxU2HwdCq3P0gfy3g6wHbNcxvADGQfnVD+/Hy8mUf87moQrCELZ2q5uNDIOsVXD7lT11LrXL9nX8Gg21Ddg5RbqASwyQ4HaL6G8rwhyOmQr50m9uMcejwIApIzaA0zK0zQxwADC4opXgt+k/cE9U7tTGFeeRvE1/ULV0OA+A0P8n6CMdFPFf/qOrVlG3rmeiMOnL0+JPNE3ktpSvIBA+vj+plDRQ1hkQhRzqx7KG0vjg== 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)(346002)(376002)(40470700004)(36840700001)(46966006)(36756003)(86362001)(5660300002)(82740400003)(81166007)(36860700001)(2616005)(83380400001)(186003)(336012)(426003)(47076005)(26005)(478600001)(33964004)(41300700001)(316002)(54906003)(6916009)(4326008)(8676002)(70206006)(70586007)(8936002)(235185007)(44832011)(2906002)(40480700001)(82310400005)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2022 15:22:56.0372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b6109157-254f-4dce-37e1-08da7c768842 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: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3117 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:23:01 -0000 --=-=-= Content-Type: text/plain Hi all, this adds targeting-checking entities for PACBTI in testsuite framework. Pre-approved with the requested changes here . gcc/testsuite/ChangeLog: * testsuite/lib/target-supports.exp: (check_effective_target_arm_pacbti_hw): New. * doc/sourcebuild.texi: Document arm_pacbti_hw. Co-Authored-By: Tejas Belagod --=-=-= Content-Type: text/plain; charset="utf-8" Content-Disposition: attachment; filename="4-15.patch" diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 613ac29967b..a3f60e9c0cb 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2167,6 +2167,10 @@ ARM target supports options to generate instructions from ARMv8.1-M with the Custom Datapath Extension (CDE) and M-Profile Vector Extension (MVE). Some multilibs may be incompatible with these options. +@item arm_pacbti_hw +Test system supports executing Pointer Authentication and Branch Target +Identification instructions. + @item arm_prefer_ldrd_strd ARM target prefers @code{LDRD} and @code{STRD} instructions over @code{LDM} and @code{STM} instructions. @@ -2256,6 +2260,12 @@ ARM target generates Thumb-2 code for @code{-mthumb} but does not support executing the Armv8.1-M Mainline Low Overhead Loop instructions @code{DLS} and @code{LE}. +@item mbranch_protection_ok +ARM target supporting @code{-mbranch-protection=standard}. + +@item arm_pacbti_hw +Test system supports for executing non nop pacbti instructions. + @end table @subsubsection AArch64-specific attributes diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ff8edbd3e17..aa828bd3a07 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5090,6 +5090,22 @@ proc check_effective_target_arm_cmse_clear_ok {} { } "-mcmse"]; } +# Return 1 if the target supports executing PACBTI instructions, 0 +# otherwise. + +proc check_effective_target_arm_pacbti_hw {} { + return [check_runtime arm_pacbti_hw_available { + __attribute__ ((naked)) int + main (void) + { + asm ("pac r12, lr, sp"); + asm ("mov r0, #0"); + asm ("autg r12, lr, sp"); + asm ("bx lr"); + } + } "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=standard -mthumb -mfloat-abi=hard"] +} + # Return 1 if this compilation turns on string_ops_prefer_neon on. proc check_effective_target_arm_tune_string_ops_prefer_neon { } { --=-=-=--