From patchwork Mon Sep 2 13:03:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Karpov X-Patchwork-Id: 1979650 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=microsoft.com header.i=@microsoft.com header.a=rsa-sha256 header.s=selector2 header.b=XOHYNGAG; 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 4Wy88Y4Bdgz1ygC for ; Mon, 2 Sep 2024 23:03:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2C906385B532 for ; Mon, 2 Sep 2024 13:03:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2072b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::72b]) by sourceware.org (Postfix) with ESMTPS id B69BC3858427 for ; Mon, 2 Sep 2024 13:03:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B69BC3858427 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=microsoft.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=microsoft.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B69BC3858427 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f400:7e1a::72b ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725282193; cv=pass; b=cOm7iE07m43juX8MntPv0A1c00fXpNahC9lOdZyVjSOrsVk2nyFZcFcqLYfJRe1H1KoH+u74hwTs2Av/BWPdmZyDdCZ+x4s0ahVIskwNBq8ggLmjKimBKVqOKLhWi8DbP5Oc9IDfdo6AILlih9NFbBgHz9U6JieIjMBeiDaLjQI= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725282193; c=relaxed/simple; bh=GXDv49NmeCvbxLGpa/Vq4TfpQrsAZAbEBUn0mWwJ/68=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GyUxEIL/U39BA2SY/o/4unB1b6Bldi2Tccm05VFQsD3p2jqJfQOmCSXLiabIMTz4t4hYEdNI8C7Biz0ZfUzLTIm8fiYnLzHznRMq8dryI8g3ovY0y6KqruHPZ6MIXU7g83OBPk2fAj3p/6w3MiRHbhJaDxP7dskxogw8CuDl+iI= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YQZxDIfpYI/71L7eeDabfvcKfdoJ0RCZrsCZnXtgoKJNmzaYsob9lT2aTQ9w+8WzEVM0smqspPtZLbl0fXLadg8L+OHL1h9MYyQwjCS5DopY/D0WKysQFC5mfKHY4qkG+GdxeG95WVn7QUcM428XhQe2ZkJgexADDascYA/3QNaQa3n4za7rSK22YKrT3Mx3LETsMtNBw75lvUdkWr8mBYL4txiCFHqYxAuwyzud58SZ+H11ZvkhCwYnhbctdxWl1IDsqTCATfRpQ9szWhUUhabSTDWfLgogJzRqW1XVr/t5sUaD/8bGaSlEcru063h6Gu11zhtZralb1/mlsLBy4Q== 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=5GuwoaXQ95oB5tj/RCnpZY/OGktKjeii3Bh4q+I7RXQ=; b=Hlm2ULzz+MYcetyHK/sjfqeBM1NBmD8+30eXjqOWxIAEiB2afuRholueToin1ay9NG7dUAU8vCYLif2rfhMm/6irdgOf81gPeQ1mNkoyBwzrASQZv2OyJy0NHuhnCsN6Ouivx5ofOvDuwo23IBW79SFw1sqBtc99iU/3CQSDQRlUBa67HhmTj/4FSeXkWHVIvOMG42s3soRT7qIsP8yBCPrF/8MympLM8QjVySfNEKk/XtQV5EHdhKMCFHJRcVVR6l9/Djce1KlBAa8PkaMF1pt8pEciU1mm2K+E0S2UnCDDChFQn4hHjAv+tu7G1eVi/0gLFTC3bXb6fwNWb6dTeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5GuwoaXQ95oB5tj/RCnpZY/OGktKjeii3Bh4q+I7RXQ=; b=XOHYNGAGwVWVrOwuWrhsFlerwBDsObktXKc05KdCYSWnfK8RbptdBe2kaRPJrgs+22eewhyWzPzjm8tk28bVPi5Ae//byIwBaf3dIOcE558EUi7HZ4wvTyDujG6jnJePb8+bRccm6FVynl0I5eDogry8j234uXoAtNnjLOYeMis= Received: from DBBPR83MB0613.EURPRD83.prod.outlook.com (2603:10a6:10:533::21) by PA6PR83MB0647.EURPRD83.prod.outlook.com (2603:10a6:102:3d8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.3; Mon, 2 Sep 2024 13:03:08 +0000 Received: from DBBPR83MB0613.EURPRD83.prod.outlook.com ([fe80::399d:9bfc:1209:af10]) by DBBPR83MB0613.EURPRD83.prod.outlook.com ([fe80::399d:9bfc:1209:af10%4]) with mapi id 15.20.7918.000; Mon, 2 Sep 2024 13:03:08 +0000 From: Evgeny Karpov To: "gcc-patches@gcc.gnu.org" CC: "richard.sandiford@arm.com" , "Richard Earnshaw (lists)" , "christophe.lyon@linaro.org" , Maxim Kuvyrkov , Radek Barton Subject: [PATCH v1 3/9] aarch64: Add minimal C++ support Thread-Topic: [PATCH v1 3/9] aarch64: Add minimal C++ support Thread-Index: AQHa/Th1vuW3ZgmJaU2coneVPoy3xA== Date: Mon, 2 Sep 2024 13:03:08 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-09-02T13:03:08.953Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DBBPR83MB0613:EE_|PA6PR83MB0647:EE_ x-ms-office365-filtering-correlation-id: 931460c8-8dec-42eb-ae68-08dccb4f9796 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?y/uIkyF+etFDaKO7ps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NzMqiHkPKxBk/f39IgUNYHWJonIzYs1+yd4fuklj8l16hgyprQgSXu6C?= =?iso-8859-1?q?wKcngAFSZITD98nMCNaRfoTK2D9UUS273YccsQzg62/WvOAe/H+urkaBPh43?= =?iso-8859-1?q?OP8e5lIJUsCmqA1YEEEUXy17rw3PaFCIZkfHduF13kEWD+BRcYE8faWa2bdY?= =?iso-8859-1?q?hsd2UTzZCGEPuMKm1W8Hg3J3ErUsXjcog/1PE20AOuA1SAxeBXWrlnIAnXYG?= =?iso-8859-1?q?9DGqFOxVTKck8s+Cuqoh9VujM/0z0p+auLITwD0X/LbAteGSTZvPYAWgPRQ+?= =?iso-8859-1?q?Rk86eGdRHGb8t84gYMFan1ik8c/FjlqvVHOc+v/R/bcXm7GzZ80kzGSyhHLq?= =?iso-8859-1?q?7p58B42VpLlBwpjRhg6Etb+ajJ0rAOkKXG2+Ufh/CLMKI7mekjCi/tIVntDH?= =?iso-8859-1?q?s5p/J6H1YezA/syeMKhsKyxKi+ouVkR3rmu4m9yrCGL4LnLZn4juAQ9LPWN4?= =?iso-8859-1?q?tSSRmfZGcJZ6t16x5O94HWmwM/lULsIWPZ1Q6Mh0IfL5UUq6gJmUvHhY2ayi?= =?iso-8859-1?q?mQp8TQPe1ip6b/NfNdWDKGqQ=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR83MB0613.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?ARD2Ow7Wyz6nlWL4JEkHWVI?= =?iso-8859-1?q?SEHgBMQqEpevV6xqYo1h+JF6D1VUiqgYEJkT9F7pkm/kFCmtokwMO6ZtWTES?= =?iso-8859-1?q?t6a/dxrLPc4mP5PKm2Ca0168v66F6DBMVYJuk/9yWXBS2QeflNARBZAHxvX9?= =?iso-8859-1?q?xCW3SxnsW5W/+usRyCfCtIRgL1ZARzl8E7TBAlM9yNZ3MjrKirhsWd7XgtDT?= =?iso-8859-1?q?kPzLshqiF4I2iVD/L+LQRpp+YXzv3nf63cKudo/+8J6ArBA+8OZVTit5geJ5?= =?iso-8859-1?q?Nw/k6H9xPHB+HteHPpc2dI5aFptPtWJvkLfkGnRm5IrCZrPyxIRzsN4vQ/Sf?= =?iso-8859-1?q?lc4hXo8jfKC1yOR25xwtgy8z2T7uz4Gam8GC+Orbc72yO889U1bKKsVckiqU?= =?iso-8859-1?q?ODhIOToIZCCYbhBdpGQtzrxPRBbC9SjufKouUVPwaeSJB0FVeINJzBR3/ofi?= =?iso-8859-1?q?/V5lnPQZRcV8nriplz2JyloQt9uHByC2yG5gxT9jS24nn7DPxjMIxoy3H89i?= =?iso-8859-1?q?o9D9/t5Z3yruVhAMn6HUEoFH4JdDhHgE5dOJpsNEEvf6t65ZSx5evgwEB1Fl?= =?iso-8859-1?q?CyZCiRvrlQeyCsFhu6L1+L5luM+VcjgJRGdEuOcMJyQScuVSogjSSzo8GUYu?= =?iso-8859-1?q?DpbSFXTugCQ+228Iee3YwABHY3maOwHU1XoKNCzkUbBmX4OfPOWuGqhDVh4f?= =?iso-8859-1?q?e0BIVPtdBO3la3L03iptAyF16HYQGj4t11TyqO3Gui1jKsQyc53SnRZ8i3Ai?= =?iso-8859-1?q?rNsRpyYo03U4+dWkSYbMG/tY0Xl3ljxq8BkjiudRiowCP+2t/dhqcEZH+jss?= =?iso-8859-1?q?SwkLck1L5htKEoR6CZj3remTlQJQpxWHP8MD4Rbn1glnWr5FkLo8gWneCiRC?= =?iso-8859-1?q?ro6//G8r9u/wF0mENGPRN3i7+NX9Eg9iFSuW0HSUpIiDaydXeclsKjWXZLDB?= =?iso-8859-1?q?TTqE4281K2GcYwh/7C2E9cRujVulsApj4EBa+QA7qqvT55RTmGe7aR83Z/An?= =?iso-8859-1?q?fgymZdFrVbNRQH2+0PFr4orHlPsMRdqMX7v/JSwRcGYPaRSUimde4vPogB1r?= =?iso-8859-1?q?sQmnVCvQb9BBoSProagHEz1NWe9r7GJ5F0gZQmFgYF0uJVpkXVnnQsjAn3IT?= =?iso-8859-1?q?8mLK+rK6aahNFKUQGtvxlmh2yMm3MYoDxPJLCKrLzRf+9jWkj2IYEzMusbOh?= =?iso-8859-1?q?QVpdf0wq5mCIvU0VxVrhi7b9GBSCoqpKXjFTT7tHm30zFh94oGQpK7p+v+Ay?= =?iso-8859-1?q?wAkuWSg1+wzDlME219w3ZNXUJBD4CVY9xbMWcCdxNBXeib2VgcHzHlpNdDio?= =?iso-8859-1?q?I4yBPLQd8f5OvBgKy8N5jl4AP58Vhm+j6OklJAwWZ+w4reC0o4AqAtELGpXl?= =?iso-8859-1?q?gDLUBEDfwvVRpEN8sD53j2+UE0QUkDqz64vqr/WqJO5RHfFbYKaBmOVfRnT9?= =?iso-8859-1?q?UpJ+iHpuRwGM3ZQwWwWbAeuQJPtu6N1lRZn2f18QONO+HrBppSaSAUWarLtn?= =?iso-8859-1?q?xog5896/c9ZxKArZOsBPfx3xgW90Ck4Rh2EzkjF7aTYqHDutrH1VmHBeRXVK?= =?iso-8859-1?q?Lv2K9vLs0SD79Zr8XIyo9cBBFbS+15kOAfPaisR/rMnA4XHe0Q1kCBnq9if4?= =?iso-8859-1?q?Nc2uhNl13WQpsQ0IylVn/v2NtKvKAoP+I95Hx9gTP0BajFqkzoYIWqTg0xqS?= =?iso-8859-1?q?3YeuKMwtIfUYyypOjKMge?= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DBBPR83MB0613.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 931460c8-8dec-42eb-ae68-08dccb4f9796 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2024 13:03:08.5373 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5fbhAx5Uc7xFRHgqirAJjYP91jbQ9UkiI0N29daAioFML5PEocMcjpfOVM5q0737wCo1Wb98xng28vp6nyB1xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA6PR83MB0647 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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~incoming=patchwork.ozlabs.org@gcc.gnu.org The patch resolves compilation issues for the C++ language. Previous patch series contributed to C++ as well, however, C++ could not be tested until we got a C++ compiler and could build at least a "Hello World" C++ program, and in reality, more than that. gcc/ChangeLog: * config.gcc: Add missing dependencies. libstdc++-v3/ChangeLog: * src/c++17/fast_float/fast_float.h (defined): Adjust a condition for AArch64. --- gcc/config.gcc | 1 + libstdc++-v3/src/c++17/fast_float/fast_float.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index a36dd1bcbc6..e1117c273f0 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1283,6 +1283,7 @@ aarch64-*-mingw*) extra_options="${extra_options} mingw/cygming.opt mingw/mingw.opt" extra_objs="${extra_objs} winnt.o winnt-dll.o" c_target_objs="${c_target_objs} msformat-c.o" + cxx_target_objs="${cxx_target_objs} msformat-c.o" d_target_objs="${d_target_objs} winnt-d.o" tmake_file="${tmake_file} mingw/t-cygming" case ${enable_threads} in diff --git a/libstdc++-v3/src/c++17/fast_float/fast_float.h b/libstdc++-v3/src/c++17/fast_float/fast_float.h index 7551c4f89ef..dc61de7b199 100644 --- a/libstdc++-v3/src/c++17/fast_float/fast_float.h +++ b/libstdc++-v3/src/c++17/fast_float/fast_float.h @@ -275,7 +275,8 @@ fastfloat_really_inline value128 full_multiplication(uint64_t a, // But MinGW on ARM64 doesn't have native support for 64-bit multiplications answer.high = __umulh(a, b); answer.low = a * b; -#elif defined(FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__)) +#elif defined (FASTFLOAT_32BIT) || (defined (_WIN64) && !defined (__clang__) \ + && !defined (_M_ARM64)) answer.low = _umul128(a, b, &answer.high); // _umul128 not available on ARM64 #elif defined(FASTFLOAT_64BIT) __uint128_t r = ((__uint128_t)a) * b;