From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2058.outbound.protection.outlook.com [40.107.20.58]) by sourceware.org (Postfix) with ESMTPS id 44F4F3858422 for ; Tue, 9 Jan 2024 14:34:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 44F4F3858422 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 44F4F3858422 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.20.58 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1704810890; cv=pass; b=laecntW8ZPSNRFYylcwNPtd140RmK8cTBVstIxbuSLEdHBH+xQbkJEfLjSrDb+6kauTc1rVsXegvmLIx4zdKGsst4htxBysBFT5H7mEzCAHIDExAOeSx5I4oPrGwKevL0O3d/lyIJCJXo7V7qaW4nVC5pxxR55wejVF7kRbwy8Q= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1704810890; c=relaxed/simple; bh=7SPP2nozZVmxA0mAFi4Ql+ympb+vnlPLH7FtcmSJzGI=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=bX9LACHkoQG1m87aJhVWrt0uYEFl1tQH3NwZUP3tzRD1ARryOR5VGBEB67sL4BlheW0+ht3X1NjFKWHrVVLhlMRHcScbbTGfcnVEblnSUYXmaVQD+smUhHkyPDxadEqprzHz2vozyogs2RekO76Vc38IYWm7xCK1fK9H5W8Wyr8= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=lFf/6ZOZ5CI5+xFmDO3AlZ1B7A2pRx/bWX+8t84Fw9zecrtzEqbPFOar31x2dvnXmVFoER4az+1T5tQA/6qNKpmd6d965l9PtzEVZURO45ykd/Wqrr+3t0sut3xCY7k2t9Gl8+Y769OG7sjzLh1r8BjDqEX824Pv0r38t7KQiMTIkc10U/0eJNTyk59OGDTagdjgLXSSVfOnj903hs+R9Bw3ZEdP+T4Qbbao84qMOn77yW62yFDFjO4R/SFrjzI+G/+PTuTl0cZS7HevVxblyRilfO0ZJasY1zGjTv0AWSVYY7NYSrmYSGiJqFuQB5NRiVASRUSz/hI9Hk0En1sV5w== 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=iAgqcdCe4a5jRcAIIyEySniMA5I6xEjKJzt0atQ41L8=; b=Ztr3IdZP0mx51uszZEGgDSXC6XnI5ZEENB9OvJnRijg/eyb+wxAnJjhl/r1nlFRCgliLDBBrO4zwWrUYbrPQ6/rEJg2oJxKxPp6R+eBr5ZgT2kRDnFIVd2TO9KNUr3uLsEjCeb1J2oy54tD7wDc88Z1k22wga3YdOFrE2aZ2bYSElnCv5rJIzVFoTGohvXxa032lbZjn/L3/uqGW+EawrLEAPzdZBTmO8jEnS/bqldRCZz4MgFmGlGZ0r6/7sii+fp+LmMKgNO04FZ40QY3RkeCaYe6jUzRh2xmp+PNZGuxLUqWbgiL96DwGKpuE4vAgpcorkAmKLOJg4n9RD8cm+A== 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]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iAgqcdCe4a5jRcAIIyEySniMA5I6xEjKJzt0atQ41L8=; b=5rHJKNYJtzKKBsEkdZo3NKt2dfKPHuJkj7kFEE2yNMNw6B+K58chuxN0CiuNrSBfHKtzmPVHx2DvMZH02P46NdZtIGb9qwck3iTk3xpo7rbP6106Asv+PHgwYwNz0hOKbHNbGYS6k85XMh91ZD0YaBW96ZrgKgwI8RqyK6aPh7c= Received: from AS4P250CA0030.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:5e3::20) by AS2PR08MB8928.eurprd08.prod.outlook.com (2603:10a6:20b:5fb::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Tue, 9 Jan 2024 14:34:46 +0000 Received: from AM1PEPF000252DA.eurprd07.prod.outlook.com (2603:10a6:20b:5e3:cafe::c4) by AS4P250CA0030.outlook.office365.com (2603:10a6:20b:5e3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21 via Frontend Transport; Tue, 9 Jan 2024 14:34:46 +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 AM1PEPF000252DA.mail.protection.outlook.com (10.167.16.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.14 via Frontend Transport; Tue, 9 Jan 2024 14:34:45 +0000 Received: ("Tessian outbound 52fd419df13e:v239"); Tue, 09 Jan 2024 14:34:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b5d6400411bd1c6e X-CR-MTA-TID: 64aa7808 Received: from 735d0bc5e599.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 99857CEE-0D01-4323-884A-31F0565A405C.1; Tue, 09 Jan 2024 14:34:39 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 735d0bc5e599.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 09 Jan 2024 14:34:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZOcEfrPvNhtmPIbzCcOxU+fYpGP+g0f5lcIiMenuRHewkv+wvEiEQswL2isVfk/nqc47HTs30vV3xtgsbLahwqxopnGpHH8dRVPLcJOlpXYING6WPwpCYfWxe+87ZkTKCBY4V6Mesupeg7zx8XEcNaYTxfnR6gf0hMzGCEltyPOF5FvUZKFU+SUT2sBvslKKWR8kbzcHdPllOYpd5DgkR/MqXt0uaKyEqG4Rs40VAMBFkQ0dISj+2XJAibQYaBO5rLpVcBpxov1kxnp6K9OJFt4HRl1WKVaR/FHnbqgLm1cJMptTLWu/M3aMo3TzTtk+7ILg/AYfs/7NoHRLxIOJNQ== 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=iAgqcdCe4a5jRcAIIyEySniMA5I6xEjKJzt0atQ41L8=; b=bsToHNnMVpx+PAlKrXgRtyiklxG+S1rnP6ugUoG8IMk3tmEeYwVkeidoa8mA/yScP3SY3nKnZcrUvPN8kveyxh4oLz5LXtmBGwpr+/c0c/6RrS3iJGdoY4SO+i13amuUFOZCksCEH8IvhT/uBSlf6EkH01JEDPr3s+OInlW8fw2DRPBJ02WvoELiQTk3+CA3GU8xftGr/TcrKBPVLNTJt5INaR9NVMUOzvZIq1lIsOctV6ZF9XEHAEyFbySpQ4vv4BkAtC4Hkk7bHMbEP/yaUIHH0R1p7dcfZFNhJ9+0jRgtP/bEC1G3E1NS6KeQYY6mD3nEVl125Lbw/FoNJDFRuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=os.amperecomputing.com 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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iAgqcdCe4a5jRcAIIyEySniMA5I6xEjKJzt0atQ41L8=; b=5rHJKNYJtzKKBsEkdZo3NKt2dfKPHuJkj7kFEE2yNMNw6B+K58chuxN0CiuNrSBfHKtzmPVHx2DvMZH02P46NdZtIGb9qwck3iTk3xpo7rbP6106Asv+PHgwYwNz0hOKbHNbGYS6k85XMh91ZD0YaBW96ZrgKgwI8RqyK6aPh7c= Received: from AS9PR06CA0678.eurprd06.prod.outlook.com (2603:10a6:20b:49c::21) by VI0PR08MB10654.eurprd08.prod.outlook.com (2603:10a6:800:20b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23; Tue, 9 Jan 2024 14:34:33 +0000 Received: from AMS0EPF000001A2.eurprd05.prod.outlook.com (2603:10a6:20b:49c:cafe::9) by AS9PR06CA0678.outlook.office365.com (2603:10a6:20b:49c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23 via Frontend Transport; Tue, 9 Jan 2024 14:34:32 +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 AMS0EPF000001A2.mail.protection.outlook.com (10.167.16.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7181.14 via Frontend Transport; Tue, 9 Jan 2024 14:34:32 +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.32; Tue, 9 Jan 2024 14:34:32 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.32; Tue, 9 Jan 2024 14:34:32 +0000 Received: from e124257 (10.34.101.64) 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.32 via Frontend Transport; Tue, 9 Jan 2024 14:34:31 +0000 From: Andrea Corallo To: Feng Xue OS via Gcc-patches CC: Feng Xue OS Subject: Re: [PATCH] arm/aarch64: Add bti for all functions [PR106671] In-Reply-To: (Andrea Corallo's message of "Tue, 9 Jan 2024 15:10:10 +0100") References: Date: Tue, 9 Jan 2024 15:34:31 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF000001A2:EE_|VI0PR08MB10654:EE_|AM1PEPF000252DA:EE_|AS2PR08MB8928:EE_ X-MS-Office365-Filtering-Correlation-Id: 77ba4c00-55cf-474c-e1d7-08dc1120206f 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: uHXKXsD9xOs48pQju+Dxp+YjWOrcq4uA4Htl/2RYCxpDjSHF6IGNherZNiQhLMYflmfE2bM+6SjkuAkOONmxAkNuew0zSpqjy7iUfxTV/pGXAPqmHH/kHr+hOX6/+eVQ9CPyeSQ4QT7p9H2O5fS3xCMCtQsNAp4VeeA6QiWjqD65EPFGRLrcCDuGdLH9jp+FJRYy+xuBHZW71Np5dFsdruZ84hiroI7wEitmKwQIdtY1UFdhImuzDzY1/rFspTYdZixmgLJ6tlP680lm5NOAsEd+lHCOaPYhe99mesFx9s9IQHs5l53jicqtcT4h8eo1c06Q/hXMjfFw7RtLwqQnGPNI2HBtGBrGrxYEdlaoxEVz3xKJw+bi72RqpphLUcjhmN8Z9n6d34/HXm2/pgcO4v4bFjDmwvxIOkEg3kMRLvnAozX6gdTJg+0Jl+ww+XRh+vI8BBDii8QgGH5HKKe3rpfJZGhaYWysgGEJw4ze7I5wtQfvj/OOXyrZr+hgK8W1EbibHOLWNmSoQPEsICdRChAYe5Q/xlmav/6j5z6Spf+dbGJC5NPpmB4TSx0nhDzNsCglPX8auQK3ikVmhvTBoljtIhU1tzLEN0aX/RInCaMlQ9kPpQY3f8RV1dWChrNNOca1i9NaDkGAPpDeXBrOyQViNY6wKMjIY8GjGZF1ZjdWBHDgxygO0t5l00VzcIy+XdtBdAPeuevA9Nt6hvEjbNJ/KdAfRVks5Ib4AB2hqh46NaHfYTH5LEVC1NRYuUJUamo1LoATAQyv1BdnxD4EwA== 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:(13230031)(4636009)(376002)(396003)(346002)(136003)(39860400002)(230922051799003)(64100799003)(82310400011)(186009)(451199024)(1800799012)(40470700004)(46966006)(36840700001)(40480700001)(40460700003)(83380400001)(26005)(426003)(336012)(86362001)(36756003)(356005)(81166007)(4326008)(44832011)(5660300002)(2616005)(82740400003)(36860700001)(6916009)(316002)(8936002)(8676002)(47076005)(70586007)(70206006)(2906002)(41300700001)(478600001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB10654 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM1PEPF000252DA.eurprd07.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 17215a25-dfed-452c-4b57-08dc11201881 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1ew6fFslg4y7kSSqxAiAqk5GwKROjTF/Y1wGgcokWZuRIc0pnjPjVhoNqKNLH/SLy583yW1jHrn4qF08bPIT3xRLiBXJ4uj7wtz51YX/QN2OfK77pUnJhTmCxQZr4dLd904Xkj+0yWi2rWKQLKLyZIZaJUTZeTBX62Vks7RQHd0np4obTemOlzGYjBPXdRAEwNrIsspY3c0SI6DmBQQUZRZy4/MfjDG8749BexyTXpn92fZMJk/sgvoEC3AoydnDqlyf7mNgigPpW0Yp8iTJiFwkJj2rcWsQOohMkL98QzV7p53MjO5IH6kha5b2jdA3yftwsmr4v59NQOJSX92HCNYIwre8LyHPUbBY8Ofsv7yB+N33vCEr1DsnpWFWn05dYi05M7SOYFPIiQvSWdGI3OVydW+HkNbeXsLw228Q39dr5JTPLz2Z14XcpFisJyCpEe6pPtpHIMG6JQWqUxgY1rjHCxelstAq7DJbb0fpfIacYPh93YSDo+1gYfIZflaafSHaH3n6MAmb/4c3c7SC3P1JwKgsK45X7bOlSqLMe18OXCvJdkLl93Nu05r0ked5TAHHDfCOK3v7szwDPgyLR2O0NEnCfTbQ1tll6o8VPudHRDxji5vBggSl3fI6O0HTVaxjqj6nSHjke+a74HCd8OX0OGV0mYcrEyzInwmJqjKFK5lh/6ER3gKFfX/ao4m9Lq6+LSH3QJWQ28WO1GLxPHSqD9DqMOS70Zu/sWBGHKfmnhVi7gusTLx5QjCrFLO 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:(13230031)(4636009)(39860400002)(346002)(396003)(136003)(376002)(230922051799003)(186009)(64100799003)(451199024)(82310400011)(1800799012)(46966006)(40470700004)(36840700001)(41300700001)(8676002)(86362001)(8936002)(81166007)(40460700003)(40480700001)(316002)(478600001)(5660300002)(82740400003)(2906002)(107886003)(47076005)(70586007)(26005)(2616005)(426003)(6916009)(36756003)(36860700001)(336012)(70206006)(83380400001)(44832011)(4326008);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2024 14:34:45.9971 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77ba4c00-55cf-474c-e1d7-08dc1120206f 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: AM1PEPF000252DA.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8928 X-Spam-Status: No, score=-11.6 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 List-Id: Andrea Corallo writes: > Feng Xue OS via Gcc-patches writes: > >> This patch extends option -mbranch-protection=bti with an optional argument >> as bti[+all] to force compiler to unconditionally insert bti for all >> functions. Because a direct function call at the stage of compiling might be >> rewritten to an indirect call with some kind of linker-generated thunk stub >> as invocation relay for some reasons. One instance is if a direct callee is >> placed far from its caller, direct BL {imm} instruction could not represent >> the distance, so indirect BLR {reg} should be used. For this case, a bti is >> required at the beginning of the callee. >> >> caller() { >> bl callee >> } >> >> => >> >> caller() { >> adrp reg, >> add reg, reg, #constant >> blr reg >> } >> >> Although the issue could be fixed with a pretty new version of ld, here we >> provide another means for user who has to rely on the old ld or other non-ld >> linker. I also checked LLVM, by default, it implements bti just as the proposed >> -mbranch-protection=bti+all. >> >> Feng >> >> --- >> gcc/config/aarch64/aarch64.cc | 12 +++++++----- >> gcc/config/aarch64/aarch64.opt | 2 +- >> gcc/config/arm/aarch-bti-insert.cc | 3 ++- >> gcc/config/arm/aarch-common.cc | 22 ++++++++++++++++++---- >> gcc/config/arm/aarch-common.h | 18 ++++++++++++++++++ >> gcc/config/arm/arm.cc | 4 ++-- >> gcc/config/arm/arm.opt | 2 +- >> gcc/doc/invoke.texi | 16 ++++++++++------ >> gcc/testsuite/gcc.target/aarch64/bti-5.c | 17 +++++++++++++++++ >> 9 files changed, 76 insertions(+), 20 deletions(-) >> create mode 100644 gcc/testsuite/gcc.target/aarch64/bti-5.c > > [...] > > Hi Feng, > > I think this patch is missing its ChangeLog entry. Also you should > specify the state of the testing and regression for this patch, please > see [1]. > >> diff --git a/gcc/testsuite/gcc.target/aarch64/bti-5.c b/gcc/testsuite/gcc.target/aarch64/bti-5.c >> new file mode 100644 >> index 00000000000..654cd0cce7e >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/aarch64/bti-5.c >> @@ -0,0 +1,17 @@ >> +/* { dg-do run } */ >> +/* { dg-options "-O1 -save-temps" } */ >> +/* { dg-require-effective-target lp64 } */ >> +/* { dg-additional-options "-mbranch-protection=bti+all" { target { ! default_branch_protection } } } */ Also an afterthought: given the patch is enabling this feature on arm as well wouldn't be better to have a test case for arm as well? Thanks Andrea