From patchwork Tue Jan 23 15:53:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Ball X-Patchwork-Id: 191027 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp427640dyi; Tue, 23 Jan 2024 07:54:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGI31ATTdEFCN6+BYOvG4/Sv4uv5m8EMzzrmaNkPXMWBABOUBv8m7J6EuxmKjnSboSa0RQ9 X-Received: by 2002:a67:f791:0:b0:469:b18f:b86d with SMTP id j17-20020a67f791000000b00469b18fb86dmr2759398vso.33.1706025279522; Tue, 23 Jan 2024 07:54:39 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1706025279; cv=pass; d=google.com; s=arc-20160816; b=0AArSMa1tpSlVOq28ZnQ9Ayvirh59K4LaIHWC7PUYZlTfTtDuqwVSNLrV7zgeskfNG Equ0FgVQ8/CoFtO+C97pxkoQ4mST5teza41UizlAUj1QW8kJKsO88xjb/qzF1F0wdaMt hZtpfvJspSWiSIuCMvLqWd+ahd/Mv7ejgeVQklzVvltUb+5NEID5SXsWTtnpi3GaHUNG 2tMwj9ZzmHXBuO5P3HzmsIImFsHgHv1SUQ7kqG4ozTWeTV4/gO3vJ+GNm8LWNcOoLCfe BE0MQ3/wNJ8m8pNjj3/thn/j/MShcvpPmj4gg6iHdxdbO9gwll+NOCdIiO+t2tyM616/ uB0Q== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:subject:from:to:content-language :user-agent:date:message-id:authentication-results-original :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=bbg1iS6FfBkE+wQ/4yBVEwuzPzTHUg3xQTg6jkQzbns=; fh=5IRsBzjsJ0+OuMEiZ34Leg0w6XUv7p0nphsXjU/0Qy4=; b=gyYB5k3mMjEA4C6i3/v5Ro44WCrVITEA5zk/p+dDmzaISDe21CaPW6xhey7XrECWNR /QECV/bcON+Brqlvg7TqiBBhTohFOyrgENVJzpJenZcBaDnf8iwLg6V+cw7HM/74nZi1 c8DRnkuoD6cMgupUiCA9vsfIcaKZQ8Q7fQkJeUUgjH6Cnnj6dTcfB+sjDZrP5oTHtn0f a5jJFnaZBPMsXdxe+MN8EBdWrsNEXLkbAoynMJIJQKWNinZ2rvGUVt+rHAeJWAs+vgGR u57t65V9wpTAmbNIWzM2OqCO+7Wpg84eU/6zeSO8I8+Qh21r6CcypPPxfwJ1AWcQUXXs 8h5g== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KmsBpQiD; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KmsBpQiD; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d19-20020a0caa13000000b00680503d5c6bsi8238549qvb.149.2024.01.23.07.54.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 07:54:39 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KmsBpQiD; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KmsBpQiD; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3964F3858401 for ; Tue, 23 Jan 2024 15:54:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2049.outbound.protection.outlook.com [40.107.105.49]) by sourceware.org (Postfix) with ESMTPS id 1E87D3858D3C for ; Tue, 23 Jan 2024 15:53:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E87D3858D3C 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 1E87D3858D3C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.105.49 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706025233; cv=pass; b=WJVpHwuEvsnXuNKgY3leoALmjFcXm1uNoc6IVP/uyuii5c1wOBARYjdGrRLRTjU/HCLfXUGuk1cuxo3+rKPACcZ2ZN3/eORj3kGa6IyAGyu2OCiMVi25+pKBXeA4tEDW3SByOQx0BUFzuws7ChIso02eozIdnTS0eHuyIS7nZt8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706025233; c=relaxed/simple; bh=9pFVvDLv4305VCCZwnAnCPaZja9FQAsuoVaTT6VKkm0=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:To:From:Subject: MIME-Version; b=PRS9Uri99APDGpQhOr3YtyYFRCpgrRyceaQj95eGgG5jVyUspv+TUXEdHWWrbIdqX9cPhJn4V7Y7pu1Ce6XXhfHe8BdOz3AiY5G5996ghrCcaBaZNY2ZHgBWukcE2aQ69pRlstfj1Qwvq7AxVdkt9L+ZI7c9IleDSLb5JldPgSs= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=aZMFE/J0zYsh83GVNmPQbdK2Pk1VxxHMQ7shTL1OXlXR64399t7Tjb/PQnr5RdP3o9fA7i9MCIlhfiFo4GeuT2orOPcvCH5p+SPLu+1RY2rNvwOLjn5dBGlvPuS1S+T5m5+/3UvLSGhO+plbBnNVb4YQDDvzbawUkoVdIWAdQkfBHPp37k1mGZX6DI9B7ONq+HumrPTwnoQL3UC70/MLGfXrDGDegSg8bWngOX33ys/Z8pR5zr1VZmA8FG6NsK0bc1fdjmd7gN4Z46wJ7MjNZC6AV8vDa3fUguTs6AOPUHbZrGxk7sctZOKm8liY10By/1vaTHaA19H+e5ISYlPPNw== 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=bbg1iS6FfBkE+wQ/4yBVEwuzPzTHUg3xQTg6jkQzbns=; b=n6HwARdp+YBtcByKuTmhapC5n17Stvbrve4MTHe60cQ1aw+1/BR8rek28rlKW/fKim31JK5BBzsZti/clVLp2k3Rs2L+TT/DzQRvCVIcEC2wQ2adDIaqeZ1yU0HpXqkNfW5gkMoKhUGdiJ1fRzvEMu1UtCxb3j5BuD9p8P5LdHxbPEF4Ss2PqbUljpcWNpZHfLw1eUKdjRJEnoRUIpGkpT7oJ81sh+WdDhSDnIozgyJn7B6dBAyYFgSDXvOxCUW3YwadNahO0CRDmCB5YfOfHMsZzQWYGhwvyg5vrZ680ydARjiEBM+aNNsm/wIOkqFEgw4IMHqacTzpYaLykxqLBg== 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] dkim=[1,1,header.d=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=bbg1iS6FfBkE+wQ/4yBVEwuzPzTHUg3xQTg6jkQzbns=; b=KmsBpQiDLzUIll25KI2JQRQcJ/rM3D62yPL6o8NyaRC/LQQNjO+fYDQO3b9n7S6FV+1/5gfX2+p4Uon6NGWkfP0tR4+eVIJO16DA2f5RuLbMmyHZCfwZOwYnCig2sG2s/mfh0ns8BLsaDMDN0GnAUd7md/Uf+3z3A9j/bKpIRHI= Received: from DUZPR01CA0296.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b7::25) by AS2PR08MB10227.eurprd08.prod.outlook.com (2603:10a6:20b:647::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 15:53:44 +0000 Received: from DU2PEPF0001E9C5.eurprd03.prod.outlook.com (2603:10a6:10:4b7:cafe::9c) by DUZPR01CA0296.outlook.office365.com (2603:10a6:10:4b7::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37 via Frontend Transport; Tue, 23 Jan 2024 15:53:43 +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 DU2PEPF0001E9C5.mail.protection.outlook.com (10.167.8.74) 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, 23 Jan 2024 15:53:43 +0000 Received: ("Tessian outbound c4f080b252bb:v228"); Tue, 23 Jan 2024 15:53:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8e432d0629a420c2 X-CR-MTA-TID: 64aa7808 Received: from 1d5862497737.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 73F0B204-F963-4B75-963B-B00D306F0663.1; Tue, 23 Jan 2024 15:53:36 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1d5862497737.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 23 Jan 2024 15:53:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OV5zmZlYcoVz8uBW0ulE9ATayWPvtBbxtPMbtyp7+oXYtxUzAhcFXJOgPL6R1lU9nky/4hueyeynyOiuXjnrAo+xF9XQ+l4qTwr9J+Lx0NrB7lL7Hw/Ckur2xsNAYQD+3oJQ9Yu7yj9WfX2zJ1VzC0EaQVeQwLXd2dqH204/vimUjf8pTLiAoNyXb2veOO4dAkN1MuvMAfBwthjaR2bbg9coBg5ENtBmb25qNlF9uQWlkf5LeGASBTHzUdLAhuOTVOhY+pBFwno2BplzYlzF9gXJI0iwWZRbvTA8fT2TPZGf5t/Yo+MBKaZC+J/ljFgtzeU+6KzzQpzbUVBBv9rFZQ== 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=bbg1iS6FfBkE+wQ/4yBVEwuzPzTHUg3xQTg6jkQzbns=; b=VHwyPJo9Is/oYSCW0dXPTbHYHcV5bcTBcvrQSAhQs70yPUDszoWbwSQZPQNuxss2mRO0q4UnmhXaaAseNMh5eQlz0mnhFhfvMCJq8Cvl4bk4Gyu4iaS6fOaDQXM2TqaA8QixNxyE74mgUfru1/RmbJD6nFB3vJm2WN+NQtvrDT+kioJyr6KwzfWfcC6MNiZxWv3OmXb/KPJvy2ZnG6vk9bENTBl6QNXLrDALFOqEo0CVFkr1ESvYtLY5QiXOGINIaDwIlt6gDOngPkcHUANgRQL+S4GmYD39UmCldR4gjSywtBLpufEEY24RFvc/vb4RnbUqJtgtmvoayY++k0FcAQ== 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 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=bbg1iS6FfBkE+wQ/4yBVEwuzPzTHUg3xQTg6jkQzbns=; b=KmsBpQiDLzUIll25KI2JQRQcJ/rM3D62yPL6o8NyaRC/LQQNjO+fYDQO3b9n7S6FV+1/5gfX2+p4Uon6NGWkfP0tR4+eVIJO16DA2f5RuLbMmyHZCfwZOwYnCig2sG2s/mfh0ns8BLsaDMDN0GnAUd7md/Uf+3z3A9j/bKpIRHI= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB9PR08MB6957.eurprd08.prod.outlook.com (2603:10a6:10:2bc::10) by AM0PR08MB5297.eurprd08.prod.outlook.com (2603:10a6:208:18a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 15:53:35 +0000 Received: from DB9PR08MB6957.eurprd08.prod.outlook.com ([fe80::fa23:b315:7321:3fe4]) by DB9PR08MB6957.eurprd08.prod.outlook.com ([fe80::fa23:b315:7321:3fe4%3]) with mapi id 15.20.7202.035; Tue, 23 Jan 2024 15:53:35 +0000 Message-ID: Date: Tue, 23 Jan 2024 15:53:33 +0000 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gcc-patches@gcc.gnu.org" , Richard Earnshaw , Kyrylo Tkachov From: Richard Ball Subject: [PATCH] arm: Fix missing bti instruction for virtual thunks X-ClientProxiedBy: LO4P265CA0263.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37c::12) To DB9PR08MB6957.eurprd08.prod.outlook.com (2603:10a6:10:2bc::10) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR08MB6957:EE_|AM0PR08MB5297:EE_|DU2PEPF0001E9C5:EE_|AS2PR08MB10227:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c958cea-b009-416e-08ec-08dc1c2b7a37 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: gHbZ/iZXKhZ50wYyz6fJu78GYsQtpTmFTf4802UmeMnzyCCUO6kFxqnvAZ9h3LGwOkGyyj3HjlGabC0kYRYzZMaRTkm8H7Or37SU4NrVLAOvV6A1iya1jXHDpCk2QsIwKJZmHCi72Neaj2lMKZ98z+dUVhKvufmyIjK/0gjdTQ2EUhSBmYd2uVibZlXxEh9b+mVafa4yJ+or2djjI6yrg1xC8FakoKL7OZmE17rTCbe+7+Eze9D2s0GE8d3FJ2CnUWpODXLzxEb+ZLGuTo9FArlEjPv15EpikPRbkDQZYDTb5Zz8uIKomqLGzqxMntVqrfjZLh3niQnjnVOSq6MeGlvcTgtRKdXfI189/89vkr/0jLjwaYmo7maf4U75NiNMC9LZvffkJnaWVZYoBy2n0MX1CmTpn/L4VVBgImWPNsTCbIeBTjJ4wqxbg08H1XVzWmOtDdKB9VDHXuT9sCwdNJAGYdQfKukVmGvvQwXyM8K/LNOetNywz2cRcLrzcIazuW0zG/+hC2m65vg/JIOpPx89CVl9DpYafkCKgiy1lNzvbv512FNBC8J2iphYnoWvj2fEKkWKYWy8bOomggPzu+F0iOTdEmGlpC/bvS00vEfRCFHc1/COypD9gdJpbYqTAmnmMS/1D5L1FbX5stDm/A== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR08MB6957.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(346002)(136003)(376002)(366004)(396003)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(44832011)(8676002)(8936002)(31696002)(38100700002)(86362001)(41300700001)(2906002)(36756003)(564344004)(5660300002)(235185007)(66946007)(66476007)(110136005)(66556008)(316002)(2616005)(31686004)(6636002)(6506007)(6512007)(33964004)(6486002)(478600001)(26005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5297 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: DU2PEPF0001E9C5.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 656e92df-5461-4c13-984a-08dc1c2b74e7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mrq2A3YYwcXh6ZWsezWJSMlFRAm8M6tipj+BIfBI/I/GQAuhznYawCv8O29syipmWIqfkAzv4a4pEYCww6/xkncZSG/H+IzgcD2BjEJY2gzn8qaVUKeCHasPPRHJ8jpiLw94ngNXBG85362dy8sNuiPI25nuYPvhgljazDbTmlhh/CV9ZXY3gT5XwxqLtvM76R76lnrWDmUyyEJVnu1Axj06Dnf2FNgdT83eexcWNSXRA0+Jt9nvzU7bHCAY4VYHzU/obVb6KOl6tlOGdjtcXS6gq/JUS0cSWa4evqJBvTyxiUf2wk+NL4itzFbxdlGX8E0iP6VgLyrOxswv2pAGwaMr7tEsLocKFSJ5uKZO7sB0OyCMQAacUE1dTueRGuUgDqgK7hK3N86RQB6hDg+YrO7Ckz+n7J4/xzsI8B2Hi+9lLpeaNfDkwkUt//JQQelF+hULKpjE2GjfmZtKsPWF2x4Utds3yuDdC8OdU2hhmAlyhnRhuN9ve+CX05Cw7BnCLYh8Ow/+JnIFqXUa09METI4tlXbaWayKMs7Ca3Tu/3oRlboD21mS4Vw9KOt8rKCm0AD00gKHA/S40BcdyfdRtMKN4gLr2A9775a7s2WhZ1fvKSEb5T8JbQp9kCyDk5Eim3D86h/6lCeX/krWW1t4tgI1Go6OPWZtqc1JOQY0aU/XtAhP3ByLywPoEPN0WXGhQ3UB/M1VsjQWwjwraVSN0bZltnUV14qZbfcA17lc5+5hu37xJ9BwlpQeTO6CS34qS5MAzQARAIS28kA+v+ZFMA== 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)(376002)(346002)(396003)(39860400002)(136003)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(82310400011)(36840700001)(40470700004)(46966006)(6486002)(31686004)(47076005)(70586007)(70206006)(36860700001)(478600001)(40460700003)(40480700001)(110136005)(6636002)(8936002)(44832011)(8676002)(316002)(5660300002)(36756003)(86362001)(356005)(31696002)(82740400003)(81166007)(26005)(336012)(2616005)(235185007)(564344004)(41300700001)(2906002)(6512007)(6506007)(33964004)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 15:53:43.9210 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c958cea-b009-416e-08ec-08dc1c2b7a37 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: DU2PEPF0001E9C5.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB10227 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, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788897163792631929 X-GMAIL-MSGID: 1788897163792631929 Adds missing bti instruction at the beginning of a virtual thunk, when bti is enabled. gcc/ChangeLog: * config/arm/arm.cc (arm_output_mi_thunk): Emit insn for bti_c when bti is enabled. gcc/testsuite/ChangeLog: * g++.target/arm/bti_thunk.C: New test. diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index e5a944486d7bd583627b0e22dfe8f95862e975bb..91eee8be7c1a59118fbf443557561fb3e0689d61 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -29257,6 +29257,8 @@ arm_output_mi_thunk (FILE *file, tree thunk, HOST_WIDE_INT delta, const char *fnname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (thunk)); assemble_start_function (thunk, fnname); + if (aarch_bti_enabled ()) + emit_insn (aarch_gen_bti_c()); if (TARGET_32BIT) arm32_output_mi_thunk (file, thunk, delta, vcall_offset, function); else diff --git a/gcc/testsuite/g++.target/arm/bti_thunk.C b/gcc/testsuite/g++.target/arm/bti_thunk.C new file mode 100644 index 0000000000000000000000000000000000000000..5c4a8e5a8d74581eca2b877c000a5b34ddca0e9b --- /dev/null +++ b/gcc/testsuite/g++.target/arm/bti_thunk.C @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-march=armv8.1-m.main+pacbti -O1 -mbranch-protection=bti --save-temps" } */ + +#include + +struct C18 { + virtual void f7(); +}; + +struct C19 : virtual C18 { + virtual void f7(); +}; + +void C19::f7() { + printf("foo\n"); +} + +/* { dg-final { scan-assembler-times "\tbti" 2 } } */ \ No newline at end of file