From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2095.outbound.protection.outlook.com [40.107.22.95]) by sourceware.org (Postfix) with ESMTPS id 5FC90385829B for ; Thu, 18 Apr 2024 21:35:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5FC90385829B 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 5FC90385829B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.22.95 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713476158; cv=pass; b=ec4V45/Bz4eczVveM6e/u6e2dBJchvPQHZg6EJzwMPkoOCWJWx2taHUdpZZ+cUBpIXkkHYySESLhOC1r3VuZCPRfBj3ZxW6JpqIs8+nJyTA90xslukwJX+Wtf6oTT9EDdk/lrBRZN/YkBqzIWbQaB4skulRKdLOxNHNm01p8JMo= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713476158; c=relaxed/simple; bh=OkArSC1zEETIMIN3PQSqxkhPewN7pEKNgGaYZKNsu68=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=joNiespH6KJcEOgPjoN7uBTubGOB0APR2MUMwsk601yYWL2lRFWzjkyu7gghnTrv1+veszReGXISbMGficTiYfg7wWHtqeez1deWzhkYBegYbWmOHJMOzMZhxbU1scJbiR85Fm4DC12GVxdkKQuXvM2EICJyGaf+THBV4jy63FE= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S+0PB1l6BbTutjYC1U5V2xOzHmVpYXBrOIMg78xvBC2gjMpCzLgS1Y9mVaHD3pC8c87GBoEA2I/k/purAyk+u1jGrur8URz/oD5i4SuoqLKgPcdm/a/KeC83ybLgyEJs3DovgAcHGhTae5TrwmE9H7PfJlL2HzhR5WpKko+1FRG1NSKXi9l9gopKeFk5jrSqnCthUUeBbWU1Bc6iocvDPUZ64G8y3dI6mk4VZM/oGC1hvEM3rHl/mQ1GMIPm/HzXFkBlxmzqAh1A0MkaHcQ3pM0cevLZOoMq0ltuP3kXbMfqz+NMfLDqzx0Lr2tYjBln+ZAWOTOhapSJMzz7J6Z0Og== 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=FWVMRCtB+KMJuFlAr7LKVAeBEMN8ul4JoS+aWiFbH6M=; b=fn+f5nSy0wYtQf33tJUXQYbIOjBlq+wkYD8A+LZh2ud0BI1QxgYk49Y71TfdoS0A+a7/Ew39nzl/M9WGqMUJSWGOkytjX58Gn/mb9stu5jLeqFXuutNkNp9UIq1wY0Rsck5nHkgu7HqqalBy3lTnenH8jGIb4wliZif/5ftINUUuFJ1IQCJPqWHK4wJk4xmV4XC8Is0ngTkEIYmnkIyMdE4RwTbye8CHruzz32eT+Maa2djvkMGNHGXJNOnZxg9pmcwJXHlqRKl36uy884eMryCUxQDgkqHxXvmk+7u7m86LYVVBG18Wc4AC4kO2QyG7UbJsJmI8uBO3/l6JFZhdMA== 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=FWVMRCtB+KMJuFlAr7LKVAeBEMN8ul4JoS+aWiFbH6M=; b=PhIshhtfvvOBpJ2s6XSdg6qcn840pQYkYagJIYiedqO0e4tElhpo04AEANrKernUSc4HtqRV/2upu5qs8ulKhVbCVg1mNNw7LM1qjkf1sKa45iM0g49dksNGOERrECgbeNSHhJra4OgPWjoPMkDcMh3rHbrWK/50NXTGa63RFCw= Received: from PR3PR83MB0425.EURPRD83.prod.outlook.com (2603:10a6:102:5f::21) by DBBPR83MB0563.EURPRD83.prod.outlook.com (2603:10a6:10:533::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.12; Thu, 18 Apr 2024 21:35:53 +0000 Received: from PR3PR83MB0425.EURPRD83.prod.outlook.com ([fe80::2303:5667:fa24:79c2]) by PR3PR83MB0425.EURPRD83.prod.outlook.com ([fe80::2303:5667:fa24:79c2%7]) with mapi id 15.20.7519.014; Thu, 18 Apr 2024 21:35: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 v1 0/6] Add DLL import/export implementation to AArch64 Thread-Topic: [PATCH v1 0/6] Add DLL import/export implementation to AArch64 Thread-Index: AdqR1zLdB0RlE3SfRYWk1dD+nUW02g== Date: Thu, 18 Apr 2024 21:35: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=7edbbdf7-0382-4215-8fdf-996305ff5b5e;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-18T21:26:39Z;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: PR3PR83MB0425:EE_|DBBPR83MB0563:EE_ x-ms-office365-filtering-correlation-id: 3885e6e0-f233-46d1-bef6-08dc5fef8476 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|1800799015|376005|366007|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?PASt4aO/hdIbru6tBXrWTBG7fEP4VvPs0fyJWxMoCLnflBpxS+9rXLR+XQHy?= =?us-ascii?Q?aR8Vr0MhyEw2B6fzDb4++FhnfJFCCSZUZhF1S3TG4+YSrUoFx3IKeQCkXsyv?= =?us-ascii?Q?GOTVaNOm4AKUOH5rhqJRuCLQoZJZqJ0H+QHuimJWqWsiKTddyDSBfrxugsaA?= =?us-ascii?Q?Igaf7fNAyvYv0tgiHHTd/AINYlMLgf3yBjvJntq5N4fh5elmi8+kR/X/bXhZ?= =?us-ascii?Q?Z1mGHUXJ5PKdQJuHcwZ/BPykf7efuRFtWziP58TmAC0yrqOpW0fdi8PZuLNW?= =?us-ascii?Q?Oe8TsjjtZPIK6C7sRtlMzAifjP7mrF3pDBoG9z/dVUkr31A6FU0vW+E8/IMD?= =?us-ascii?Q?SzWAQ5FMC64qdsqiiIWBtaQJN02qULGqPguHW6wRZ61di4S0Ln1+7tPSdU3M?= =?us-ascii?Q?GUWTFm54aDvcaMA5ZEFGyvURYLcJajYMJa546TzEi/lq/NYe2vAjinNSYNHu?= =?us-ascii?Q?VdJZ0n1CuDa4jIM4He1C77RS3GvBTHM8IEl7lBw0Z6Wy2lFyx3ie5YLLT+rd?= =?us-ascii?Q?wlGsCMMCy/uNF1eBRc+QUUq7JnwmhQddTtfQF1SQ/RaCAXLVLabp38CqwNsL?= =?us-ascii?Q?NZVYnLVvWPGQbIvd2unJqkGMOgr5wkwzZNQJytUEEmBXiU6taYyZowIYklcL?= =?us-ascii?Q?GUR9lCg9l/qVC+8su9vQwn41jSREh70vhFiqDpnr+Iswton+MaoSWp/xbPl+?= =?us-ascii?Q?WET3qw4+yb047pj68ZaLxWCVc1L0Na+gR6R1v70CEvpg9cO/UX+E5g7vmJul?= =?us-ascii?Q?GhDCg5pVHBUN83vJPG5OgNzQVn99yUe4Nfq9YqE0E9gHiWS7360OI3T5ukbo?= =?us-ascii?Q?oPYnjKez/cD0LrYOfoHxxkZbtohY5fclQh2vWWkxBkHEnoEVbhL/W7BtVuP7?= =?us-ascii?Q?U+QZNp6slCTGQHNWGsYNspU1xeWVZYJgh/ZZG1y27oJM3G9HO9noOEXZkV9u?= =?us-ascii?Q?Xbu0FRodkj7w5RA4JGtiJmkRcWd1y90Oawfc23GTuzCjDai/pkl3OfLxSp2O?= =?us-ascii?Q?24X4zVtgllxKDG7EKOpYZ6u479zg3VGG7ybTmqA/uMtQH45Tg7NKW1dXiq72?= =?us-ascii?Q?aSGZKGE/e5tvYmB9J/ep5Idk2OlGA0TQe2YFP+JJAFbGaxk6IPPQIAise1n8?= =?us-ascii?Q?idyAx1KXAvgXMSFZNG+DjPqX6UAcyKNtOQLGJot5ILYX0gMh39M7nE7xTClu?= =?us-ascii?Q?H75pdn34/7+//FewapTj2DY7sr9CP+fCwQqL97idsZseXvKFuvi6doghUE6J?= =?us-ascii?Q?Jl5Pj6WAzZtboQ8Cvf4pAZIblOBnSFSiNQ+uJwCDAZ/oR8KUbCp2EotopFFP?= =?us-ascii?Q?ELY=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PR3PR83MB0425.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: =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08g/S8rrg/WQQ/RPtNwhIkDbGVXmDq47?= =?us-ascii?Q?ZXyhNU7PmLBymOi/fn0pjogpE9Ah2fy1TUARss1fRsHloP0CBy0CK74cp2Qp?= =?us-ascii?Q?cvKx4cnxGvIzFPhEJ69ZENAdUx0F0TeDHJCn80ygYIrT2p0eh2dQhTR2I3jV?= =?us-ascii?Q?zCBj/XFGK+/AOxBcVpnH4okmwO9FTsvtyvyqMsuccelA06xbRDKLZrtQe5YK?= =?us-ascii?Q?vIt/yNlfaEmBdYyPY2UsfRhT0VD2lLApUCkf8MgmLMU1Gnw2RC7S/VLkCrWK?= =?us-ascii?Q?FajE/B0Jy4sIDFWeSIIIEoK04CEurpEZKsm7k806k2FGEEW756ZP1oLoqzmu?= =?us-ascii?Q?a7j6H7NAwTrpRvxNi5uc5G7JB6vbKu88M6eq7Pib0EFzOZls4w3DLofRswAv?= =?us-ascii?Q?/knqzoC/JU6e1Yx2LqCjq5mQUlMR9yyhyMAahh0I0AH+F4LT5KnGOl2VQtqS?= =?us-ascii?Q?NjGhZ1Kd2DkbsY55RvvDyek0+WfBTgFhuTQHzgfFcIGs4jzu30DPOoPFa+SU?= =?us-ascii?Q?5b/3R8bpzTCIOsuXxNMRtaeRGcpoxJo/hkWlbk4CUwo27jUQsl2/GkaFxVVX?= =?us-ascii?Q?jw9auU/8aOzgVS33iiKbMZdCNOVIEPoQtubPgiSSwDLDGQU6S3lH4CFRkEEy?= =?us-ascii?Q?ox9WszGvFVw/v/xi3wx7kqnL8ulLJ3a2mZZ4Vl0wBUMFuLajQwSC58T8KcXu?= =?us-ascii?Q?9qXND0ButzFQa7jurt23wwPS39kZGR4pFRG+ZU7y?= 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: PR3PR83MB0425.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3885e6e0-f233-46d1-bef6-08dc5fef8476 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 21:35:50.3611 (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: XIbzxrWp4BgNc2EJK25CIndSOipZmfeMey9QJawdpicSdOjuHDAl+fSKNhk064tUP5M8PAycsrmkmcnV0u1+JA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR83MB0563 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,KAM_NUMSUBJECT,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: Hello, This is the second patch series, following the first patch series which introduced the aarch64-w64-mingw32 target. https://gcc.gnu.org/pipermail/gcc-patches/2024-February/thread.html#646203 https://gcc.gnu.org/pipermail/gcc-patches/2024-March/thread.html#647128 https://gcc.gnu.org/pipermail/gcc-patches/2024-April/thread.html#649261 The patch series aims at the goal: Extend the aarch64-w64-mingw32 C implementation to cross-compile OpenSSL, OpenBLAS, FFmpeg, and libjpeg-turbo. All packages successfully pass tests. The changes in this patch series are focused on reusing functionality for DLL import/export from ix86 in aarch64. The ix86 implementation for expanding a SYMBOL into its corresponding dllimport symbol has been moved to the mingw folder. Functions related to dllimport/dllexport functionality have been renamed for reuse in the AArch64 target. This patch series is implemented on top of the first patch series which has not been merged yet. It is currently awaiting the opening of GCC Stage1= . https://gcc.gnu.org/pipermail/gcc-patches/2024-April/thread.html#649261 Patchwork cannot verify this patch series. However, a link to Linaro CI wil= l be provided once the testing is complete. A minimal regression test for building main targets can be found here: https://github.com/Windows-on-ARM-Experiments/mingw-woarm64-build/actions/r= uns/8739609732 Regression test for all languages on x86_86-w64-mingw32 is in progress and= =20 will be also provided. Known issues: In order to compile FFmpeg, the optimization level should be reduced from -O3 to -O2. The fix for this issue is planned to be delivered in the third patch series. Thank you for your review! Coauthors: Zac Walker , Mark Harmstone and Ron Riddle Refactored, prepared, and validated by Radek Barton and Evgeny Karpov Regards, Evgeny Evgeny Karpov (6): Move mingw_* declarations to the mingw folder Extract ix86 dllimport implementation to mingw Rename functions for reuse in AArch64 aarch64: Add selectany attribute handling Adjust DLL import/export implementation for AArch64 aarch64: Add DLL import/export to AArch64 target gcc/config.gcc | 8 +- gcc/config/aarch64/aarch64-protos.h | 7 +- gcc/config/aarch64/aarch64.cc | 42 ++++- gcc/config/aarch64/cygming.h | 26 +++- gcc/config/i386/cygming.h | 8 +- gcc/config/i386/i386-expand.cc | 2 +- gcc/config/i386/i386-expand.h | 2 +- gcc/config/i386/i386-protos.h | 13 +- gcc/config/i386/i386.cc | 211 +++---------------------- gcc/config/mingw/mingw32.h | 2 +- gcc/config/mingw/t-cygming | 6 + gcc/config/mingw/winnt-dll.cc | 233 ++++++++++++++++++++++++++++ gcc/config/mingw/winnt-dll.h | 26 ++++ gcc/config/mingw/winnt.cc | 8 +- gcc/config/mingw/winnt.h | 34 ++++ 15 files changed, 402 insertions(+), 226 deletions(-) create mode 100644 gcc/config/mingw/winnt-dll.cc create mode 100644 gcc/config/mingw/winnt-dll.h create mode 100644 gcc/config/mingw/winnt.h --=20 2.25.1