Message ID | PR3PR83MB0425819A14FFAEDB88418473F80E2@PR3PR83MB0425.EURPRD83.prod.outlook.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> 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 CAB593858CDB for <patchwork@sourceware.org>; Thu, 18 Apr 2024 21:48:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2116.outbound.protection.outlook.com [40.107.105.116]) by sourceware.org (Postfix) with ESMTPS id 5ECDD386101D for <gcc-patches@gcc.gnu.org>; Thu, 18 Apr 2024 21:48:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5ECDD386101D 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 5ECDD386101D Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.105.116 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713476891; cv=pass; b=Vv8hKvhJz6VW/d4MwCsBq0KJkINZ+oLDYxxe74+43/Jwn6lqOnrnHrKC/lX4VEEMkCTDHc1AGpk/Fze3W9tbpr6AXZtEMDDX9/pBHQHJQTWR7W3LGgfgfYrHEMkyFNJL1hc0WXlqGO77lmjYYLzW6qA6Mk8RKV+dg68KAFVHaPg= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713476891; c=relaxed/simple; bh=rA8Tzjicg+9am7K+FHhcGSDq/8dMvU8qLABpYt9tCoM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GdVwpfE9CqefgetVUZGDyfmohgzv2yyXY2sZZn+QkIDKL+or+pmXo5qlvf8Uu7A+oBPZ0OOF/zLwTC3Yo2ruRr+sk3SHCX5BUePexXXeqShwV9zWL5yZXFygQT6yg4Lrnd1r139B2jMV9VtRAK9MXwjRB3ifyPxgxp7zhIxvEw0= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RjbHDVD8UTPdY60gaj/xDq0kCdnvteVNtdfpSng7l9gzCem3HP4E6mgF7TqjXck+9yNeAZHEyPqO0dg5xyb9QnVhFXV/fsOrZoZl7bsBJwCdZNf+j3AeIYkgOPXrFKtO+D9V24J5t3C/CAUPDOM2N35fGbyVVeuU9svC4H+JDnOd9MB/9HB8oUZ2mBWSER6ouaOTter+PsSTCiUzHF0lUhZ9BrBJWkdhq2PKQv9RtoacH+jHT1LEZGhxjU/IcO152JBvlJYCYJuE4CZ5m7ULiz+8ZjAr3bPrmiQzav2NLVgKnlyWLkSM3NzqxoAGrwOyW+gDs5/rfr69pYDiYyBs0w== 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=Oem8EmIK0B/WV0aE79239FBJm4m7GF2ChLgXmZ50Gyk=; b=hvQ3iqJ7Oj1OgU6247nuHm9Ccho+Pfi0avpH/7+v6nmMTaKLoyXznDf1k1qKe++yubEPYgLVO0SlkBJkc3IPdPuI/MRfbE22iiiOK2okxcEvBxYjf4NxWnmIAK9QPdhpLJdgTHu4u/ZANBLq6G6b/YeULUBTmRB4w6hWJQ6QNg+MuHmgy/fiFS7YwKIdgdMFGCEFz+tHQefq2u6uoHjy/C+sL9S+/oo25jS78COggdt742Y0oqfu5P12gKS+y+VOXfG0WuYnVZuOmZxoEGwfCXXdy4xYh21LkZXV3diOsurb93VNw9XB9kvBHtbVo+JYb2mnwod+uS3YD8yy86LpaQ== 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=Oem8EmIK0B/WV0aE79239FBJm4m7GF2ChLgXmZ50Gyk=; b=hoptd/+iJv/PUm/IYtZZPFMW09EWRgRYbAKbkZ+iHUT6pyCvDXPmmtoGMZaw4NYwsOve+wmlpZyhw9evQbAYcMlM4GVDuCuH5lzKuiEgAEvBvQRm05sZo1OtljeASUhI1gQH3cXtKzXliAvVzhgqrKxYbxQyXzFsGk5sWZzIstI= Received: from PR3PR83MB0425.EURPRD83.prod.outlook.com (2603:10a6:102:5f::21) by VI0PR83MB0695.EURPRD83.prod.outlook.com (2603:10a6:800:218::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.14; Thu, 18 Apr 2024 21:48:07 +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:48:06 +0000 From: Evgeny Karpov <Evgeny.Karpov@microsoft.com> To: Evgeny Karpov <Evgeny.Karpov@microsoft.com>, "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org> CC: "richard.sandiford@arm.com" <richard.sandiford@arm.com>, "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>, Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>, Radek Barton <radek.barton@microsoft.com> Subject: [PATCH v1 5/6] Adjust DLL import/export implementation for AArch64 Thread-Topic: [PATCH v1 5/6] Adjust DLL import/export implementation for AArch64 Thread-Index: AQHakdoYSatMVzxJ50qI6vjj4Kv9cw== Date: Thu, 18 Apr 2024 21:48:06 +0000 Message-ID: <PR3PR83MB0425819A14FFAEDB88418473F80E2@PR3PR83MB0425.EURPRD83.prod.outlook.com> References: <PR3PR83MB0425E5A9911AEB3716BEC140F80E2@PR3PR83MB0425.EURPRD83.prod.outlook.com> In-Reply-To: <PR3PR83MB0425E5A9911AEB3716BEC140F80E2@PR3PR83MB0425.EURPRD83.prod.outlook.com> 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_|VI0PR83MB0695:EE_ x-ms-office365-filtering-correlation-id: 76307a13-041a-4b94-d74f-08dc5ff13b48 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|1800799015|366007|38070700009; x-microsoft-antispam-message-info: xfW37JUIFSJaUdiRv4Pu1aAOnzm/gHlRfteWN1aGjg3G6AWNbrf3F8WEQCEq/s/ezilBzRyQqYxur+ceJdDv7HvwfziKi4vIpx2YUNcaykxRgA6l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4z5PbUm1bWbf6Vhg/YITRcyOg5p84NOV45NaOzJTDY33tPaTj4O+FvUAsQ71BDjZVC2t03w7n45QYRUpu9XrHVCgHgxdKmEDZYHtCzBtMmphG7CKY1Y3Epnfj92enYuDrbSdffzCeD94/52sUn4LVfdLO0I9HIcRGC6MNQapr4iSZlExBD33Q== 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)(376005)(1800799015)(366007)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: 5LEqYSw0AaOzAYuKJuaV8CzA8zizBdILvfEn17Zk2+6DMn0b4h9Xo5pnViZlAAbRfL/4zKObxIfpetEmD4MnOTgZzwoOFX1EAtylm/XZJfGlmeIr8LiyARtBsd1rEkL0flb83G09S1S0skE9Fwl9G5+vuzEr2mhN+pX2uHZKR+2OFVi074xHoSac6yYNVred75g+YApbSnEsNgfzggsIPahXQeScAtHh7eLpRiFNH619k7fbEn4zy+yb26insojkzGTL3mRoqV1YHyZ8XNVYqlB1czMbv9pP6fZ+fZXUdGhd8loaXhDd47j4WkDA8uCvQ4TTiE59DrhqV+IUhpdWXA+98dhuNobnDBhke6MQVqV2TOlu+nFJe7S0aMAE+715oQya/6nm0sh/B4RD7AXda0rTKj0tl8T1eJ7lCvabnU2iX6Mi7Ep3rIkKCFvkciUAtvmZe2hsolkslX/LHeOvlaUON/EX8lMvodFCBfOPxUo3pBlTozdQl3nzUK3Xk8LBSx8NhQpgxPAIpmjW0Z48VO4RoJIcFvSDMxuBawlllDVjXmcgcliUKYnYmHv0OEJWYh8XzuUa2NVpfn/sJN+x0S89gp+qNXGIPwu0vsF06HSwMxrukahYRhszRzFYKUKrQi1rBSOpHOoOR45a7tRWXfVh6m/Xfn1LKQ7tqZdftMj6etwlBbzE5oyNTw+BuwHIoeRqqWStK5h2tMq1BkJlKOb0bH159j5qurUZwTajKqgCjix7wmDLyhSJoiA5ZkGOnbQmpHN0ZWMyAHKbeG/a7Gl/wAY2nU/Eq2e8SdyT47r1+IkFCAVJdunHPdNgcuaeD9Fss5ZSGprgHkL3zI2pXj8kHdsiX1I/ZQSYapHoE49RO4gpM4rN1DB6TNM6nevGeHOnoM9h5718DKtdsRxUKNca1Spe8JJTjOkqZ37qQ5f4WNvj7dlN1GQmSBCcUiuW667CjSj0Ie6hMHRTelaXgSNNU7gV+QnFrgLfdaA7cesxJiqKpGhWYRflwJNm4FMbJden3GQ9aFKtyDVE1LrbzsTQ3DNrzKk9h5fsGpGIWkWl67UkBEvpxhh8yo17WqMlXEk11mkPHXhBSmrTSarSHKjBU4GU6pdxn8Lhli/R+oF1p+HFwhqEZgH032BIiDjzOBBEYDnMKhkdoyhegRzQ9zk6th7UDbHXXH18viYyFwYowPyn2BZOHy783P1sDn+uoqTChP7lfrEcVdAjLu8SUm0ImiiotgkBQacI9n+HSqBl9Of7OxXLI12TZTYTRQgnr7c0STyO4lzwkhcTRAfJa8MupUBlQrDnE07zz2UWANQbt4LB1ytr0ZN7EzqRT0JWQs04X9HGSpa7qzRWQx/VBpP1S5xDf9BiRfB4mzUJT3NSS6wkgasgArrGIjGPG+4AKaXSd6VyGmV5xGtzKUKGhvUDxM5WQHhuv6mSVS4YJSsMK9cRQ1wnnA0KzS4QNmT9joCK9RuViJP8fYtT6lQ1paZWyQN+Mh5udvikvLTHDdZYxPUwX6nWCa89PM9PLy+uZXXnkkrIltnbzNFjS5cmVXtgZDles37SAs91DaHG3aqotHo3DVn+ttJA06uo6AX1 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: 76307a13-041a-4b94-d74f-08dc5ff13b48 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 21:48:06.5970 (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: rSBLtCYRmYWC8H3Tkl6AhGEmpB7RH39c/hJgBi8Lvd2TsBt5drD53WENI8I0GkkpQTBVU/VLPXdT4XjcDf7Oog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR83MB0695 X-Spam-Status: No, score=-10.8 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_NUMSUBJECT, KAM_STOCKGEN, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org |
Series |
Add DLL import/export implementation to AArch64
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | fail | Patch failed to apply |
linaro-tcwg-bot/tcwg_gcc_build--master-arm | fail | Patch failed to apply |
Commit Message
Evgeny Karpov
April 18, 2024, 9:48 p.m. UTC
The DLL import/export mingw implementation, originally from ix86, requires minor adjustments to be compatible with AArch64. gcc/ChangeLog: * config/mingw/mingw32.h (defined): Use the correct DllMainCRTStartup entry function. * config/mingw/winnt-dll.cc (defined): Exclude ix86-related code. --- gcc/config/mingw/mingw32.h | 2 +- gcc/config/mingw/winnt-dll.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
Comments
Evgeny Karpov <Evgeny.Karpov@microsoft.com> writes: > The DLL import/export mingw implementation, originally from ix86, requires > minor adjustments to be compatible with AArch64. > > gcc/ChangeLog: > > * config/mingw/mingw32.h (defined): Use the correct DllMainCRTStartup > entry function. > * config/mingw/winnt-dll.cc (defined): Exclude ix86-related code. > --- > gcc/config/mingw/mingw32.h | 2 +- > gcc/config/mingw/winnt-dll.cc | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) Could we provide some abstractions here, rather than testing CPU-specific macros directly? E.g.: > > diff --git a/gcc/config/mingw/mingw32.h b/gcc/config/mingw/mingw32.h > index 08f1b5f0696..efe777051b4 100644 > --- a/gcc/config/mingw/mingw32.h > +++ b/gcc/config/mingw/mingw32.h > @@ -79,7 +79,7 @@ along with GCC; see the file COPYING3. If not see > #endif > > #undef SUB_LINK_ENTRY > -#if TARGET_64BIT_DEFAULT > +#if TARGET_64BIT_DEFAULT || defined (TARGET_AARCH64_MS_ABI) it looks like this is equivalent to something like "HAVE_64BIT_POINTERS" or something, which aarch64 could define to 1 and x86 could define to TARGET_64BIT_DEFAULT. The name is just a suggestion, based on not really knowing what the macro selects. Please use whatever makes most sense :) > #define SUB_LINK_ENTRY SUB_LINK_ENTRY64 > #else > #define SUB_LINK_ENTRY SUB_LINK_ENTRY32 > diff --git a/gcc/config/mingw/winnt-dll.cc b/gcc/config/mingw/winnt-dll.cc > index 349ade6f5c0..294361fab4c 100644 > --- a/gcc/config/mingw/winnt-dll.cc > +++ b/gcc/config/mingw/winnt-dll.cc > @@ -206,9 +206,13 @@ legitimize_pe_coff_symbol (rtx addr, bool inreg) > } > } > > +#if !defined (TARGET_AARCH64_MS_ABI) > + > if (ix86_cmodel != CM_LARGE_PIC && ix86_cmodel != CM_MEDIUM_PIC) > return NULL_RTX; > > +#endif > + Similarly here, it feels like there is a concept underlying this check. Could we just use: if (!NEW_MACRO) return NULL_RTX; with NEW_MACRO describing the underlying property that is common to medium x86 PIC, large x86 PIC, and aarch64. Thanks, Richard > if (GET_CODE (addr) == SYMBOL_REF > && !is_imported_p (addr) > && SYMBOL_REF_EXTERNAL_P (addr)
diff --git a/gcc/config/mingw/mingw32.h b/gcc/config/mingw/mingw32.h index 08f1b5f0696..efe777051b4 100644 --- a/gcc/config/mingw/mingw32.h +++ b/gcc/config/mingw/mingw32.h @@ -79,7 +79,7 @@ along with GCC; see the file COPYING3. If not see #endif #undef SUB_LINK_ENTRY -#if TARGET_64BIT_DEFAULT +#if TARGET_64BIT_DEFAULT || defined (TARGET_AARCH64_MS_ABI) #define SUB_LINK_ENTRY SUB_LINK_ENTRY64 #else #define SUB_LINK_ENTRY SUB_LINK_ENTRY32 diff --git a/gcc/config/mingw/winnt-dll.cc b/gcc/config/mingw/winnt-dll.cc index 349ade6f5c0..294361fab4c 100644 --- a/gcc/config/mingw/winnt-dll.cc +++ b/gcc/config/mingw/winnt-dll.cc @@ -206,9 +206,13 @@ legitimize_pe_coff_symbol (rtx addr, bool inreg) } } +#if !defined (TARGET_AARCH64_MS_ABI) + if (ix86_cmodel != CM_LARGE_PIC && ix86_cmodel != CM_MEDIUM_PIC) return NULL_RTX; +#endif + if (GET_CODE (addr) == SYMBOL_REF && !is_imported_p (addr) && SYMBOL_REF_EXTERNAL_P (addr)