From patchwork Wed Oct 30 14:37:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alfie Richards X-Patchwork-Id: 99826 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39DE13857B96 for ; Wed, 30 Oct 2024 14:38:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on20612.outbound.protection.outlook.com [IPv6:2a01:111:f403:2607::612]) by sourceware.org (Postfix) with ESMTPS id C59AF3858D28 for ; Wed, 30 Oct 2024 14:38:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C59AF3858D28 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 C59AF3858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2607::612 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730299090; cv=pass; b=lMB0WkDq16l7O0XGIOwVzkyY/bay03SBY9v/uUDjLvnCh0y4YG117MsTkUROSOHUy+DkxwUs5RGNKeb8eBGew89n+IMpwoftNgu2eJQaRAx0al5Qp21tM9EbBGGQNjCLPICOh2QZ24KxSMYtWIkQVrSdnvPWtxyJyIar1HE+Yvs= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730299090; c=relaxed/simple; bh=T2AR43qIJCzYR0m/8gvsRY+L6i540ywJZSs6Din0UaI=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=ExQwcMLPtLn0d5Uk4bTPYivC8Qk8LNREB28d+PoOs0tx4ezYIsErZZ4P2y2ECQj1eycRg1/7Y6A/UKzchp+H357BOE0ZZQlXp+BvX41NBSMZRNGNrqUKJWhqZmhbzpEAQHPq1xNoPfF9gvm28yml/W97bqmNZnvscH0ZiEjxr9k= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=JlnPgbWi4DJQYfc8dYEH3cGtoz9hKb4Lm5G8KfxnRcdGAXXGdiXLnzHHryxl7qcVasMVwdjPk/I6Wnd7W2JdU8SENxvRhlkVRP0LRevSWTBlxm8UlA3DAi82ikvCR3FfgWaVRmg/q67BpfgfUe+OGph/zNHKWceN33I/Hk0+EMJWY4edACU68TNExrR0oyH8CKFAfQEgSGthwT0iQjxDZ8CRnzE7epgQd3psCGEesqYBzpLTQmdw9aVZ44nbuNIYXyw3tltdB3SLKbuaXK2H0iNLPQt8YeP2urL5xdurjZKyZ+tKPGkKFUoC9RE9SHOipSgqCByjP6EcH+OUGoQeoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=zBheLGQWP4ng52Az/QoKqX9ES2HoUPFzx/Tv4ffTBW8=; b=qeMgaOkySR4fmBfWE8XzB5GRKJ3cMA6IEV1nUGtze+uRcvpAZSZrH1Vt1ibepkUd0pyfwQ7q39L+sXmLJh6EEeotm4a2xfjSsSkMmYLpWCHLIWIqeDLQbmalp6iEx3LRMBfhsSFUBKhzAHge7lyGyeJ4esNOD4FXLHWtQrh8bipPzPPVU23yUryWp33t6FcDbCHagtgEApof8+PDPX394FxA/BWyuaZgxTAKLSSptdw68/1tx0utB3rG8CdgtII3odLZw4ZAYfgOqBZr5vTCdAWF2IbcIkbwtBPaTFNctVRyc1nd1EWAQxSVUAXWZ2O2YEmPM2fclNQv8cRaIXA8hg== 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=arm.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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zBheLGQWP4ng52Az/QoKqX9ES2HoUPFzx/Tv4ffTBW8=; b=iihGxoN3P3AwZ5cBen0NN0prHSayokc8lvA8oCmXuP4WERD92r9tMTNi3Vuos+dHvTxG2ItNUtaXGzxgFfW2AJiZ1vkjh8AVQnhlxdkjRtmUt+avnG6/R4ertqmWSaTMDLHTUxA/1FCnh3FP+DhNQZWAxo2FFgP8TAIPZAY+f5Q= Received: from AM0PR10CA0058.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::38) by PA6PR08MB10568.eurprd08.prod.outlook.com (2603:10a6:102:3ce::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Wed, 30 Oct 2024 14:37:59 +0000 Received: from AMS0EPF00000196.eurprd05.prod.outlook.com (2603:10a6:20b:150:cafe::70) by AM0PR10CA0058.outlook.office365.com (2603:10a6:20b:150::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20 via Frontend Transport; Wed, 30 Oct 2024 14:37:59 +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=arm.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 AMS0EPF00000196.mail.protection.outlook.com (10.167.16.217) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 14:37:58 +0000 Received: ("Tessian outbound 373849c2df5a:v490"); Wed, 30 Oct 2024 14:37:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 661ff035841095cc X-TessianGatewayMetadata: KA4bcilQfhO3YjkK+JRIHejSw2N7ZOL3bDS3nQsV18zraOIJ+g7jueMzSSuHACOQeXQj6jS8reLvtY5Yp8UnrNAqTTcNU3Xb4vLvEHl7MQU4rcndZLCUnBMqWLC7N/2ToS/Hrd9/0w0WY58weujeFa2iukp11Rcafc+Aiw5Nh10= X-CR-MTA-TID: 64aa7808 Received: from L489f4d03a3ad.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0996B22C-4A3D-4AB7-94B8-D32A4CF045E7.1; Wed, 30 Oct 2024 14:37:56 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L489f4d03a3ad.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 30 Oct 2024 14:37:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IT2ZM5yS24NwCYJYxU9z2WcmkATxyU+2i0Crqn81QkrzIHKxz59aOkxMZcCIHx+uY0VbVkE6t7vckLcNt9nEya3bMoAQq/k33klHN66MzP3IhEeUDS5Rj9k33YDjTqQxRyWktIgJfJIHlFlhO3NKh40a0O/nk5K2y+7GRIfFFZNq+cUyrIAoK6SbW/XZX6O0j88OQO3hV+aK/i7DfDFuGJG+1kfPSQCatEzIggI/4UxH7WPWR1U0dOhmYtBlNV010i9NUs8MAJ+R2PGJDZCznJuF067XTQcNuuIlBEKSoNcQNUMKGNE00QdvIo6aIBEoon+Fp8hJg76Pqm1Mw7p0Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=zBheLGQWP4ng52Az/QoKqX9ES2HoUPFzx/Tv4ffTBW8=; b=Q4Jf8U1G5GOOsTPkgm7fQzznKw0ZJNk6a/1CtoCwp8xcZ9/pTCbfsP3PE00tMBeMCcuIo17cU/+fyGQwOpHSR7i4IzLT9xqP5bBM/KLWXujgpuvGI07B1dbvtEIIDFypVjYG+muorjMOR4Zc3WTlNf2Bdi575qZ3Tvt23wKxE8aebMH1QxN6MtrOSiuhOK5ayO5sh0VppruV1R4/cz3ytB5SNJufTVHKpbpInNP6Sg07RC1biXCK9BD9cjuiZ44WuObTeRg8+hevImdEcAQM2hV7TmnnOOohwP3plUdO6HaHWWgNZj5gMiJaEdjL12qlBpLpkw4y8g1esnEF4okcSQ== 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 (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zBheLGQWP4ng52Az/QoKqX9ES2HoUPFzx/Tv4ffTBW8=; b=iihGxoN3P3AwZ5cBen0NN0prHSayokc8lvA8oCmXuP4WERD92r9tMTNi3Vuos+dHvTxG2ItNUtaXGzxgFfW2AJiZ1vkjh8AVQnhlxdkjRtmUt+avnG6/R4ertqmWSaTMDLHTUxA/1FCnh3FP+DhNQZWAxo2FFgP8TAIPZAY+f5Q= Received: from AS8PR04CA0109.eurprd04.prod.outlook.com (2603:10a6:20b:31e::24) by GV2PR08MB8631.eurprd08.prod.outlook.com (2603:10a6:150:b3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.18; Wed, 30 Oct 2024 14:37:43 +0000 Received: from AM3PEPF0000A792.eurprd04.prod.outlook.com (2603:10a6:20b:31e:cafe::aa) by AS8PR04CA0109.outlook.office365.com (2603:10a6:20b:31e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20 via Frontend Transport; Wed, 30 Oct 2024 14:37:42 +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 AM3PEPF0000A792.mail.protection.outlook.com (10.167.16.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 14:37:42 +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.39; Wed, 30 Oct 2024 14:37:42 +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.39; Wed, 30 Oct 2024 14:37:41 +0000 Received: from ip-10-248-139-135.eu-west-1.compute.internal (10.252.78.54) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 30 Oct 2024 14:37:41 +0000 From: To: CC: , , , , Alfie Richards Subject: [PATCH] C and CPP: Add flag to generate resolver at default version implementation. Date: Wed, 30 Oct 2024 14:37:34 +0000 Message-ID: <20241030143734.2201072-1-alfie.richards@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM3PEPF0000A792:EE_|GV2PR08MB8631:EE_|AMS0EPF00000196:EE_|PA6PR08MB10568:EE_ X-MS-Office365-Filtering-Correlation-Id: acfa7615-4a07-47e4-28ab-08dcf8f07313 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info-Original: PMEfVYSNIrj/+HZz1xCS5tStTc4qbo22uQ5WQu4ohy5JxYROM+4derCsDuvlqzhHgnrwLNAVbRDI05O3mu+n34CazGILbpleYWdnDJdLr7vtbPQfoxRw0148E2vcxP3WO/52Ob0vaMipdPYI0gDejNqwKLcsrDq2/1kmIDJ/q8c9Tq9a7y7tQq83wEfp55tmk+YJQWPQV69lugOxPrskU2eOS6iEaikdfqc/1DKuSULUl3mKTZlcES3ilKNeNmg6DHLMObXyR/Y6d16wG5rg9o8xecGhHj2g1+uQSXUSwUprhNi0FtcmG0F/N1DavnoEC/q2INoqBZ9AeaiMWy6qHAGk0AWEkyWbsf4vgTS3m9NsOBn1pY1bcpHaJlSXQ3GCG/a5A1eUjXpGVfZvJcU75rgfi+ikY/WR7Wd4Vg0RfJSjB33S2IJPx+CC/jXGaOY2tbT9CmPPD57VQDf4SmMgYkf0RD7Q85ij907tXVSn6Dj/jAYD0psjuUdOdd0qiIsUrcvrirdLIgoOBUOH7O1a9JtuCSWY+yPFbVntCdoXmqqa3+CeF+YjcyhKEgunJuwePrnHQ+jCeuzE10LvA1EhsM5Tc/Yc8tCU9OD5E6B7AqSMLUq3cgOXVjbeILcq/uvPLMamhWQ8KL6EnHZEhQaRulxjbOuDub7sV1vO7dh9siQwyeWmBF1rlSzDYmOyFk3TEJOlmpefJHo5H7gPril1pFb/sF7y8ZKACju0hDTJVQ+BzyBGCDzzbs/v5voQOt+kvbAmWhOkJk+iyGu4Z8y1n1VSroEh8Tz+owFtzaxxOHBv/W47v7AXzA9feonCo/iAL56rmeyLdFbI+xzxPkExrryU7z3nQlorXtaiitNAFMKsOMwErPuHAqO3m8Apmv8qluD9HyjnWA/3Njhndn4gLcuPJYK5lm5KCH5qG0r7jk6LeG41uTFsI7KfHfVHkKDyVaOcAn1cGn1ZYJwHOJjORZXz4KGkoFgThlSgUWm7Q474F6o5t89YJd+cgH00DvmzBJsoE6ZvbvpCmW3dGBRrwdHWMwaLRSIt01p83kklliEVFnmMFYfjGG3gg42+M7ZA9c0nLSv0mk97wcNVSyLL5DWSr0K6JrD0URsMAKjQK3sQM5+EjrSU3z9/1aj/+qQEGP9HXmi6sz2BLHJRbdvT/fccG/CNOiETQMtxQvabRKstnRJduVjpl9Yjdp6BeXlx4cbzYj9BbXV9VspPYWceMYeD+XzoRGM5HSX16QuTkkR0WV1e3BMz8aVgBVHt6YYjDChNToQwk1j4wASsuo5QJ4QhIeCY23+DnhJJOBX3zJzat5+86NdeFGjqayt/eFzoJXfCKf7Pp468AHk8DYlTojj1zRSHLIVHV0bt4FtcBPsPEetx5fj6cEkDLwnQXmdJ 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:(13230040)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB8631 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:31e::24]; domain=AS8PR04CA0109.eurprd04.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF00000196.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c92b9feb-ef72-4a33-c45a-08dcf8f0698b X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|35042699022|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?OIZ82TlMF9yykTiWMZjUBq9lrGYLdh/?= =?utf-8?q?d/PhURpbXdALRiqE7+OjvuiqPMqFyH6QdqOiPPIULKcKiiEWKJQB1fqKirv75F+kJ?= =?utf-8?q?QjOmtxZsv2/NBWizLYwv5Ve7EYrG40lCSPoynIt9iQCPRuVZrmHMnctBBrR52nVqL?= =?utf-8?q?6+yUyUJg2UPWgtG9BmOm/olebDi56sPmXjtkO44sd98F62U/HmiEgIApstciOIB3B?= =?utf-8?q?kk6FMneHB9XiyHfIgqdYn5g/8J+U+nELfn69F8OrirKY5VI31csp/lpXP0F3dUuZx?= =?utf-8?q?Z5zw36v0r/uGnp5ojQsqz3eMUlgpv370ROQIGPR3FjyXs4ZGmU+4bbTcMZi+RAx7u?= =?utf-8?q?VnAYGS4Ng+GC4M9XKBVDEehRvRcpOBIMIwnWv8QyyOOu87fiX8E//EaueOAZD+pJ7?= =?utf-8?q?6E3Ua4GhzW9rM5mrnEJUmTSOMPvF24qRG4xVXSpfqErd70L347aPRsZ/D1LwTX89u?= =?utf-8?q?p429ZVChcIpIViJFDyRcX9Ir+OZlUU9mskQFKyT3qU9Y2+Bj8fuG132EwP4josAWb?= =?utf-8?q?uMte/P70Ge2cOWWZpU6aVhPEo4w5la4bg6NaX42cAjWcWRIkhY6bDQEQzEosjOvFb?= =?utf-8?q?f6Qi12Oar2IYq4YUAPQbzsqu45S/lCGn3g6MgJYyKxkb2AX3GBVHOdAm+g8ReOj4n?= =?utf-8?q?wUyLGXzyRJgazTFzrKC3aT6VjDTgXv0c1CcCTt2LeFXoKkj/0mUaTQVeX2y96EcKB?= =?utf-8?q?nJECenPHI6HaX2BtphAc53L3xyhJ6zdHH+y64Uv2wcVu3mjgGk8FxNgb+UGk7FYT0?= =?utf-8?q?q9HDWJooifLOBi3RGnF755aBVOh2mnP0tvjps0XVd1S8vKZqnkSCUl0CGmaYnkUDH?= =?utf-8?q?7XcxRCi9qk7fPnF1IP4nZUc3tb5M3Cq5mLwDks33eTJ0VQmj6+Nn7iGpssNcahJUv?= =?utf-8?q?jbx5vgYkhLPcOic5Kl3OOOPPqmziBCTXA/FSU7zsoDqkjMXwK0zIXrzLE4kZlHqAz?= =?utf-8?q?SNQubuWl9PDKkMbguGAAEUNupHO86uFx7zdKv9KAeAskP4VrExDPnFxfpNz9nyX9K?= =?utf-8?q?Gh/IXvHaGjLTPueg3MCbDgrMFDGOU/JZGExs6W9ChnOW7psAltIeCThh/hyZl8t5d?= =?utf-8?q?IzTEaGAv6QoOpeucnaeP6I+ATwToLYbxnMShiIPLfC1NPnPjeXbZNmViP3Dq8xWUQ?= =?utf-8?q?pME4hEJ6HHV7xZ2Co9+gGA7URDXzdytAIhPwX6CCd+F1EtY2xPe2+7BjbXIDWkKpK?= =?utf-8?q?Q8CjnGau46+eW7jGqqVgeSYASGZnaKMjz6VCO8naViuj0XJ5M9IaedosE9Q6xXa00?= =?utf-8?q?6j1ISLIXRtIIbnc1QmKd5KwpbYsHNXOPkLgCOW5XpURuf//ENG5N8FqjBHNEALOci?= =?utf-8?q?D/JisDImUa6G?= 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:(13230040)(376014)(36860700013)(82310400026)(35042699022)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 14:37:58.5617 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: acfa7615-4a07-47e4-28ab-08dcf8f07313 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: AMS0EPF00000196.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA6PR08MB10568 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Hi all, This patch adds the TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL hook which changes FMV behavior for target_version functions to match the Arm C Language Extension. The functional differences consist of: 1. Generating the resolver for the dispatched symbol at the site of the default version definition. 2. Mangling non-default FMV annotated functions even when no other versions are present. This allows for better behavior when definitions are spread across different TU's as one resolver will be created and the [ACLE](https://github.com/ARM-software/acle/blob/main/main/acle.md#function-multi-versioning) stipulates that the default implementation must have visibility of all other versions so that resolver will be complete. This also matches Clangs behavior. The only remaining discrepancy I'm aware of when targeting AArch64 is we do not allow the coexistence of target_version and target_clone, which is specified as supported in the ACLE but I will look at later. This patch requires my previous patch enabling FMV in C. Note this hook is only true on Aarch64, so other targets will not be affected. To enable these functionality changes I added mangling to the initial processing of functions in the C and CPP frontends, and changed the logic for the creation of resolver bodies to create at default declaration implementations. Additionally, the previous naming logic relied on the fact that if there existed a call to a dispatched function the resolver would also be created which would do some renaming. As that no longer is guaranteed this patch hacks on the assembler names to make them correct. Reg tested on AArch64 and X86_64. Bootstrapped tested on aarch64-none-linux-gnu and x86_64-unknown-linux-gnu. Ok for master? gcc/ChangeLog: * attribs.cc (make_dispatcher_decl): Add optional name parameter. (is_function_default_version): Add check_versioned parameter. * attribs.h (make_dispatcher_decl): Add optional name parameter. (is_function_default_version): Add optional check_versioned parameter. * cgraphunit.cc (cgraph_node::analyze): Change dispatcher creation logic. * config/aarch64/aarch64.cc (get_assembler_name_without_default): New. (get_suffixed_assembler_name): Change to use get_assembler_name_without_default. (aarch64_get_function_versions_dispatcher): Change to use get_assembler_name_without_default. * config/aarch64/aarch64.h (TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL): New. * defaults.h (TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL): New. gcc/c/ChangeLog: * c-decl.cc (diagnose_mismatched_decls): Simplify logic. (start_function): Add mark for versioned functions. gcc/cp/ChangeLog: * class.cc (add_method): Remove argument for maybe_version_functions. * cp-tree.h (maybe_version_functions): Remove parameter for maybe_version_functions. * decl.cc (decls_match): Simplify logic. (maybe_version_functions): Remove parameter. (start_preparsed_function): Add mark for versioned functions. gcc/testsuite/ChangeLog: * g++.target/aarch64/mv-1.C: Update. * g++.target/aarch64/mv-symbols2.C: Update. * g++.target/aarch64/mv-symbols3.C: Update. * g++.target/aarch64/mv-symbols4.C: Update. * g++.target/aarch64/mv-symbols5.C: Update. * g++.target/aarch64/mv-symbols6.C: Update. * gcc.target/aarch64/mv-symbols1.c: Update. * gcc.target/aarch64/mv-symbols2.c: Update. * gcc.target/aarch64/mv-symbols3.c: Update. * gcc.target/aarch64/mv-symbols5.c: Update. * gcc.target/aarch64/mv-symbols6.c: Update. --- gcc/attribs.cc | 30 ++++++++++----- gcc/attribs.h | 5 ++- gcc/c/c-decl.cc | 16 +++++--- gcc/cgraphunit.cc | 38 ++++++++++++++----- gcc/config/aarch64/aarch64.cc | 31 ++++++++++++--- gcc/config/aarch64/aarch64.h | 2 + gcc/cp/class.cc | 2 +- gcc/cp/cp-tree.h | 2 +- gcc/cp/decl.cc | 18 ++++++--- gcc/defaults.h | 9 +++++ gcc/testsuite/g++.target/aarch64/mv-1.C | 4 ++ .../g++.target/aarch64/mv-symbols2.C | 12 +++--- .../g++.target/aarch64/mv-symbols3.C | 6 +-- .../g++.target/aarch64/mv-symbols4.C | 6 +-- .../g++.target/aarch64/mv-symbols5.C | 6 +-- .../g++.target/aarch64/mv-symbols6.C | 6 +++ .../gcc.target/aarch64/mv-symbols1.c | 1 - .../gcc.target/aarch64/mv-symbols2.c | 6 +-- .../gcc.target/aarch64/mv-symbols3.c | 6 +-- .../gcc.target/aarch64/mv-symbols5.c | 6 +-- .../gcc.target/aarch64/mv-symbols6.c | 4 ++ 21 files changed, 150 insertions(+), 66 deletions(-) diff --git a/gcc/attribs.cc b/gcc/attribs.cc index 0be7b83b264..077493073e2 100644 --- a/gcc/attribs.cc +++ b/gcc/attribs.cc @@ -1246,13 +1246,17 @@ common_function_versions (tree fn1, tree fn2) by the front-end. Return the decl created. */ tree -make_dispatcher_decl (const tree decl) +make_dispatcher_decl (const tree decl, const char *name) { tree func_decl; - char *func_name; tree fn_type, func_type; - func_name = xstrdup (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); + char *func_name; + + if (name) + func_name = xstrdup (name); + else + func_name = xstrdup (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); fn_type = TREE_TYPE (decl); func_type = build_function_type (TREE_TYPE (fn_type), @@ -1273,17 +1277,25 @@ make_dispatcher_decl (const tree decl) return func_decl; } -/* Returns true if DECL is multi-versioned using the target attribute, and this - is the default version. This function can only be used for targets that do - not support the "target_version" attribute. */ +/* If allow_unversioned is false, returns true if DECL has been marked as + multiversioned, is multi-versioned using the an attribute, and this is + the default version. + If allow_unversioned is true, then does not require the DECL is marked as + versioned and returns true if the function could be a default function, + ie could be unannotated. */ bool -is_function_default_version (const tree decl) +is_function_default_version (const tree decl, bool allow_unversioned) { if (TREE_CODE (decl) != FUNCTION_DECL - || !DECL_FUNCTION_VERSIONED (decl)) + || (allow_unversioned && !DECL_FUNCTION_VERSIONED (decl))) return false; - tree attr = lookup_attribute ("target", DECL_ATTRIBUTES (decl)); + tree attr = lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE + ? "target" : "target_version", + DECL_ATTRIBUTES (decl)); + /* An unannotated function can be default */ + if (!allow_unversioned && !attr) + return true; gcc_assert (attr); attr = TREE_VALUE (TREE_VALUE (attr)); return (TREE_CODE (attr) == STRING_CST diff --git a/gcc/attribs.h b/gcc/attribs.h index 00a83a785b4..390e6165e22 100644 --- a/gcc/attribs.h +++ b/gcc/attribs.h @@ -55,8 +55,9 @@ extern struct scoped_attributes * extern char *sorted_attr_string (tree); extern bool common_function_versions (tree, tree); -extern tree make_dispatcher_decl (const tree); -extern bool is_function_default_version (const tree); +extern tree +make_dispatcher_decl (const tree, const char * = NULL); +extern bool is_function_default_version (const tree, bool check_versioned = true); extern void handle_ignored_attributes_option (vec *); /* Return a type like TTYPE except that its TYPE_ATTRIBUTES diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc index 686283cced6..01c69b95dc0 100644 --- a/gcc/c/c-decl.cc +++ b/gcc/c/c-decl.cc @@ -2455,16 +2455,11 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl, locate_old_decl (olddecl); return false; } - /* Only record if we are seeing either of these for the first - time. */ - bool record = (!DECL_FUNCTION_VERSIONED (newdecl) - || !DECL_FUNCTION_VERSIONED (olddecl)); maybe_mark_function_versioned (newdecl); maybe_mark_function_versioned (olddecl); - if (record) - cgraph_node::record_function_versions (olddecl, newdecl); + cgraph_node::record_function_versions (olddecl, newdecl); } else if (DECL_INITIAL (newdecl)) @@ -10926,6 +10921,15 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, warn_parm_array_mismatch (origloc, old_decl, parms); } + /* To enable versions to be created across TU's we mark and mangle all + non-default versioned functions. */ + if (TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL + && lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE + ? "target" : "target_version", + DECL_ATTRIBUTES (decl1))) + if (!is_function_default_version (decl1, false)) + maybe_mark_function_versioned (decl1); + /* Record the decl so that the function name is defined. If we already have a decl for this name, and it is a FUNCTION_DECL, use the old decl. */ diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc index 2bd0289ffba..0744a0ea0e0 100644 --- a/gcc/cgraphunit.cc +++ b/gcc/cgraphunit.cc @@ -660,21 +660,39 @@ cgraph_node::analyze (void) resolve_alias (cgraph_node::get (alias_target), transparent_alias); else if (dispatcher_function) { - /* Generate the dispatcher body of multi-versioned functions. */ - cgraph_function_version_info *dispatcher_version_info - = function_version (); - if (dispatcher_version_info != NULL - && (dispatcher_version_info->dispatcher_resolver - == NULL_TREE)) + if (!TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL) { - tree resolver = NULL_TREE; - gcc_assert (targetm.generate_version_dispatcher_body); - resolver = targetm.generate_version_dispatcher_body (this); - gcc_assert (resolver != NULL_TREE); + /* Generate the dispatcher body of multi-versioned functions at + the first point where the dispatched symbol has been called. */ + cgraph_function_version_info *dispatcher_version_info + = function_version (); + if (dispatcher_version_info != NULL + && (dispatcher_version_info->dispatcher_resolver + == NULL_TREE)) + { + tree resolver = NULL_TREE; + gcc_assert (targetm.generate_version_dispatcher_body); + resolver = targetm.generate_version_dispatcher_body (this); + gcc_assert (resolver != NULL_TREE); + } } } else { + /* Create the dispatcher at the default version implementation. */ + if (TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL + && DECL_FUNCTION_VERSIONED (decl) + && is_function_default_version(decl, false) && definition) + { + tree idecl = targetm.get_function_versions_dispatcher (decl); + cgraph_node *inode = cgraph_node::get (idecl); + + tree resolver = NULL_TREE; + gcc_assert (targetm.generate_version_dispatcher_body); + resolver = targetm.generate_version_dispatcher_body (inode); + gcc_assert (resolver != NULL_TREE); + } + push_cfun (DECL_STRUCT_FUNCTION (decl)); assign_assembler_name_if_needed (decl); diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 3ab550acc7c..754e0bbdbaa 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -20202,6 +20202,18 @@ aarch64_mangle_decl_assembler_name (tree decl, tree id) return id; } +static std::string +get_assembler_name_without_default (tree default_decl) +{ + std::string name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (default_decl)); + + auto size = name.size (); + if (size >= 8 && name.compare (size - 8, 8, ".default") == 0) + name.resize (size - 8); + + return name; +} + /* Return an identifier for the base assembler name of a versioned function. This is computed by taking the default version's assembler name, and stripping off the ".default" suffix if it's already been appended. */ @@ -20209,11 +20221,7 @@ aarch64_mangle_decl_assembler_name (tree decl, tree id) static tree get_suffixed_assembler_name (tree default_decl, const char *suffix) { - std::string name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (default_decl)); - - auto size = name.size (); - if (size >= 8 && name.compare (size - 8, 8, ".default") == 0) - name.resize (size - 8); + std::string name = get_assembler_name_without_default(default_decl); name += suffix; return get_identifier (name.c_str()); } @@ -20670,8 +20678,19 @@ aarch64_get_function_versions_dispatcher (void *decl) struct cgraph_node *dispatcher_node = NULL; struct cgraph_function_version_info *dispatcher_version_info = NULL; + /* Strip the suffix from the default version of the function to get the + dispatcher name. */ + + std::string name = + get_assembler_name_without_default(default_node->decl); + + dispatch_decl = make_dispatcher_decl (default_node->decl, name.c_str ()); + + /* Mark the assembler name as set to prevent it getting mangled again .*/ + SET_DECL_ASSEMBLER_NAME (dispatch_decl, + DECL_ASSEMBLER_NAME (dispatch_decl)); + /* Right now, the dispatching is done via ifunc. */ - dispatch_decl = make_dispatcher_decl (default_node->decl); TREE_NOTHROW (dispatch_decl) = TREE_NOTHROW (fn); dispatcher_node = cgraph_node::get_create (dispatch_decl); diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 593319fd472..a674b83fa96 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -1393,6 +1393,8 @@ extern enum aarch64_code_model aarch64_cmodel; #define TARGET_HAS_FMV_TARGET_ATTRIBUTE 0 +#define TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL 1 + #define TARGET_SUPPORTS_WIDE_INT 1 /* Modes valid for AdvSIMD D registers, i.e. that fit in half a Q register. */ diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc index 8c39bb4a76b..7dd2075dd3c 100644 --- a/gcc/cp/class.cc +++ b/gcc/cp/class.cc @@ -1402,7 +1402,7 @@ add_method (tree type, tree method, bool via_using) /* If these are versions of the same function, process and move on. */ if (TREE_CODE (fn) == FUNCTION_DECL - && maybe_version_functions (method, fn, true)) + && maybe_version_functions (method, fn)) continue; if (DECL_INHERITED_CTOR (method)) diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 94ee550bd9c..182c946fcc7 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -6998,7 +6998,7 @@ extern void determine_local_discriminator (tree, tree = NULL_TREE); extern bool member_like_constrained_friend_p (tree); extern bool fns_correspond (tree, tree); extern int decls_match (tree, tree, bool = true); -extern bool maybe_version_functions (tree, tree, bool); +extern bool maybe_version_functions (tree, tree); extern bool validate_constexpr_redeclaration (tree, tree); extern bool merge_default_template_args (tree, tree, bool); extern tree duplicate_decls (tree, tree, diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc index 0c5b5c06a12..1ee09b9b739 100644 --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -1213,9 +1213,7 @@ decls_match (tree newdecl, tree olddecl, bool record_versions /* = true */) && targetm.target_option.function_versions (newdecl, olddecl)) { if (record_versions) - maybe_version_functions (newdecl, olddecl, - (!DECL_FUNCTION_VERSIONED (newdecl) - || !DECL_FUNCTION_VERSIONED (olddecl))); + maybe_version_functions (newdecl, olddecl); return 0; } } @@ -1286,7 +1284,7 @@ maybe_mark_function_versioned (tree decl) If RECORD is set to true, record function versions. */ bool -maybe_version_functions (tree newdecl, tree olddecl, bool record) +maybe_version_functions (tree newdecl, tree olddecl) { if (!targetm.target_option.function_versions (newdecl, olddecl)) return false; @@ -1309,8 +1307,7 @@ maybe_version_functions (tree newdecl, tree olddecl, bool record) maybe_mark_function_versioned (newdecl); } - if (record) - cgraph_node::record_function_versions (olddecl, newdecl); + cgraph_node::record_function_versions (olddecl, newdecl); return true; } @@ -18378,6 +18375,15 @@ start_preparsed_function (tree decl1, tree attrs, int flags) if (!DECL_OMP_DECLARE_REDUCTION_P (decl1)) start_lambda_scope (decl1); + /* To enable versions to be created across TU's we mark and mangle all + non-default versioned functions. */ + if (TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL + && lookup_attribute (TARGET_HAS_FMV_TARGET_ATTRIBUTE + ? "target" : "target_version", + DECL_ATTRIBUTES (decl1))) + if (!is_function_default_version (decl1, false)) + maybe_mark_function_versioned (decl1); + return true; } diff --git a/gcc/defaults.h b/gcc/defaults.h index ac2d25852ab..959a4ac8301 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -874,6 +874,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_HAS_FMV_TARGET_ATTRIBUTE 1 #endif +/* Indicates if the target should generate FMV dispatchers at the + site of the default version implementation rather than at the call sites + to the function. + The creation at default dispatcher is as defined in the Arm C language + extension and esures batter behavior when defining function versions + accross translation units. */ +#ifndef TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL +#define TARGET_CREATE_FMV_DISPATCHER_AT_DEFAULT_IMPL 0 +#endif /* Select a format to encode pointers in exception handling data. We prefer those that result in fewer dynamic relocations. Assume no diff --git a/gcc/testsuite/g++.target/aarch64/mv-1.C b/gcc/testsuite/g++.target/aarch64/mv-1.C index b4b0e5e3fea..1acd7023394 100644 --- a/gcc/testsuite/g++.target/aarch64/mv-1.C +++ b/gcc/testsuite/g++.target/aarch64/mv-1.C @@ -36,3 +36,7 @@ int bar() /* { dg-final { scan-assembler-times "\n_Z3foov\._Mrng:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._MrngMflagm:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._Mflagm:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\tbl\t_Z3foov\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov,%gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-symbols2.C b/gcc/testsuite/g++.target/aarch64/mv-symbols2.C index f0c7967a97a..7c8e1bcbed1 100644 --- a/gcc/testsuite/g++.target/aarch64/mv-symbols2.C +++ b/gcc/testsuite/g++.target/aarch64/mv-symbols2.C @@ -40,13 +40,13 @@ int foo (int) /* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\.default:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\._Mdotprod:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\._MsveMsve2:\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, %gnu_indirect_function\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, %gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-symbols3.C b/gcc/testsuite/g++.target/aarch64/mv-symbols3.C index 3d30e27deb8..2e8a27f0522 100644 --- a/gcc/testsuite/g++.target/aarch64/mv-symbols3.C +++ b/gcc/testsuite/g++.target/aarch64/mv-symbols3.C @@ -28,10 +28,10 @@ int bar() /* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n\tbl\t_Z3foov\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\._Mdotprod:\n" 0 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-symbols4.C b/gcc/testsuite/g++.target/aarch64/mv-symbols4.C index 73e3279ec31..04cac9d118a 100644 --- a/gcc/testsuite/g++.target/aarch64/mv-symbols4.C +++ b/gcc/testsuite/g++.target/aarch64/mv-symbols4.C @@ -43,6 +43,6 @@ int bar() /* { dg-final { scan-assembler-times "\n_Z3fooi\.default:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\._Mdotprod:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\._MsveMsve2:\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, %gnu_indirect_function\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, %gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-symbols5.C b/gcc/testsuite/g++.target/aarch64/mv-symbols5.C index 05d1379f53e..faa67909c64 100644 --- a/gcc/testsuite/g++.target/aarch64/mv-symbols5.C +++ b/gcc/testsuite/g++.target/aarch64/mv-symbols5.C @@ -43,10 +43,10 @@ int bar() /* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n\tbl\t_Z3foov\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3fooi\._Mdotprod:\n" 1 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/mv-symbols6.C b/gcc/testsuite/g++.target/aarch64/mv-symbols6.C index 52105449e4a..300ae357a77 100644 --- a/gcc/testsuite/g++.target/aarch64/mv-symbols6.C +++ b/gcc/testsuite/g++.target/aarch64/mv-symbols6.C @@ -7,6 +7,11 @@ int foo () return 1; } +int bar() +{ + return foo(); +} + /* It is not overly clear what the correct behaviour is in this case. This test serves more as a test of consistency for this case rather than a test of correctness. */ @@ -14,3 +19,4 @@ int foo () /* { dg-final { scan-assembler-times "\n_Z3foov:\n" 1 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 0 } } */ +/* { dg-final { scan-assembler-times "bl\t_Z3foov\n" 1 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols1.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols1.c index b7a7bc2147a..437f04cb358 100644 --- a/gcc/testsuite/gcc.target/aarch64/mv-symbols1.c +++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols1.c @@ -3,7 +3,6 @@ // Basic case of fmv correctness with all functions and use in one TU. -__attribute__((target_version("default"))) int foo () { return 1; diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols2.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols2.c index dfa9570da65..7debb6e26f3 100644 --- a/gcc/testsuite/gcc.target/aarch64/mv-symbols2.c +++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols2.c @@ -23,6 +23,6 @@ int foo () /* { dg-final { scan-assembler-times "\nfoo\.default:\n" 1 } } */ /* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */ /* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */ -/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */ +/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols3.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols3.c index c94610ab2da..5b8c16b86a7 100644 --- a/gcc/testsuite/gcc.target/aarch64/mv-symbols3.c +++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols3.c @@ -20,7 +20,7 @@ int bar() /* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 0 } } */ /* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 0 } } */ -/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols5.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols5.c index 95fa72583bb..82f7834dfea 100644 --- a/gcc/testsuite/gcc.target/aarch64/mv-symbols5.c +++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols5.c @@ -29,7 +29,7 @@ int bar() /* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\nfoo\._Mdotprod:\n" 1 } } */ /* { dg-final { scan-assembler-times "\nfoo\._MsveMsve2:\n" 1 } } */ -/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 1 } } */ +/* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */ /* { dg-final { scan-assembler-times "\n\tbl\tfoo\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 1 } } */ -/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 1 } } */ +/* { dg-final { scan-assembler-times "\n\t\.type\tfoo, %gnu_indirect_function\n" 0 } } */ +/* { dg-final { scan-assembler-times "\n\t\.set\tfoo,foo\.resolver\n" 0 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/mv-symbols6.c b/gcc/testsuite/gcc.target/aarch64/mv-symbols6.c index 8080502a4a4..de6ae7e9774 100644 --- a/gcc/testsuite/gcc.target/aarch64/mv-symbols6.c +++ b/gcc/testsuite/gcc.target/aarch64/mv-symbols6.c @@ -7,11 +7,15 @@ int foo () return 1; } +int bar() { + return foo(); +} /* It is not overly clear what the correct behaviour is in this case. This test serves more as a test of consistency for this case rather than a test of correctness. */ /* { dg-final { scan-assembler-times "\nfoo:\n" 1 } } */ +/* { dg-final { scan-assembler-times "bl\tfoo\n" 1 } } */ /* { dg-final { scan-assembler-times "\nfoo\.default:\n" 0 } } */ /* { dg-final { scan-assembler-times "\nfoo\.resolver:\n" 0 } } */