From patchwork Tue Aug 22 10:38:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1824092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=QhPCmvHQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RVQrb4W7kz1ydn for ; Tue, 22 Aug 2023 20:41:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8ED313896C3F for ; Tue, 22 Aug 2023 10:41:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8ED313896C3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692700909; bh=jDtiBr2sA5GEojMzFYKMPhb01rKgiTCsTZ5QcJ5EjwY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QhPCmvHQ5ZqA1KnculQ03lAUtv4K8Rvj87AqdGTXIJ1hCIg53ixor0K+Xra2sr5Hx +4ZEmAlfgAa3zkAU4TPGI/aZL2k2xfW4sima7Mu44TOp4QP8YDZENompJWCS8q/R92 y62nxCF+PilZW6Sp5jK8bc7/zvEZqOCaYdhBdgVc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59]) by sourceware.org (Postfix) with ESMTPS id AF88B3831392 for ; Tue, 22 Aug 2023 10:38:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF88B3831392 Received: from DUZP191CA0006.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::16) by AM9PR08MB5891.eurprd08.prod.outlook.com (2603:10a6:20b:2da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Tue, 22 Aug 2023 10:38:54 +0000 Received: from DBAEUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4f9:cafe::62) by DUZP191CA0006.outlook.office365.com (2603:10a6:10:4f9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.20 via Frontend Transport; Tue, 22 Aug 2023 10:38:54 +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 DBAEUR03FT044.mail.protection.outlook.com (100.127.142.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6723.15 via Frontend Transport; Tue, 22 Aug 2023 10:38:54 +0000 Received: ("Tessian outbound 1eb4e931b055:v175"); Tue, 22 Aug 2023 10:38:54 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9b3f54f8374f393c X-CR-MTA-TID: 64aa7808 Received: from df950d397c33.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3BDEEC6E-E04F-4CCF-B806-E2E0F7294554.1; Tue, 22 Aug 2023 10:38:47 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id df950d397c33.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 22 Aug 2023 10:38:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OGbYajZuarywPkkwZar9M7DolSC3sqIWOcHsfa2CO8LVKFPGJ72qxrN4i70BPEc56P0CPKn2JAzAA4TNoZxPNqfhFG3wIKhzfXdLFOA2TBkLRvX9xAT7oQ9k4fAyEwFl6VdIy0x++2wPpWa2LJPfO72s8fpsqtoY5ZZIlCgp0xmmnXQyxxN9W4buET1rH3Lj7IYMPjxxLmDh21Pdp9XPCtZLnMYZsE6t8qyV8HlCi8niyOmmKEjjvN5JEceD8XMZjfgBxk78fgGUNeFB/3PY8jtuvQXtSkExmX2bq/HENfiFAMoN+BWBHprpMFP3DDS5pPkMTwtzkiUDEXJ8jIO0SA== 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=jDtiBr2sA5GEojMzFYKMPhb01rKgiTCsTZ5QcJ5EjwY=; b=jrKnatGDQQQ0rHAYuP5Hnc3Zsh+f0WpCH43kBMhG2OGf9E2nwoxC6HJbq1VfkMfcJxYwdeIRpVtVbtt1n8tBiafHh/GD4Boak6Jolid2owhUQlTSLxuDAVykWYiEcME5XyouinaQNCwRq8H70CTF8UN4lC/mwaeR3I9uqxIG4F4kHSPAWx77Lsh6XZKd3UXK3jCVLbNZje+gkOWHBVqzatQt6IJAxFrG78lNZ5hYC4RYBlJYFcJgDdy/MvmJrFTOK11ehrUqmFpYw/LJsmucP/xWwQS5OhYtOWOHnMDN13Sa9tvzY6m48z/88MPTEPuK8m0RLRAXojhOO6CTrTD6pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.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 Received: from AS9PR05CA0352.eurprd05.prod.outlook.com (2603:10a6:20b:490::29) by DB3PR08MB9010.eurprd08.prod.outlook.com (2603:10a6:10:42b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Tue, 22 Aug 2023 10:38:44 +0000 Received: from AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:490:cafe::df) by AS9PR05CA0352.outlook.office365.com (2603:10a6:20b:490::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.20 via Frontend Transport; Tue, 22 Aug 2023 10:38:44 +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 AM7EUR03FT036.mail.protection.outlook.com (100.127.140.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6723.15 via Frontend Transport; Tue, 22 Aug 2023 10:38:44 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 22 Aug 2023 10:38:43 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.27; Tue, 22 Aug 2023 10:38:42 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Tue, 22 Aug 2023 10:38:42 +0000 To: , , , Subject: [PATCH 05/11] aarch64: Add eh_return compile tests Date: Tue, 22 Aug 2023 11:38:42 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT036:EE_|DB3PR08MB9010:EE_|DBAEUR03FT044:EE_|AM9PR08MB5891:EE_ X-MS-Office365-Filtering-Correlation-Id: 9842075b-b3ef-4b93-3390-08dba2fbfb74 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: 3iTnIc7uzxG8Vak8NyUsFxfd8VzivZ3YfTfYzKgbAUgLWN2plmpigr59STlj+cSCMeEj2m8LomIAXFvh06XrIGGLZnF84YBYriSkVH1aBcruEvgQC3rfzsS2o5mPDJycLcOW4OFcQ6BSuAfE7+OjsfIoqJbftgNGwpsSZ0aUfKMdTXAZurqR2cbrCUHX/ytvyS7CVXfW0jIYUcw34w6Oo1HaZOkXtALbl6CLFqH+UHjAJw29RaU1AEqdIzn1X/YI81IcYizZsmK1wGeUUmHxKkPLbGBIKksuwEdsGBnNwuEhxyWDxm3pu+DQo/lcXzDY+zBromjtMVIAWt2sKE/LJde72K307JMq+lAGS75I739r8CCbRZ4sBGxV4zrabbMl71cKTdjivTmtE9avyhF4EKJ0g2XZb6Phv0YHoa+sttRRn76EBx0QtTPFf2cI46yfN544TP0X8iXicQ+kSpwoEW/ygeVA3uyZ1ZohWsB8xSAG07Eo7iaj9cNEZF5xNNlVd3NPoeQoO/4ML8obOhU4rq8nPBU8dbsdcQLxwUK67Cj5gi0YHIu1ftpnnpzNQ1gEqFfNYau4Ghbn6ZDF03vNi1dXo5D7xDMt6xrNfCRVZ3l8ZHpbWjnPbOtbQ833RVFoETmXTH6f3Z2VNClNRQsN9aa5wg8alQnT1c9jDaE7pxNNURk7WHFKCVMItASGskXdo+D4mdOKj9Vb+S/HwvUrcbGZ0JNn1oR643kxVQ74XwyC61+608L82gWVRke08utVk+OqVngtVnf1KuIZEiLc8g== 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)(396003)(136003)(376002)(346002)(39850400004)(1800799009)(186009)(451199024)(82310400011)(36840700001)(46966006)(6636002)(70206006)(70586007)(316002)(110136005)(8676002)(8936002)(2616005)(36756003)(41300700001)(82740400003)(356005)(81166007)(478600001)(40480700001)(84970400001)(2906002)(86362001)(7696005)(47076005)(36860700001)(336012)(44832011)(426003)(5660300002)(26005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB9010 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 05961850-4ab2-441d-1c10-08dba2fbf57a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: STs6EjxxoBhDBqBFpUHmfv2mkAq7K32MKJ7Z54YIvP/7FgBKx2rTXIXwCYzNAo14DFJMY9WoVvMyZBnAhYpS5oGh1zvf5bmfX+A9pxtKjIqT6k57KaEdVAoCZ2cZ7Do68UJSeSRNRPmnOnzd/MpYS/m/ayDWhkdgOBIXWFvQosVK47BRaHxEJKmDs4iGrhP9MZ+nRSTI6CyCGYIbl6E/tCj/qCXNbnAEteGztqXF9AsWfvNSxrAycImQ+sh80+wTPY/LqzWBZiwQsCes9GOYjL0dkTIy4r/5Q7nu6Oze/rRtCEVYSeFMDsrC3WExUpRcNB4094BR1rrbSwptuzwbVPhoAdSgZKYmHdZ06ju80SHm+VlkV9Ynfk/KpGLKb1qKktTLHZhvH50dWQuXPcOz5sf3TKYxLpB8MNShPRwQZhT5ILLuL9l0fUnRZvexM9m0nO4huRQUVLObgN1By1Qfv+h+Jbl9fSlXg0sBaYEI8Z4a+2nNDR8vH7Jv4r161EPEDBlU8lfmjbn3Ys9cqS6OdcaDr+9C8axKPtA/bzvANMgpCHhnfn5yrIPeKWabVSk3qaqdyoYuLMVzES4S48cbQ96dPSVmhE9hqYMwQo9p9WuCQGe6rIAUgidLtDX2ehvvKY6hLav+mP5RxalR1BmiGXpvdebImo7OwC/wTLemhpd48jBlU1LX6h3uXE3T40+vLePIgRszoW0l8SDDEbniiZzR8fTgWIW8MoMR8gc4iJyFq10d31KX6k1NS2eFclxjmcksiQqyv4/6A/dm2YsIPw== 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)(396003)(136003)(376002)(346002)(39860400002)(1800799009)(186009)(451199024)(82310400011)(36840700001)(40470700004)(46966006)(6636002)(70206006)(70586007)(316002)(110136005)(8676002)(8936002)(2616005)(40460700003)(36756003)(41300700001)(82740400003)(81166007)(478600001)(40480700001)(84970400001)(2906002)(86362001)(7696005)(47076005)(36860700001)(336012)(44832011)(426003)(5660300002)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2023 10:38:54.2244 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9842075b-b3ef-4b93-3390-08dba2fbfb74 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: DBAEUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5891 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 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: Szabolcs Nagy via Gcc-patches From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" gcc/testsuite/ChangeLog: * gcc.target/aarch64/eh_return-2.c: New test. * gcc.target/aarch64/eh_return-3.c: New test. --- gcc/testsuite/gcc.target/aarch64/eh_return-2.c | 9 +++++++++ gcc/testsuite/gcc.target/aarch64/eh_return-3.c | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/eh_return-2.c create mode 100644 gcc/testsuite/gcc.target/aarch64/eh_return-3.c diff --git a/gcc/testsuite/gcc.target/aarch64/eh_return-2.c b/gcc/testsuite/gcc.target/aarch64/eh_return-2.c new file mode 100644 index 00000000000..4a9d124e891 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/eh_return-2.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-final { scan-assembler "add\tsp, sp, x5" } } */ +/* { dg-final { scan-assembler "br\tx6" } } */ + +void +foo (unsigned long off, void *handler) +{ + __builtin_eh_return (off, handler); +} diff --git a/gcc/testsuite/gcc.target/aarch64/eh_return-3.c b/gcc/testsuite/gcc.target/aarch64/eh_return-3.c new file mode 100644 index 00000000000..35989eee806 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/eh_return-3.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mbranch-protection=pac-ret+leaf" } */ +/* { dg-final { scan-assembler "add\tsp, sp, x5" } } */ +/* { dg-final { scan-assembler "br\tx6" } } */ +/* { dg-final { scan-assembler "hint\t25 // paciasp" } } */ +/* { dg-final { scan-assembler "hint\t29 // autiasp" } } */ + +void +foo (unsigned long off, void *handler, int c) +{ + if (c) + return; + __builtin_eh_return (off, handler); +}