From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2061.outbound.protection.outlook.com [40.107.21.61]) by sourceware.org (Postfix) with ESMTPS id 38A9D3854162 for ; Tue, 5 Jul 2022 13:58:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38A9D3854162 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=OfljRGEibeTvGx2qi4ozOLopTDjk8TxV38L+bEUVGQ1YRr8bbhY6TwkYOK3NsWkDhJEFA6WAOsSQ//Ut3axFCfH/A/t+mYdvOOUdBbQm7XsP9YeaYR0YaPRrrHpBGQL65CkadJY1efBY+nGGWGV5XcdYSXlk0rLnYEgeuisjcPAddO2kx1aSSZiiEGZvhTdaKEXtWdPv+Tf9wwFfdESs75dw4mn1ZPbGt/ZLBPuBffL++Y4Rf02M2AyNsDmFOe3bEZDHfcl5VRAOyIGvuEC4lAnqe2Is/oN7nfCXx9zIqS4UiXITbFD8DKxFeh0KJev3zIJgbwvhMU4dD2hf3xh2QA== 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=zYNjZi6T0WrdtQLthG0Fu0duBZjol2ioWneGYtcrFlE=; b=R1106P9NWGN7cQ4khV2BxXqfK/wQ0aO0Qstd+bsRUYuEl6Qy0XEesKx4rIoyikZgwRPwgl00QWGV3WQtFJYafPh1vzYFa3dQvKHsXeR8P5koZCg9p21zE45H1Fd9Vv2m+XzPRS/4keMcIg+HtMDlyTu9hqdTJDcTCnCYVCKBo/0dLEECI944QWIkOXo5pCRGR/nK+jy5relmmPOx1WEDfGFY+d9ibMcp25j+gPh2uLsS1ndJsHFicDQfHLQz8dSxEwPHYhk6OoVZVcjpEuWGgSsyHjitKy35CFWrYu1OKSE6SFJJmnFgq06Tmdbdjn5DJWcUdeWSdl63hjHBHC/DfA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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=zYNjZi6T0WrdtQLthG0Fu0duBZjol2ioWneGYtcrFlE=; b=JvO2JqZhbwSHZIjAUK6UMJO6vqBMKbYZtiIwg2RX1rYghI1ISzBTwL04VDwdXW8+MfVJy+3xCpbBAbR4dzvtIeWYLbAH+X2dc36U+KQbTObWEP+7/xiNF8BiW6FIrgvDlkjthvSt/0Y4fEvQwRfUIx5T6pLHnxqpTY75kymf8Jc= Received: from AS9PR06CA0121.eurprd06.prod.outlook.com (2603:10a6:20b:467::12) by DB6PR0801MB1719.eurprd08.prod.outlook.com (2603:10a6:4:3a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.18; Tue, 5 Jul 2022 13:58:46 +0000 Received: from VE1EUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:467:cafe::99) by AS9PR06CA0121.outlook.office365.com (2603:10a6:20b:467::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15 via Frontend Transport; Tue, 5 Jul 2022 13:58: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 VE1EUR03FT044.mail.protection.outlook.com (10.152.19.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Tue, 5 Jul 2022 13:58:45 +0000 Received: ("Tessian outbound 879f4da7a6e9:v121"); Tue, 05 Jul 2022 13:58:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: dbe62129224adbbe X-CR-MTA-TID: 64aa7808 Received: from 63d93ac2f053.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 65D4D237-4CEE-4CA6-93B0-B196483771B3.1; Tue, 05 Jul 2022 13:58:39 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 63d93ac2f053.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 Jul 2022 13:58:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PdtqMkmyU87SnKCu+G+/k1UbqWAl+daYbEPe8JWwn7ZnDo9oujgBjZ0RxWMHUtRRsrzHfXoMg0NHB7VV8/6lfNXxzx3xYbUwpWjPoRWcMQyVi/g+NPCws9hvZFiGfOn0wOinHcjnYv3/6JWteb2dEPuR5cw/FpbU9PXgCdHeuwwq/E0vf3J/dm3TtEcCKiCu7GRFb9vSIH02bXJQiZviihADQvynq7hlXBU/c6F+/51awhHfyiuSksqlcvK/QrJ53Mk2/afNv6GFltu3juLUuzaCzhc6aW3GGMEKhvjI5gPNzj+GBuFatK42Yg7s6cuML7eQWsjWpo3I4boDINp09g== 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=zYNjZi6T0WrdtQLthG0Fu0duBZjol2ioWneGYtcrFlE=; b=WISlxPj9o/ReBMz6jB002ZaciCPI9TL0523tkH6FflpmjloeSlKgRKD99A0ZcNcFUiqTkqPNuONk2ZgUAfQy9O+LGLPcWYO/EIUXhjVsNSnz2gj6j9H6MVI5DsFTRTLtV88l7qmS6mYS22Bty7Mh0jjqM+gIX9YyHs6Y4fgY9pVGDO4Tpx0t7Gna7UlfcjWRV1Req9iwq/HQzdlEgh75RdYybvqpExhNBnq6KFl+peEu4GpxRNmmmoggFmbvbnNe0ec+VBsQmBFPknTZcIehZcyLKQJkILBPFPw2bOl819pfs9EZdfPIk6CRDbNLzTaZzrHmGbYkjaUOtjbCQc/4fQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.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 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=zYNjZi6T0WrdtQLthG0Fu0duBZjol2ioWneGYtcrFlE=; b=JvO2JqZhbwSHZIjAUK6UMJO6vqBMKbYZtiIwg2RX1rYghI1ISzBTwL04VDwdXW8+MfVJy+3xCpbBAbR4dzvtIeWYLbAH+X2dc36U+KQbTObWEP+7/xiNF8BiW6FIrgvDlkjthvSt/0Y4fEvQwRfUIx5T6pLHnxqpTY75kymf8Jc= Received: from AM5PR0601CA0032.eurprd06.prod.outlook.com (2603:10a6:203:68::18) by VI1PR08MB4558.eurprd08.prod.outlook.com (2603:10a6:803:ff::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.17; Tue, 5 Jul 2022 13:58:37 +0000 Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:68:cafe::54) by AM5PR0601CA0032.outlook.office365.com (2603:10a6:203:68::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Tue, 5 Jul 2022 13:58:36 +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 VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5395.14 via Frontend Transport; Tue, 5 Jul 2022 13:58:36 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2507.9; Tue, 5 Jul 2022 13:58:24 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.9; Tue, 5 Jul 2022 13:58:23 +0000 Received: from e125768.cambridge.arm.com (10.2.78.50) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.9 via Frontend Transport; Tue, 5 Jul 2022 13:58:24 +0000 From: Victor Do Nascimento To: Subject: [PATCH 1/8] newlib: libc: define M-profile PACBTI-enablement macros Date: Tue, 5 Jul 2022 14:58:11 +0100 Message-ID: <20220705135818.50088-2-victor.donascimento@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220705135818.50088-1-victor.donascimento@arm.com> References: <20220705135818.50088-1-victor.donascimento@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 4cf573fb-380b-4f60-84f1-08da5e8e7a8e X-MS-TrafficTypeDiagnostic: VI1PR08MB4558:EE_|VE1EUR03FT044:EE_|DB6PR0801MB1719: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: YBQ0LGRgv4QO+ko2c0wpa5TCgKrWW8jOMBSvTapf8YlzQ9y/IKpW2gjkXf6y5ezvyhKFW35j9K5Gohi1isSliJqPLz2lb2kOzhAeE90x5ionfNG34SuCoL10D60qBcav6rD1OaT+hp1YpEwJDZuCL1gMHEfUdULjjvAo/J8W3tSGUHK3sPa4fNg74NzeY+ljkaB4Hn6B3bNLzLfVZ+xkBQ76knqlWy1KUNeW8EyGBSSpRTDau/CR+DyjN3q10rjHYyTakbwSf4jQXQ+PdPIGR5AAzIXAdwFpyTWPAMRY9j+ZTzdb2N8eooUL34CXkyE7l/efTHL95gjEsqSgyrym5vD0PQ3M07XIIKJhUteKnHoCj9rqgpDAjqne3b+sZoCCTCeoo4Hvc/nIK2TuRYnOI25er3Mz0NHsej20w+oitTisM09Ul2lnuRCDyX4t2XjBge1Ov8B2EQ4C0FMAFnVWSzlzjWyoKwNZ3oAS2jhqvk5N9syBc6UglitfbSjqvFYhcKWEjHUykbViQDudIemMN+j57eodjLwPyQ3f/nSbkZyP7p94GiDgTJrqEC0QZ0fh9JP4FpUGgNSNIPGjLNp4hM2EjaJnCwEejYtrtol+UFNTZ3qYTEV6Y9YZaQ+9yC6AmKlgW2NwHruLYrUCS9ICoauTsBq8RfgAw1OE9S6UsyKL6wazmtoRw0TV1oo/l2fzfT6L9ECQh49NaMl7oLlp2FpeHxUJK7tNG/89DhqrQx0LHHvQZ5SqyQZItvWNmJ3XiYCqS8sOraPtdQh+Uuk4t4mKYK4WOfT2KjSGumBhBz3cZ4XhlmKd+OAFocDMlbG7eIaCn16anwezNl+kVkgrJu0B4gfxUY3qDvYNW7nMlKc= 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)(346002)(136003)(39860400002)(376002)(396003)(46966006)(36840700001)(40470700004)(7696005)(26005)(316002)(1076003)(2616005)(40480700001)(478600001)(82310400005)(6916009)(6666004)(41300700001)(86362001)(81166007)(356005)(82740400003)(36860700001)(40460700003)(83380400001)(186003)(47076005)(426003)(336012)(2906002)(8936002)(8676002)(5660300002)(4326008)(36756003)(70206006)(70586007)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4558 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 01e65660-2c9b-42f4-544b-08da5e8e74c3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a4JHF14YBcqCC7ptx2Fe510sjM0K1644bicVFTRstTrSGJY20WgzOso7hrcItVY6jlVXIMBtkdW08x/zo3EesOxH9iGedEOT8uXGqJe4QsQmESDPIt2o3YmLS2UmGOJN8qSDtZsZoFzb3etl6YGWlm/942GjTW6P9B7rk79+Oz/5v9fs0aRsxig5sZSXChG818z28XgT821X/gSmijDuqPgoCe57nQZV6SuHTP22glkjYkNFbGaFcrJ6nXvO7ccZ0t1XojGkVZpICIK4Siddg/z7Cwj5M0e1KqLWi79yUP0qWX9pW1HT6/hlEsL2Mq4x4FMo75t8AE9zx96jBpIgGvuo01eKU10KQIaurQTkGCUcos3X9S6nw6tBwBSsOs/qmLGOdwR9RAc5xrK6rMBvnUBVkci6mLBeDU18pYDNkhvce77VSfhW0Wk3X5fY+S5zDFIlu3Hp9qd7RTKp6Z6O09KP1fRZlb1P1yd8AQNWv/Mm7v5RKCwRgNfQm8F1xP9gO6ANT8U0bjut9Q0r+14EzTRJ55oxqGM0JQkyQNG2mnsTrYUhcSapyq8/dDhmAeH/U6E8RLpKRZbRWJBd7qL7q00j8Ulum+HKVfdlnZLQ7CULashUogUI1a6W7SZNm193WrtvJApVEDz/uaoclYVh6UpoHG2X4cu7q750/1tgWmWNmdxhScvfaRn2pknqcJo2DuJSZPvugZIlk/SVW4T62JrfIYl+8pbrBSYNGsRdwXHaJKQUFCIhX2Uu27mM0miIhLj5euZSpXS2EuPLWqDQVyKRBoFF7iLpNHPYc9X8+YMq8re5yHcHrYAQ7m6EMKG2 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)(136003)(376002)(396003)(39860400002)(346002)(46966006)(36840700001)(40470700004)(47076005)(1076003)(82310400005)(81166007)(6916009)(316002)(426003)(336012)(186003)(2616005)(36756003)(4326008)(8676002)(41300700001)(86362001)(70586007)(70206006)(36860700001)(8936002)(5660300002)(83380400001)(26005)(40460700003)(478600001)(7696005)(6666004)(2906002)(82740400003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2022 13:58:45.9779 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4cf573fb-380b-4f60-84f1-08da5e8e7a8e 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: VE1EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1719 X-Spam-Status: No, score=-13.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: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2022 13:58:51 -0000 Create an assembly header file that conditionally defines fuction prologues/epilogues depending on the compile-time mbranch-protection argument values. * newlib/libc/machine/arm/pacbti.h: New. --- newlib/libc/machine/arm/pacbti.h | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 newlib/libc/machine/arm/pacbti.h diff --git a/newlib/libc/machine/arm/pacbti.h b/newlib/libc/machine/arm/pacbti.h new file mode 100644 index 000000000..9921af7bf --- /dev/null +++ b/newlib/libc/machine/arm/pacbti.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2022 Arm Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the company may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Macro to handle function entry depending on branch-protection + schemes */ + .macro pacbti_prologue + +#if __ARM_FEATURE_PAC_DEFAULT +#if __ARM_FEATURE_BTI_DEFAULT + pacbti ip, lr, sp +#else + pac ip, lr, sp +#endif /* __ARM_FEATURE_BTI_DEFAULT */ + str ip, [sp, #-4]! + .save {ra_auth_code} + .cfi_def_cfa_offset 4 + .cfi_offset 143, -4 +#elif __ARM_FEATURE_BTI_DEFAULT + bti +#endif /* __ARM_FEATURE_PAC_DEFAULT */ + .endm + +/* Macro to handle different branch exchange cases depending on + branch-protection schemes */ + .macro pacbti_epilogue +#if __ARM_FEATURE_PAC_DEFAULT + ldr ip, [sp], #4 + .cfi_restore 143 + .cfi_def_cfa_offset 0 + aut ip, lr, sp +#endif /* __ARM_FEATURE_PAC_DEFAULT */ + bx lr + .endm -- 2.36.1