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 65CAC38515FB for ; Thu, 20 Oct 2022 14:47:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65CAC38515FB 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-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=OTEKntF/A/lf7rMzibYvErT8VIL/gY3H7LNbKk6TvkQFalHbeDDLgsQwA+oVXOo9/QNeKyDA/4U4vQt5z7ZzhYznz9oEnPyKKpGVMsL/c0WB1KD+KXAICP0si785gmBLix3LX1m7Au3BQE36Hs1re6/3FOvMH00BawgUYx7eegaTtl2mbekcFvGPTPptTECTBvFRkjXLPZuRq+dJTOaO83T3QeZDOBbYDWnRQkddAV175X8RKEmLOiKhxbK4nMrSRW6HQPlG4DInUWtHzxiutsVbwZN6wJXE2jXvbK53pOiQvfrhIt6JaYrcdHhnNEqfQBQh6fM0Csqw/yvacgTh5g== 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=oOwCbthCur75tUgRVb+N3v/iV1A3XDagAmsYF/JX8hM=; b=EZRLK9Ho1l5cOz6YuprS31hNuGxx5KQb0Oo3IKWmlqbCramrf9sj846v2UVdKOycdNfRN7TlvsmylKQptfB0++GlXS7ftyHmYmVNLze5SDcPdbMrHG7TVAZZBH4y+i/Ggl9lKYmtznr+L4fQHDUS+IH7yuH/1lD2kNKNfesE2G+DFoOev7NBITvvBhLtUDWOSDHC4HaOittQnBN01PS0LKmU5Bx+CYz86A7RDhEPHEaFhHP06+CIw1F8nytZED7QwBAJYLzk6WDRFGNBwj7pivlO1gPI2qqK3/5ZCN/5OAsbR20IU7ytPfEXEHibc4Axa8oO1u80NdT4B9Oee55Heg== 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=oOwCbthCur75tUgRVb+N3v/iV1A3XDagAmsYF/JX8hM=; b=uN8A8NnIsVvvw0r0PlLiQ0chTOf5oI/miJZ95HvZ038TEs+nmkXDeuB+VIHZ88oluC4E7kMwT7E0qmVUtVXaDfSjoOstpBmoHOpRsyH/jeSKVOQaxyTtW/MeiR81aMCQUT1Bx+EOcIR80J4frhRWnrjU12DMNo6P3XDoA6KXOd0= Received: from AM6P191CA0096.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::37) by DB9PR08MB6394.eurprd08.prod.outlook.com (2603:10a6:10:25b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35; Thu, 20 Oct 2022 14:47:42 +0000 Received: from AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8a:cafe::1e) by AM6P191CA0096.outlook.office365.com (2603:10a6:209:8a::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35 via Frontend Transport; Thu, 20 Oct 2022 14:47:42 +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 AM7EUR03FT005.mail.protection.outlook.com (100.127.140.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20 via Frontend Transport; Thu, 20 Oct 2022 14:47:42 +0000 Received: ("Tessian outbound b4aebcc5bc64:v130"); Thu, 20 Oct 2022 14:47:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 524194cfe0328b4c X-CR-MTA-TID: 64aa7808 Received: from 25a74461fc7e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4AE767D7-52E8-41E7-854B-E974BA172100.1; Thu, 20 Oct 2022 14:47:31 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 25a74461fc7e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 20 Oct 2022 14:47:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fQaZ8CyCU4MokzgWOVMvMDRbeLUUqI3D+8t8/aHX7PbhzAB8FkOkyHnIrzj9PQYB3vMcDphv4RU/EtUkqKS0VqwgdwFWzUyH5Ea+Edl0r8d/uW1VB7IR8f24qePD6vX0kemAI0+QDGu2MzRGbUMAmX9aR162figF+taf4DgnkeFw4qfkWA2CZdx1LuvxnyeebGmMV/KVK2b45UmO6hYPYvzwHoaSCKlbJIH+pBaqn8Fn2+S8Fy5WzFTMVc0obTeXbXF/krb5QjYNR9/9DmtwvPiHRk0O3nWsJHKHJH6YDesVWT7JjLp9mewom79hT4j/BglB62yU6n9vqM+env0rGw== 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=oOwCbthCur75tUgRVb+N3v/iV1A3XDagAmsYF/JX8hM=; b=jar9eTHnnIPCLaoVHCcU/N1O/iZdwCnRg5T6XYCrUEOsw1Q4RyTTsJEIncM51V5k4JQQE70KvPixS/1SkiqvMqVpUqz6/0JVQDfbz5OA4tLD2EW2BzemTdvDj3z2rWfz7AI9FzVT/546JMTQor0/SGLuruPV7Em1hPZ8MMJ7PSkV5h15j62Zub8blsquklq7+A6JRoCPCZjT3EXwhXaSLUpzd7LeCkg38E2mbXddHdAzE9llGv9LHGm1sIzLdx7KlhCXgXn4kdxRsLtVgd/tpmstd7r8svc29lhfZ31uvGNL7PQ60ArNkPPruOZPNPgzWvI4w84uW7u4rh7ivD6X9A== 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=oOwCbthCur75tUgRVb+N3v/iV1A3XDagAmsYF/JX8hM=; b=uN8A8NnIsVvvw0r0PlLiQ0chTOf5oI/miJZ95HvZ038TEs+nmkXDeuB+VIHZ88oluC4E7kMwT7E0qmVUtVXaDfSjoOstpBmoHOpRsyH/jeSKVOQaxyTtW/MeiR81aMCQUT1Bx+EOcIR80J4frhRWnrjU12DMNo6P3XDoA6KXOd0= Received: from PAXPR08MB6926.eurprd08.prod.outlook.com (2603:10a6:102:138::24) by AS8PR08MB6630.eurprd08.prod.outlook.com (2603:10a6:20b:337::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Thu, 20 Oct 2022 14:47:23 +0000 Received: from PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::c5b2:df77:49dc:608c]) by PAXPR08MB6926.eurprd08.prod.outlook.com ([fe80::c5b2:df77:49dc:608c%7]) with mapi id 15.20.5723.034; Thu, 20 Oct 2022 14:47:22 +0000 From: Kyrylo Tkachov To: Andrea Corallo , Andrea Corallo via Gcc-patches CC: Richard Earnshaw , nd Subject: RE: [PATCH 7/15] arm: Emit build attributes for PACBTI target feature Thread-Topic: [PATCH 7/15] arm: Emit build attributes for PACBTI target feature Thread-Index: AQHYrmEitCYcKbauAEGs8J+vJNopPq4XyG8A Date: Thu, 20 Oct 2022 14:47:22 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAXPR08MB6926:EE_|AS8PR08MB6630:EE_|AM7EUR03FT005:EE_|DB9PR08MB6394:EE_ X-MS-Office365-Filtering-Correlation-Id: 462338ea-9488-4c4a-0f16-08dab2aa0b01 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: jUsgGj62ka7A5MuUV+/wncanjo2ifXO2cY1cYnuEmE9TgrQ943WnYH6IJygvIoHhNUHDPCGRLkfYyOpfUa/wwXIwZBPYwgysMeFVbXgdmyoDuH8+jkdNRsl4NXHTNVdIV/KKHcqA5tKdPYWaAL/4nZV1fXJUyMhwh/VWzyU4eCxb8awvBTUUow6tpVA/X1z39uKJNosqqD4W9rNqKBInkG0FDiVT7H2lNaiOQog8sugIw5lRVLdDAEFGHcLkpSTbHgP1ctYa3MlkDTdwwmrhvEMd/z2Pp95MCqmRvAL0ic1OOupxhC/ldb+8B3W3jqV3CfG9jTAoRuEesu8sZK/CYdhkxewCrzKUEYe/jFhone8SjNUDF1AOY/DQJIJUnMKiiPAy3u3BUTnaCeuqlhsumcTxWn459EKozcc2hFTLZkeVkkKHkjw+QJn+W/sQcuprlKIurGszPxHla/6GYwOmOiLi/cUoTT4jWIz5sIXv/K0dqQTsMhK/Axb3/3Bvn2tzeKvqQvOKFL6BOSg0GKUfr8CFt/NSn2Fl/dGEXZ5PeKg+G/eDHIXMD6zg33+iwTW9yM7TPO3dmuRlCKv7jrHx16uwQF9gDQ+DbGPHr4v9s7NFcs8qXwKLDiRSSeM7ariOyZ0/jFwuRIWNcBNAJyxP5pRaawHytt/7O2V5dS5Ta4ovXmqZD6uFB4of0yWVzptFaXuESZkxcw1I22b0Jp1wlSV3BrNxTrZaWAwwZsr8SQdo/XLtgkAI2azUsZ7cUjEBcLeEakvRlkRAH+HG4DKrW1xGxpRoYguVNUy0l7I7wTJoY3C++hktBY7vC1bkzwnvN8ei/OGpX41fouZVSFQJBQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6926.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(136003)(346002)(39860400002)(396003)(376002)(451199015)(54906003)(84970400001)(33656002)(86362001)(2906002)(26005)(186003)(122000001)(38100700002)(478600001)(71200400001)(41300700001)(38070700005)(83380400001)(5660300002)(110136005)(316002)(6506007)(7696005)(66556008)(66946007)(66476007)(53546011)(9686003)(76116006)(66446008)(8936002)(55016003)(4326008)(52536014)(64756008)(8676002);DIR:OUT;SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6630 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: AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 81bc866b-2efe-4e77-711d-08dab2a9fef2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GD2HtLmLxTuUK0rDrL/ry6HRET6f58P6vqM+rTbiMtn28/zeZuA/mqp2Gklo+8VQwRMtZIePiFG6d8fa7Kop7iudsR0BJneS+kzwrcwXTefMQhspEAY0zIwu/VolaLFATb4K05PReFIT9uWMSBaCYv2F+ZAj++gHqmMwoChZ5eV8NARZ/maK7nNIY3qCFmCdhJXsFAdz6wt0LYVjYogDhKD6Vz/tkJye5P2WmA34F0hePiqm5T6XUMNYYcYBFMEZAScWAYyoXg3MJlSl8GMpqHnkUE2wxbJQNIB1uxK5rGk0wmIdW4Jaxv22OvPIikVz1ZCCV4aCfggZIkuySnSODhZMUmMgwIRlm4VPthYRJFPmr2hC4l92Izc3RyepJM1L9Ost9i72QHMbtv5UtKrlQqpPk1NJlzuwdnPITb3lNp4r3j1DrdAfU6Ag8RNovpMJ7ErLjeHNuSWDQboonOmQ75aiI1rST0obYXy6oPzcUv5XA6tCEQq/Gt5AmHM5ZJNI8xYI777dcu4G6SgC5rIomizdbTAX/Uv2L+ePn8St2RTjJnRCqjnfT0hu5tbKFh4Q/LXiVRpWSoiOCv7y2uDqfxVD/yxCZrnMjmrUeNoAQuyd9DtOnQ6JfijcP59fbiT9K5hqAOAZT9rAgXOvo7rQSLhFAlsNIRAZVw2WlGQ9kU4I324ABue3ZTPP6CyQtOB/GMPFvBZo2lCYBLFoBOAileFJmVYx5+DgddjU4rdo8SuhK2k5ALO3QBscLhCAZ+3vYPLTf0CQcIzyV9Y569poCJ1ROCsJRA+Lp5jn2G9NVoLgB9CCKzK0REwFsR/p4SY4WkoordVyeWNx3boDPMQkUg== 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:(13230022)(4636009)(346002)(136003)(396003)(376002)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(84970400001)(82740400003)(86362001)(81166007)(356005)(186003)(82310400005)(36860700001)(33656002)(2906002)(316002)(83380400001)(54906003)(40480700001)(40460700003)(47076005)(336012)(70586007)(7696005)(6506007)(26005)(70206006)(9686003)(53546011)(52536014)(55016003)(478600001)(8936002)(110136005)(8676002)(4326008)(41300700001)(5660300002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 14:47:42.4524 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 462338ea-9488-4c4a-0f16-08dab2aa0b01 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: AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6394 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,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: Hi Andrea, > -----Original Message----- > From: Gcc-patches bounces+kyrylo.tkachov=3Darm.com@gcc.gnu.org> On Behalf Of Andrea > Corallo via Gcc-patches > Sent: Friday, August 12, 2022 4:31 PM > To: Andrea Corallo via Gcc-patches > Cc: Richard Earnshaw ; nd > Subject: [PATCH 7/15] arm: Emit build attributes for PACBTI target featur= e >=20 > This patch emits assembler directives for PACBTI build attributes as > defined by the > ABI. >=20 > aa/releases/download/2021Q1/addenda32.pdf> >=20 > gcc/ChangeLog: >=20 > * config/arm/arm.c (arm_file_start): Emit EABI attributes for > Tag_PAC_extension, Tag_BTI_extension, TAG_BTI_use, > TAG_PACRET_use. >=20 > gcc/testsuite/ChangeLog: >=20 > * gcc.target/arm/acle/pacbti-m-predef-1.c: New test. > * gcc.target/arm/acle/pacbti-m-predef-3: Likewise. > * gcc.target/arm/acle/pacbti-m-predef-6.c: Likewise. > * gcc.target/arm/acle/pacbti-m-predef-7.c: Likewise. >=20 > Co-Authored-By: Tejas Belagod diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 0068817b0f2..ceec14f84b6 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -28349,6 +28349,8 @@ static void arm_file_start (void) { int val; + bool pac =3D (aarch_ra_sign_scope !=3D AARCH_FUNCTION_NONE); + bool bti =3D (aarch_enable_bti =3D=3D 1); =20 arm_print_asm_arch_directives (asm_out_file, TREE_TARGET_OPTION (target_option_default_node)); @@ -28419,6 +28421,22 @@ arm_file_start (void) arm_emit_eabi_attribute ("Tag_ABI_FP_16bit_format", 38, (int) arm_fp16_format); =20 + if (TARGET_HAVE_PACBTI) + { + arm_emit_eabi_attribute ("Tag_PAC_extension", 50, 2); + arm_emit_eabi_attribute ("Tag_BTI_extension", 52, 2); + } + else if (pac || bti) + { + arm_emit_eabi_attribute ("Tag_PAC_extension", 50, 1); + arm_emit_eabi_attribute ("Tag_BTI_extension", 52, 1); + } This hunk will set both Tag_PAC_extension and Tag_BTI_extension if only one= of pac or bti is on. Is that intended? Would it makes sense to instead set the two Tag_*_extension tags individual= ly as in the hunk below? + + if (bti) + arm_emit_eabi_attribute ("TAG_BTI_use", 74, 1); + if (pac) + arm_emit_eabi_attribute ("TAG_PACRET_use", 76, 1); + if (arm_lang_output_object_attributes_hook) arm_lang_output_object_attributes_hook(); } Thanks, Kyrill