From patchwork Thu Oct 28 11:42:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 46742 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 6C1D13857C4E for ; Thu, 28 Oct 2021 11:45:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C1D13857C4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635421544; bh=pgAxxPaQhNQLH+xuYl/i+iS4yFjqo/kxHZ65g87mh/Q=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=uZbBhTCn3ry5Hbu5yF2ZgiQlGd+ICLkfG4LmH4yUKU3aB6Uiw8Oevx/VFlST98+tr TkCJmbR7HoRhxq6+ENsXs0t8hiPFEopK+Ql6uCwn0aQquGOMmBIG5GXpakXKwhcbLT lbkYX6b0BirIkKsY1hdkWPB60mIcKIq1/ccwYYhM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80053.outbound.protection.outlook.com [40.107.8.53]) by sourceware.org (Postfix) with ESMTPS id 5B56B3857C56 for ; Thu, 28 Oct 2021 11:42:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5B56B3857C56 Received: from DU2PR04CA0049.eurprd04.prod.outlook.com (2603:10a6:10:234::24) by VI1PR08MB4045.eurprd08.prod.outlook.com (2603:10a6:803:dd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Thu, 28 Oct 2021 11:42:47 +0000 Received: from DB5EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:234:cafe::1a) by DU2PR04CA0049.outlook.office365.com (2603:10a6:10:234::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Thu, 28 Oct 2021 11:42:47 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT055.mail.protection.outlook.com (10.152.21.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Thu, 28 Oct 2021 11:42:47 +0000 Received: ("Tessian outbound 7b0bcc4a550a:v108"); Thu, 28 Oct 2021 11:42:47 +0000 X-CR-MTA-TID: 64aa7808 Received: from d1e856ed3bb6.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 25680E0F-7C5B-4BCC-A0D1-19DCC92602F0.1; Thu, 28 Oct 2021 11:42:36 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d1e856ed3bb6.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 28 Oct 2021 11:42:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ykh5UY7EAMfKF42rcApQc8+/dWOpB9aiUwryA6aJ0ewx86Mdpg0PdMAHugO//DFdFI73nhE6NmW4QUjJmMq/5SK4QeOn9smLVyxQONYfiRaVxCObAK1BLCnYn3qLaseK2HXoSuMN3sgaLGq1xWg5Y9rWkpWF2yiMSusJ8nh6R6n414LgjjlKlzP5Jvdk0lvbitalG+SajqieiRtV1BHD0duRbQF+5nrureUZq2hO88UNYxsjPZb8zCac0/Ry68BUvpVsxyjBCoX0i4iGZrWz6u317SemK58I1YbfaGtzP6rNgs1D+9NnC/qWUrkMPlzLz0BlxxBO+VdlPcg9L3cF+g== 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=pgAxxPaQhNQLH+xuYl/i+iS4yFjqo/kxHZ65g87mh/Q=; b=YTI3lHP8ljpLCFedogBYS4bNwFtyRd5sIr/l6l/KHTzZ/J5M0UdLNYBVYnsLAvq/7X0UvFeO//V7g/4S05FPG3zixr39T3UzxqL7+jJnLeeO6SwPAYjBWYQ53hpLf1M1ZlDCAkyugMhmanGhZhBRpPQ4f16tLex+6nh25W2ixoBM/J+gp77UjrfUDulK1r2I0KMXYG+f+kA2skqqYx6X7Spxmlqnl84ckau5x66rh8rw8tgEGO4OrNb6w0LcuHmyy3HARi67m97WSt3PlT4Cr3P6U3w42ci6HxeOkohCtVcy5SRC33hyOU7lmexKFIqt5pUjHX/o4+9cORRmjOUJ7Q== 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 PAXPR08MB7075.eurprd08.prod.outlook.com (2603:10a6:102:201::15) by PAXPR08MB7105.eurprd08.prod.outlook.com (2603:10a6:102:203::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Thu, 28 Oct 2021 11:42:35 +0000 Received: from PAXPR08MB7075.eurprd08.prod.outlook.com ([fe80::9c7f:ad76:ac66:26f2]) by PAXPR08MB7075.eurprd08.prod.outlook.com ([fe80::9c7f:ad76:ac66:26f2%9]) with mapi id 15.20.4628.020; Thu, 28 Oct 2021 11:42:35 +0000 To: Richard Earnshaw , "gcc-patches@gcc.gnu.org" Subject: [Patch 4/8, Arm. GCC] Add testsuite library support for PACBTI target. [Was RE: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.] Thread-Topic: [Patch 4/8, Arm. GCC] Add testsuite library support for PACBTI target. [Was RE: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.] Thread-Index: AdfL7NWdMpISI84oQwamqek1K3045w== Date: Thu, 28 Oct 2021 11:42:35 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ts-tracking-id: 6B81A58E9D265640A0C9A73C1A2F44F5.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: e6986c79-9c02-483c-2639-08d99a081087 x-ms-traffictypediagnostic: PAXPR08MB7105:|VI1PR08MB4045: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: DlOX/VskV2DnK/JiT2CfvR0r22fkJPP8ZThdX9fmX2Z9kxkMGnFNCrnZX1mod5EmwXESkQerBTrYmR4jHBeSY1vUd6E2TmzndlAv8mmiD8Q7qIgEozqcbLfyo140xenhyfCoQKXClfwtOeu0LSoYNhfRugBQ9vs6mmrCC8q1xBS8wuzH9+KbaEKs1DFP6Z4ZeMa/3hHHZU0HAoasmf0VtM+KLi96nfDtPf0WMPYRzTMuL6WZu3XxpFMYZSqEuGssu/BXKhwrNjkilGOxNBMtLGl80rF8eJojbnQClwlGWC87MzygLzGu1vSx6YHCq5byRNSc3P6UaVDWLPiHRA8yEgCBmDi319czsa+94GrI/z6xp5IcvFPa/7Db32NtMsHWL4ydqOHv0B0yPW9feB2wLkNDFyR4uLgSU1JAumdA7bu4rsu3OtHr13m81pgeu45IVmogwXtSu7+o3YFMASZZ7pC8dUjwXlT2Q0D3u/u0A+UsUnJSx/fEk9KP0B5hAQTJgG8Nwhwod9J4P/lC5cIlCzLgQmOqbbXE85edZNpqN2sUx8Dd/fRD2Yc+2FBkvrM35bH+g3HBtgrwaGhy/m6qP3AJjOVwMRXWNq2h+i2j5MU44sMLDfzhXU1Tdmgw5Ix9tOmQ34J6zFigql/GsJ95u0j+bTiIDc+a7WteSN/ZGGzjW83tgDHS0Dc9icH8c8TI8tEogFWCgmsZ7sN3FuwXDg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR08MB7075.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66556008)(71200400001)(66446008)(66476007)(66946007)(8676002)(64756008)(110136005)(4001150100001)(86362001)(122000001)(38100700002)(76116006)(8936002)(99936003)(83380400001)(6506007)(38070700005)(7696005)(53546011)(2906002)(52536014)(5660300002)(33656002)(55016002)(9686003)(26005)(508600001)(186003)(316002); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7105 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: DB5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ab997be2-c266-44f8-acf1-08d99a08091a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b4/1nC21OlorsqOQ2/wXJP+zrBjbW0Tm0ZcnFFYyksToyuVDGTFIHr1pRZthNqeg5X8jrFgP8mSEtCzvk3GqCiyEDm+dtNt731jqgnQp7YqEX3pp6CeZY87y6/b/xkqGCnm+n2/4wMym6xdAbaY3RnZUBd3db1QRlqH69W2d/rxDwtJDn8hzwdcQIp93dGWxv7QTzk4CV9ZLbRDX3Hg7M9Ir3Y+AG01C8j4ApPiL6bD6351P4d/YZeosGuHlJPIvefY8Ix9msiCuGxeJMdWju0bXp48vcTfiKMlpcuLpReAxP24O/pP3Tqk+Gy9zHQiRpOdbynN5QKO1pkFMUvGU1jjQMWEh2C//rCLGQ+VXdxrSDDxQlJ4ZCdmf8vDTfStb+xEimVyXAxx8wYzQ8UDzoXoyLCgmJGj54jN7CWINbXvgzqQsIJ5nFEpnPOO1P3Ug0CZMiKWzwVS7UMu3q4xlVKSHKGZgKS7aDIv2sHaaw+zBGvDiDIYhSSpJ3jGotcOhR8C06aaTcoIY9VkQHPv1iq7KN+QcDJPk7+83lVV20hPSEqy0jPLps6rMZNbz5TQfMgjEaKW8Xx9uNyYKs51rPt0uo1WTyJwFcJ+GPb8RBM7jgWBJ1ocHSaJDnL9JtjNfki2Qff9Bre7yCs7ehrIEZ1BLSwZrkandBsn8zjtSQy/FJGPVLNT0uD9c+z6VjJQoKUL5cpk/A0hCct5e4FuMtw== 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:(4636009)(46966006)(36840700001)(26005)(82310400003)(110136005)(52536014)(55016002)(33656002)(36860700001)(8676002)(86362001)(186003)(4001150100001)(5660300002)(99936003)(33964004)(508600001)(356005)(7696005)(336012)(81166007)(235185007)(53546011)(2906002)(8936002)(316002)(9686003)(21480400003)(47076005)(70586007)(70206006)(6506007)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 11:42:47.7274 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e6986c79-9c02-483c-2639-08d99a081087 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: DB5EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4045 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tejas Belagod via Gcc-patches From: Tejas Belagod Reply-To: Tejas Belagod Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" > -----Original Message----- > From: Richard Earnshaw > Sent: Monday, October 11, 2021 2:38 PM > To: Tejas Belagod ; gcc-patches@gcc.gnu.org > Subject: Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI > target. > > On 11/10/2021 14:36, Richard Earnshaw via Gcc-patches wrote: > > On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: > >> Hi, > >> > >> Add targeting-checking entities for PACBTI in testsuite framework. > >> > >> Tested on arm-none-eabi. OK for trunk? > >> > >> 2021-10-04  Tejas Belagod  > >> > >> gcc/ChangeLog: > >> > >>     * testsuite/lib/target-supports.exp > >>     (check_effective_target_arm_pacbti_hw): New. > >> > > > > OK. > > > > R. > > Oh, wait! Not OK. Needs documentation in sourcebuild.texi. > Thanks for the reviews. Add targeting-checking entities for PACBTI in testsuite framework. 2021-10-25 Tejas Belagod gcc/ChangeLog: * testsuite/lib/target-supports.exp: (check_effective_target_arm_pacbti_hw): New. * doc/sourcebuild.texi: Document arm_pacbti_hw. Tested the following configurations, OK for trunk? -mthumb/-march=armv8.1-m.main+pacbti/-mfloat-abi=soft -marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp mcmodel=small and tiny aarch64-none-linux-gnu native test and bootstrap Thanks, Tejas. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 6a16576763006a13e946147ab1ea5b16b5bc219b..3dd1dd8d7f031720e55cf389376f1572991d8071 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2141,6 +2141,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. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 1c8b1ebb86e8769e40fe88af3a4c651990dbb2a1..843397adf437700ca622ce140359b6aaa0172e42 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5064,6 +5064,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"); + } + } ""] +} + # Return 1 if this compilation turns on string_ops_prefer_neon on. proc check_effective_target_arm_tune_string_ops_prefer_neon { } {