From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2100.outbound.protection.outlook.com [40.107.247.100]) by sourceware.org (Postfix) with ESMTPS id 002353858CDB for ; Thu, 11 Apr 2024 13:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 002353858CDB 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 002353858CDB Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.247.100 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712842737; cv=pass; b=InnjiDY4pn/G4YWKhKWwt62bOBhSl+D+iG3LcVmhLn00rlFpdCAGmU2dh4qsu6v7b8SVhDgdP+dLFdvoK10VLyBdo5wFtBREMHNLg3wehxou5bOwhDN/Yimx0eAUQUfgHozz72h5GWyA5zUgvcfkOLKMvjcW4SHXZChrSMM3TTQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712842737; c=relaxed/simple; bh=mGrhtz2B/RL99++tNHFJ4a6pG84nACJTgkmAsE+3/zM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hSHzRt+QbOuX9G1stLcqT+gIT6f9StX0BIly+ojRH/t3V+V4whWHZX9bxbl0Bg/InX/kFeHl2O5Uk+3f2scYKMBzT7u1+HAXRuPwbPRTQFmmP0MLZDoDnfCTUBQtbH+tFO37oNymw8M6tiX5984tQIKJEG3Lj9LfIgrIsFbo4GQ= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RH8p6cmhVb2BTk2Fy+h5h0Rgmqd6nY8Gi4+rejhjUgutQrUv1OWkxpWrwryFuC4Cn8r0Pya5pEOfSm5XJ9vtpvCEp2t3x/JjiU+5qoS4tFw09I12dGsvEeBkGjZ6V7xxD8aMDDsTjrxM/GFHXperdRn9BNcSvfo2YySEOI4bXcRyj828am6jyql4jDjnCBe/dsn21d7IFLYGoiGD8VRwpzPMWdCCGdaFm1Fa6JaivZHiKvR4fvsj15FMlR3S1LzYYU30EgNm7e5PhvjJxEDoJeemJQ084EyPUS+HVth24qCQA4n0ABdCy9UXR8D+iqhCrmLLzF4qvYZUTuTs9FH5FQ== 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=UgUPTUrut+AR3yAumd0duuKzx/tCkDg3k4kClPD2Pjg=; b=VQBc7nP0BfTCT+/31qVtD5IoqMiYiYSeK2lmwmI73DnlpVuTxRsZWAHq9svZWedWqGEoLTNaRETE+QkCJznLTJ2gDLBgCmDbsKcG6WDtGH/I+pdxILUqcgpfGUziZfNiTWFQ+TXxfPiLuOZWVlCmDddmWhaGNXEkSube+hFoqnSoqAh44a+sUTW4iR2PD7AtUIcB3lp05j3lRE7WJhVOIi6zkG/BXd8k5UKuJCgJv4qTgjOPEaZFHhhNB3joSHXprEj22r191nBfzqBgSYnWMWIVjelUoYEAjAf9G4MAanFGaHa6B+2jt5xv7eQOXB8uyG8uQ7tYfa+WUPQ7sgK/4w== 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=UgUPTUrut+AR3yAumd0duuKzx/tCkDg3k4kClPD2Pjg=; b=PdAu3I8WPW8vOGym+2KrT2DnqOR5dR8s6s3yT0ZKVckHYk99RgLWn+4vLsPzBgqGO1+KCBdoiflrr7McztQxyCJnV8oQXJvpLGFNPH2Qfngg3IWXkfYJATBirYmwNQN95m9ZiIzgC2O+cOF7/6QHQfVNEsVyrg3YuBhc6FPN4bQ= Received: from VI1PR83MB0431.EURPRD83.prod.outlook.com (2603:10a6:800:17f::6) by GV1PR83MB0574.EURPRD83.prod.outlook.com (2603:10a6:150:162::22) 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:38:50 +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:38:50 +0000 From: Evgeny Karpov To: "gcc-patches@gcc.gnu.org" CC: "richard.sandiford@arm.com" , "Richard Earnshaw (lists)" , Maxim Kuvyrkov , Radek Barton Subject: [PATCH v3 00/12] Add aarch64-w64-mingw32 target Thread-Topic: [PATCH v3 00/12] Add aarch64-w64-mingw32 target Thread-Index: AdqMFVTIARQIfSI8QFakRPSMyc9McQ== Date: Thu, 11 Apr 2024 13:38:50 +0000 Message-ID: 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_|GV1PR83MB0574:EE_ x-ms-office365-filtering-correlation-id: 3b19a25c-4055-45c8-3f5b-08dc5a2cb8f0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5MXM4J+LvMzDVOMa1T+EaLqE4EtgyXJgl1+D1mOG+fWXfqhiWA0rULnInqfO7e/DC484le3z4ffguH45/RfPEXGdBI4QIvuvUiAsNoMVYFv5PYYLHJTMc2RFU6+s61te4DuZ3acDRKt9f6/Rh0/AHQY51inkEOKcIX8rdDMSQ/kGkx9iVz58QZrTmFEqnKKJN+0KibBF+IcnW4jPrj0ry1KpGA4twDpnwjHHAH10pg0F95UmTLcTZV+pGHAqfUz6n1ncnmVeh0UZvRLrXktQi1f0fRxY7UXGZKKoec/pAhu8FsYZS+JNSdTo9qPa5e7/TTCKJVGutvo/q5DW3rPc0e9AcrCpX87ig7C7UMUuevWfcDVrT8WlOtneFiRpMOmaBNvuSX9Jcnj2zcl1owDQoKNpgrIcpZ6Me1X+55OIuhcq8tr+1so/y2G+GuXwj9h1D3/aFbSR7oCpsSk9G5bjQiOKkdAoOkgDENm36ab7mv2+DBA7ZzOqNJmbUiqxfKl6m5Ju3r+ySyFTgU7DvbaEWFFDrj1drTPb6GTHBWeoDv5MWjQWMpudnvVKGIBHUSkyfS3JVXT/s00XM08oZF4P3p0otWFUsOibCvHVX0lykaVB8B45SHTjF1entJLvDXttZrsQUnlYXxkbriW3TDwGkPGP4HVGYNSLdUYLo3/0DHWJqbG205EfojrQQ4DqqCiwN+5ikbt/gRRaMrpiSwMjF97tFaCPYVNztW/WgmGHETc= 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)(376005)(366007)(1800799015)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?JEszaAxK+c+tR1HN10Is1iFk9Cqcs1+V7dJADWNJZP38TIqFTIAjsWeS9yNn?= =?us-ascii?Q?V7nh9opOmaRtBAAff9n8FID83mC2eJUuclpqlB6xNVl2257wTBXAuNbYKksJ?= =?us-ascii?Q?7GaP05uuClt7horDbcsUOmmEj4XvNYvjyfmW1/VlD7e6196/A7VMoYN0EH6e?= =?us-ascii?Q?sKeILmt4sytIBAEeADAX28segkgZkOvwqjVaclwZ/ouGHfyn3gSqpc9y7J/c?= =?us-ascii?Q?h9sA/HEABN/pkstn/iJxnp2k/miXH7f/Hg198UZE18Nv6LP4DQRszbCgKMzD?= =?us-ascii?Q?8D9uK0tQpQjK9ARAmUTj6leBY0cWRPpteu3XU0FfknLlCrBb1G3gLIRk9cmS?= =?us-ascii?Q?XtkehWtqgBTyxyJd613w+pfzOyA3ChOE4lsueYC6YgAnMyl+nOFZXiZy6YUC?= =?us-ascii?Q?5xTTueh6uzp4vhN4aT0yalDFkNYSveyENwKSCJM6kjdmIXEVKPfmTT08ylhC?= =?us-ascii?Q?Mzih21TDVe4bcnFEYz3Kvdur1OnAveZoio6TWpRlLRFQ0/6R7cxzx4JaADWG?= =?us-ascii?Q?iCnSZ43UB9P0JDLPJDnN4MwN3+KX20kprfexJcYocW8gp2HyQGY+PhvdSnbr?= =?us-ascii?Q?pqvf/rvInP5xRbWWU11FVNx2a0sxez0ZXyi1Hbp6bHfXpi7yMB+kpV+KD4Rl?= =?us-ascii?Q?tFDAlqq+vq9/Opv3H3VVxqIu7sJX9DfhfPEw67TUNC83pV0tLHDFkotLplUD?= =?us-ascii?Q?GUi5iyw0oV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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: 3b19a25c-4055-45c8-3f5b-08dc5a2cb8f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2024 13:38:50.7339 (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: C99UsEt6jeQIyeu7kwIQkKcK5fatH3cp/WgZ1gvrvhC8iMjm+YUy1LUmf/LBj/SrTSzN6nSAAtjZgNref8bheQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR83MB0574 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,RCVD_IN_DNSWL_NONE,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: Hello, Thank you for reviewing v2! v3 addresses all comments on v2. v3 Changes: - Exclude the aarch64_calling_abi declaration from the patch series. - Refactor x18 adjustment for MS ABI. - Remove unnecessary headers. - Add an extra comment to explain empty definitions. - Use gcc_unreachable for definitions that are needed for compilation,=20 but not used by the aarch64-w64-mingw32 target. - Retain old index entries. - Rebase from 11th April 2024 Regards, Evgeny Zac Walker (12): Introduce aarch64-w64-mingw32 target aarch64: Mark x18 register as a fixed register for MS ABI aarch64: Add aarch64-w64-mingw32 COFF Reuse MinGW from i386 for AArch64 Rename section and encoding functions from i386 which will be used in aarch64 Exclude i386 functionality from aarch64 build aarch64: Add Cygwin and MinGW environments for AArch64 aarch64: Add SEH to machine_function Rename "x86 Windows Options" to "Cygwin and MinGW Options" aarch64: Build and add objects for Cygwin and MinGW for AArch64 aarch64: Add aarch64-w64-mingw32 target to libatomic Add aarch64-w64-mingw32 target to libgcc fixincludes/mkfixinc.sh | 3 +- gcc/config.gcc | 47 +++-- gcc/config/aarch64/aarch64-abi-ms.h | 34 ++++ gcc/config/aarch64/aarch64-coff.h | 91 +++++++++ gcc/config/aarch64/aarch64-protos.h | 5 + gcc/config/aarch64/aarch64.h | 13 +- gcc/config/aarch64/cygming.h | 172 ++++++++++++++++++ gcc/config/i386/cygming.h | 18 +- gcc/config/i386/cygming.opt.urls | 30 --- gcc/config/i386/i386-protos.h | 12 +- gcc/config/i386/mingw-w64.opt.urls | 2 +- gcc/config/lynx.opt.urls | 2 +- gcc/config/{i386 =3D> mingw}/cygming.opt | 0 gcc/config/mingw/cygming.opt.urls | 30 +++ gcc/config/{i386 =3D> mingw}/cygwin-d.cc | 0 gcc/config/{i386 =3D> mingw}/mingw-stdint.h | 9 +- gcc/config/{i386 =3D> mingw}/mingw.opt | 0 gcc/config/{i386 =3D> mingw}/mingw.opt.urls | 2 +- gcc/config/{i386 =3D> mingw}/mingw32.h | 4 +- gcc/config/{i386 =3D> mingw}/msformat-c.cc | 0 gcc/config/{i386 =3D> mingw}/t-cygming | 23 ++- gcc/config/{i386 =3D> mingw}/winnt-cxx.cc | 0 gcc/config/{i386 =3D> mingw}/winnt-d.cc | 0 gcc/config/{i386 =3D> mingw}/winnt-stubs.cc | 0 gcc/config/{i386 =3D> mingw}/winnt.cc | 30 +-- gcc/doc/invoke.texi | 10 + gcc/varasm.cc | 2 +- libatomic/configure.tgt | 2 +- libgcc/config.host | 23 ++- libgcc/config/aarch64/t-no-eh | 2 + libgcc/config/{i386 =3D> mingw}/t-gthr-win32 | 0 libgcc/config/{i386 =3D> mingw}/t-mingw-pthread | 0 32 files changed, 473 insertions(+), 93 deletions(-) create mode 100644 gcc/config/aarch64/aarch64-abi-ms.h create mode 100644 gcc/config/aarch64/aarch64-coff.h create mode 100644 gcc/config/aarch64/cygming.h delete mode 100644 gcc/config/i386/cygming.opt.urls rename gcc/config/{i386 =3D> mingw}/cygming.opt (100%) create mode 100644 gcc/config/mingw/cygming.opt.urls rename gcc/config/{i386 =3D> mingw}/cygwin-d.cc (100%) rename gcc/config/{i386 =3D> mingw}/mingw-stdint.h (86%) rename gcc/config/{i386 =3D> mingw}/mingw.opt (100%) rename gcc/config/{i386 =3D> mingw}/mingw.opt.urls (86%) rename gcc/config/{i386 =3D> mingw}/mingw32.h (99%) rename gcc/config/{i386 =3D> mingw}/msformat-c.cc (100%) rename gcc/config/{i386 =3D> mingw}/t-cygming (73%) rename gcc/config/{i386 =3D> mingw}/winnt-cxx.cc (100%) rename gcc/config/{i386 =3D> mingw}/winnt-d.cc (100%) rename gcc/config/{i386 =3D> mingw}/winnt-stubs.cc (100%) rename gcc/config/{i386 =3D> mingw}/winnt.cc (97%) create mode 100644 libgcc/config/aarch64/t-no-eh rename libgcc/config/{i386 =3D> mingw}/t-gthr-win32 (100%) rename libgcc/config/{i386 =3D> mingw}/t-mingw-pthread (100%) --=20 2.25.1