From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2133.outbound.protection.outlook.com [40.107.14.133]) by sourceware.org (Postfix) with ESMTPS id B8C873858D38 for ; Thu, 11 Apr 2024 13:54:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8C873858D38 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 B8C873858D38 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.14.133 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712843653; cv=pass; b=xaBV+im3ZWxmIYM3E6Z8CKTqjfjNl7761np9Ct8aWYA1iKOs9xi4IeS5PaBIcLEyCgbmUKY/bMbFIT73I+OhCdAXAqWVEyssuyKhNky1hZ38DuIwN1LJnkik9gInvDPZHEEUq9apqT5LusYVJF7f3JehNHHvWv4JDBDwr7PIeB0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712843653; c=relaxed/simple; bh=65Ty+1ejiu7JJdJqJbFqyuYyyvKgkti6NtA4iCNNOKg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bofhz/VOqrXRqr1yA7tRBb0wab6AggQBTdgukN+CqaWfxdYNoA/7+8oKDpnhXXLkgKM7yG1rE+A5zz7KAuIvVGpumFUjtBnHf6M29A0LouAOQgCaQno0ouPP7TJmAfJruGZgRBGYrhseDA+A5b2qa6Jn0zMeYVp709sIo4myuvM= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GBBiRWtBwT7jGJMZAJsg3RDK1BG8nGRL2l9vFL1EIKnJmRgiXhh7hLwvEF9m+c0ke0O6d5567TPxfdVMqFHlvfV15jmy/dLiSVQCEYW/mqTipFNUx3UvDj3dNjO+nBmBNpwhVZvM84wLBOWXGGuoyypVI5UYvSa/NkcNdOJp6o9qWs1JcEq6cMEltQZoEeRD5OAOcqEeNZLKYugK1S0lJxWPe0OqdU6dSoLegwI4EdgNi1B+TPGR/DguxJrB2lMgi51WLKgVBI/4RficdJtl7Zfdkom4WS17oNruRP2BuAM4KXqw/KA2r7SsQDPamvcu2r0aKJJbqRBzDCP8YEW0qA== 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=3i0/IrEGZiTXTrkST+zurc4UKXqn4+BxnOwORQp7I9I=; b=Mc1faaRw5IrY9U3GEG/5qON5juBfbjxYzJQhKnDv1mkB30JiEetiJyJOD6rCzztFgF8x2WvjH509DYEjXYfCDVzsAJtp8KUqc2yc3+uhupRqGEDVQ0DaAGEzeqWPL24DIMWsYt1DhVRZUV+p+M6IGGhKegTywg4QcVBHjpL+hBBEErd01wxjMmZwXUd/YvCmrbnWWtG0fYdWLp5pFEwwyAg9tfJ9ZAsPsnwZK2g844/c6hRzOVAFNn238O6lyWotkY5mB5hDfWWu9kkoiJjg+Vj3IxUSoCNYrXQV2ZW0Ll5N7J1vNeRm3xGoISmHY+x/g+J1ijwFNaKIYpgfVjwjew== 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=3i0/IrEGZiTXTrkST+zurc4UKXqn4+BxnOwORQp7I9I=; b=KbK2EI2/AcnTRg7tyrpthWzB+blPSKONNF3gXaQBv+yoh0psGMwSW19L5g2YptheabPs9OIFUYAV29kV+kyn2gA7cKThe197t7TWmgozyhoOiFGwsx+XKe/Zv05Up1H4d/FFNX7qF9ftglQJi7VQWd4P+48w7jXbYHuAmBcL6EU= Received: from VI1PR83MB0431.EURPRD83.prod.outlook.com (2603:10a6:800:17f::6) by PA4PR83MB0525.EURPRD83.prod.outlook.com (2603:10a6:102:26a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.12; Thu, 11 Apr 2024 13:54:06 +0000 Received: from VI1PR83MB0431.EURPRD83.prod.outlook.com ([fe80::7147:b7f9:31fb:39f7]) by VI1PR83MB0431.EURPRD83.prod.outlook.com ([fe80::7147:b7f9:31fb:39f7%6]) with mapi id 15.20.7495.011; Thu, 11 Apr 2024 13:54:06 +0000 From: Evgeny Karpov To: Evgeny Karpov , "gcc-patches@gcc.gnu.org" CC: "richard.sandiford@arm.com" , "Richard Earnshaw (lists)" , Maxim Kuvyrkov , Radek Barton Subject: [PATCH v3 06/12] Exclude i386 functionality from aarch64 build Thread-Topic: [PATCH v3 06/12] Exclude i386 functionality from aarch64 build Thread-Index: AQHajBe43O3o1nAGWk+QlkHExAGhfQ== Date: Thu, 11 Apr 2024 13:54:06 +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_ActionId=ee10a91a-ecb0-4ef6-a7aa-22b9c54f3645;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-04-11T13:35:01Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; 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: VI1PR83MB0431:EE_|PA4PR83MB0525:EE_ x-ms-office365-filtering-correlation-id: c8b901ee-13fd-4b1b-2c54-08dc5a2edae9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: a+nvNWzVbr2btJFYkWRvYfryXI9krjjPntb19/+pBVnfp0s8VFfhb+XtczAhwi002u8CQB8NoC2m3d0ldsOnGUohCQe2YrFPSVrqU9w7A2CBZDmBAObBJp+y/FEmz3HaaaQ0LC0vFqCZjf0id2/NgIzZbid5rgT/PSxeQGmZ8BPgHwNbdFMqUSj52kJ4VkMCgx+dD3K/e0BcGIjm9q/45Pgl0LOO917tFCsJia3SEEuf+ZDDVB0TwbDOCZMA+AxfgCqtUQBy9wSXAwbJ0qLL2ok5fuxWUDNqy8RbqQI6DEqd4IQU/NgVq27YH4uCCSTqM42yxBab4RDj2kc7VxbclcHzG6yFb7m9PuWjUfBicYm1Oflm33RPNuAVbNinAqRAnP3HTwEuczgP508CnEIk+XrEaoMc6kWZcB/KMwCU9stRVEM6Oz0+U0jDJf8c4/YbNqmhRXQcQIRqxwvxqqShAlwz4BRo4ulMnyUGVfc+4BAKmF7gLmNOt5bGTDhubikvPyBwud+DaVVwDB0/ANZvtcyuCsxB+uHCzF4N45Dcz0cmLQGJrTpOe6ZuHvcVoe5hPMIVSrudX1rCG8zpHkwChWvSB23kycuHxREmPrPsYW9vCsXhWpDANNMwf2oxX0EmOJZ5MwdrDBNW/U0WV10QsjpIPOCQpFUr5woaTzAZudk= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR83MB0431.EURPRD83.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VU86xtZd4Yl90XIBmlQoiTWGdq7T6FM1jz4OFYCihokaLpTnacYK8EzjXi7/?= =?us-ascii?Q?cbEZzegcY0X6NoSFPK13NiTnL8ff4d2vMTfF7TCKseWqv/oHFnOSUM5HfrxU?= =?us-ascii?Q?6yrzwL6iBjZ7RxUsk6HQjsYuPkCSCYvqUigv/i8NXA1cpX5puxnIaY5kGkxj?= =?us-ascii?Q?r5LI7rn3Ytdc9iOzNR3PgiG6vHsUXz9IjTks/RcxwtnOUP2UXWIa5kG91tQQ?= =?us-ascii?Q?dAfdZH89JW8l2wIKV3iWQBBbU6E76vY05VxlZTQ2B3Fcr/8NyKxs2l3HBqyj?= =?us-ascii?Q?4etvTuZFOEkebpy3fbbarocKIDRkb6JFVj8UH+P22+tDOpgNos9LNSpNDz3G?= =?us-ascii?Q?G/rK5v8PMtV0xyN+UIYHQzK8FNVWNOVwB/P6fBh7g0i2l5MzJ0VrdrxK5BLT?= =?us-ascii?Q?8rFdR2B6Fwj/NnKWNCZGu23s7kOJfiVtw8M0MpZppCreU62v6Y9caMzDdWLa?= =?us-ascii?Q?uXARO8sBEEUwUbVoeJmJ3J0zBtj3kCwIVXGXTDzkhAVFqEmVl5HOOxb0+SAE?= =?us-ascii?Q?iHeN6hGXaA1Em6z3K2C4thEGo/CnJXJojkZwTbkNCAk2bg2QjCjwwDsVJi2E?= =?us-ascii?Q?h+OSkp81dMNFwiL6IG0zfFWmOrdqDEtxnMG2HFhSAS4m1knFA1E9+LAlbcyi?= =?us-ascii?Q?WjTvW7TXbT45c+vs8eGRG8MqVVPX90nq43BsFPDUsREY2oon9b22qx3OT0fd?= =?us-ascii?Q?kYQg5lmxQ3rUMFCi8BS5q2BU1ToNETZznqvJQqSgiSpHLcC1nB7+bPkdq0cN?= =?us-ascii?Q?LqveD5FV6otgLECd5OY70QyQQ4VwC5+R1tW7y3NUBS2NErNym/PXDAyvajjK?= =?us-ascii?Q?z3i9hkVmYLRw3WjTIYQ8SF1i6qdduacSOWgFq1vsJmdcvUavh38svAYziCRV?= =?us-ascii?Q?vLFjiK7w40dvV5esAH6wv7cluwqXMPpdDguvBD6XmZNcrefC9bJnXddUHbjo?= =?us-ascii?Q?tbny4ygOcQBtTf3i5QOMYUmJ0Dl4BFJ6hr0YZnv4UGhK5LQKWhczWq5GCJWl?= =?us-ascii?Q?jkm4+AEEGZdvC7cUlgWcFjxpDWyrw2pbzG/NpCjPay8KG8Z71Y5z1Vto/FrR?= =?us-ascii?Q?Ghaz4N8d1ph+Pdu6Hlngkj/mXCks65KjBnA/APRMRdTqI+e66D5VrFJTNVJG?= =?us-ascii?Q?gLO/+QeJfZ4x27LUFRxJqWa9kROn0riK6+OAjypcTZwAHQ1eOBWjjqKgToi+?= =?us-ascii?Q?kVVB9i4szwsVIWparjVezr1yOvKcCze6/WVOtQ4rnRa1BlrhPoUB/s4mCn3J?= =?us-ascii?Q?vhh5y6uXhPQqGPOlxMjDLR0RWeNuCdFrHpImjbkdu4KlLU99FrbOvT2K+k+y?= =?us-ascii?Q?/3yrIqGhd0O5hmr+ZPy2w03jEP452CVJwKMUWb29uNs0S4Z0oUuSX8HoAnoa?= =?us-ascii?Q?uC6mb9eCQhMYvRFgq9q3OIhHkSD/pZxPNm+wpCgJhvrbCra9WwxYNo6T4SZa?= =?us-ascii?Q?zYCYlswzw1vYXtZusrZSrfBh8Z2SaTuIP2WShrwR0SRQOAvtTbldSwj3laB1?= =?us-ascii?Q?7tkDZgPm3DVC9BdDnyNitnaZ8ISGME1wlO+YPly42sOWgDpeycGFKzSB2F0O?= =?us-ascii?Q?ILHVmUmbNm4l90af5YaR2+NSBFH+MYiO4xJgi6tx?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR83MB0431.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8b901ee-13fd-4b1b-2c54-08dc5a2edae9 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2024 13:54:06.7326 (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: A5ooy74QkLgTt5qoJznaqY2kGdu+hkqzxh6qKuFWYoRk8NHtEU1TgCCzxcMOeL8l1OF/d3NQV5lJYIPoHLm8JQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR83MB0525 X-Spam-Status: No, score=-11.3 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,KAM_SHORT,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP 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: From: Zac Walker Date: Thu, 11 Apr 2024 13:38:59 +0200 Subject: [PATCH v3 06/12] Exclude i386 functionality from aarch64 build This patch defines TARGET_AARCH64_MS_ABI in config.gcc and uses it to exclude i386 functionality from aarch64 build and adjust MinGW headers for AArch64 MS ABI. gcc/ChangeLog: * config.gcc: Define TARGET_AARCH64_MS_ABI. * config/mingw/mingw-stdint.h (INTPTR_TYPE): Use TARGET_AARCH64_MS_ABI to adjust MinGW headers for AArch64 MS ABI. (UINTPTR_TYPE): Likewise. (defined): Likewise. * config/mingw/mingw32.h (DEFAULT_ABI): Likewise. (defined): Likewise. * config/mingw/winnt.cc (defined): Use TARGET_ARM64_MS_ABI to exclude ix86_get_callcvt. (i386_pe_maybe_mangle_decl_assembler_name): Likewise. (i386_pe_mangle_decl_assembler_name): Likewise. --- gcc/config.gcc | 1 + gcc/config/mingw/mingw-stdint.h | 9 +++++++-- gcc/config/mingw/mingw32.h | 4 +++- gcc/config/mingw/winnt.cc | 8 ++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 1712441429c..3bc4982850b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1285,6 +1285,7 @@ aarch64-*-mingw*) esac default_use_cxa_atexit=3Dyes user_headers_inc_next_post=3D"${user_headers_inc_next_post} float.h" + tm_defines=3D"${tm_defines} TARGET_AARCH64_MS_ABI=3D1" ;; aarch64*-wrs-vxworks*) tm_file=3D"${tm_file} elfos.h aarch64/aarch64-elf.h" diff --git a/gcc/config/mingw/mingw-stdint.h b/gcc/config/mingw/mingw-stdin= t.h index c0feade76e9..debbe829bdf 100644 --- a/gcc/config/mingw/mingw-stdint.h +++ b/gcc/config/mingw/mingw-stdint.h @@ -46,5 +46,10 @@ along with GCC; see the file COPYING3. If not see #define UINT_FAST32_TYPE "unsigned int" #define UINT_FAST64_TYPE "long long unsigned int" =20 -#define INTPTR_TYPE (TARGET_64BIT ? "long long int" : "int") -#define UINTPTR_TYPE (TARGET_64BIT ? "long long unsigned int" : "unsigned = int") +#if defined (TARGET_AARCH64_MS_ABI) +# define INTPTR_TYPE "long long int" +# define UINTPTR_TYPE "long long unsigned int" +#else +# define INTPTR_TYPE (TARGET_64BIT ? "long long int" : "int") +# define UINTPTR_TYPE (TARGET_64BIT ? "long long unsigned int" : "unsigned= int") +#endif \ No newline at end of file diff --git a/gcc/config/mingw/mingw32.h b/gcc/config/mingw/mingw32.h index 58304fc55f6..08f1b5f0696 100644 --- a/gcc/config/mingw/mingw32.h +++ b/gcc/config/mingw/mingw32.h @@ -19,7 +19,9 @@ along with GCC; see the file COPYING3. If not see . */ =20 #undef DEFAULT_ABI -#define DEFAULT_ABI MS_ABI +#if !defined (TARGET_AARCH64_MS_ABI) +# define DEFAULT_ABI MS_ABI +#endif =20 /* By default, target has a 80387, uses IEEE compatible arithmetic, returns float values in the 387 and needs stack probes. diff --git a/gcc/config/mingw/winnt.cc b/gcc/config/mingw/winnt.cc index 1ed383155d0..2a4fc03fc56 100644 --- a/gcc/config/mingw/winnt.cc +++ b/gcc/config/mingw/winnt.cc @@ -224,6 +224,8 @@ gen_stdcall_or_fastcall_suffix (tree decl, tree id, boo= l fastcall) return get_identifier (new_str); } =20 +#if !defined (TARGET_AARCH64_MS_ABI) + /* Maybe decorate and get a new identifier for the DECL of a stdcall or fastcall function. The original identifier is supplied in ID. */ =20 @@ -250,6 +252,8 @@ i386_pe_maybe_mangle_decl_assembler_name (tree decl, tr= ee id) return new_id; } =20 +#endif + /* Emit an assembler directive to set symbol for DECL visibility to the visibility type VIS, which must not be VISIBILITY_DEFAULT. As for PE there is no hidden support in gas, we just warn for @@ -266,6 +270,8 @@ i386_pe_assemble_visibility (tree decl, int) "in this configuration; ignored"); } =20 +#if !defined (TARGET_AARCH64_MS_ABI) + /* This is used as a target hook to modify the DECL_ASSEMBLER_NAME in the language-independent default hook langhooks,c:lhd_set_decl_assembler_name () @@ -278,6 +284,8 @@ i386_pe_mangle_decl_assembler_name (tree decl, tree id) return (new_id ? new_id : id); } =20 +#endif + /* This hook behaves the same as varasm.cc/assemble_name(), but generates the name into memory rather than outputting it to a file stream. */ --=20 2.25.1