From patchwork Mon Mar 4 17:43:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Karpov X-Patchwork-Id: 209658 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1576929dyc; Mon, 4 Mar 2024 09:44:16 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCXrA9BLQVma1VjiYMzU4qwgU27d5a8IghpvvGLFdIJgItGFn8kZfBnpoqrh/BY3oZF6behnrkn6Nh2j4wxNTUPq9fPUtw== X-Google-Smtp-Source: AGHT+IHgUO5mVuAmNq2/Nmq/oexSMAOdiweSB09/oS+BIkwvZKnr597VbrDP8Amdd1v2QNuFJWre X-Received: by 2002:a05:620a:7e7:b0:788:310c:f87e with SMTP id k7-20020a05620a07e700b00788310cf87emr1149250qkk.5.1709574256418; Mon, 04 Mar 2024 09:44:16 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1709574256; cv=pass; d=google.com; s=arc-20160816; b=fAeedq70zIjP0J4As7zsWz7AHyYnSdQGPQe+rSZPEWniqTPw3yykqCCtDHv1UdNBEX W4aqwzb+BklJra/wbsgmxH2ZL5uMyRMxYi6stl0+njedB1bszSXME965euXm2tGL9VAJ rIgp6YWnzHDlvi7LwSCWwJmNUjBuc4vz30MF1EA0Fc4Of3wkj4OWo+0GEg7HAx8LGgxU a8Cv8AsosFnmryePSUR4Vk6lSY3sLGBZ4Ccniu2HSrtvaNG99ZXCjb0Um3/hVQ+ZjoUI +UPcpLxLBW1ktvI7o5OtwwnyNlLGMu13BCIvuZIPFq9cgU8GXb+G28z/sFMBuHSwIYIO Hniw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:msip_labels:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=xxWga+cdWj62L4bFrm6HpZY2MgmB4z+5KIOZpvMm6ZA=; fh=+2oejmI9rg4HZgWvTrkP8qDufDd61kvBMNz7Wu2ta60=; b=dRQOsAgagfbO054374zWqtchtsY20hQonI0ckllJESWTEXTU3yQtQopaUz5p9Hlo1G 8vf+Bdn9172L1bDdHc+I6GwAgAQ/pXXz8kLmdgO8Gskmh3QhmrkNTR/VC9YAXsjptpj7 uaf5cn71/478n5aqIONo6SMYDL4YFptvggTIiW65XMqt8GCKvyiZFMjx+KjIgCuB3vG5 f5+6QBSIGcR+m2MIU/7zIEzU9GFOHIMaHhN/jOdeM0aBZqouUjbK0BbdguN3hgb6+0/z QTwuvj/OTurw72/3uukOInIgcJ7cuh7k2EWhUpgDETDGy3pZkZE+BO71mTs4U2IxpFv7 0XFQ==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=gJ9H4rmK; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w10-20020a05620a444a00b007881f769303si5312177qkp.269.2024.03.04.09.44.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 09:44:16 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=gJ9H4rmK; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21BD93858D33 for ; Mon, 4 Mar 2024 17:44:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2117.outbound.protection.outlook.com [40.107.15.117]) by sourceware.org (Postfix) with ESMTPS id 276C8385842B for ; Mon, 4 Mar 2024 17:43:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 276C8385842B 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 276C8385842B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.15.117 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709574215; cv=pass; b=VXnYIAe5/sjtbToz2gXq62EbIV2XOiLmfze3c3rSAt+rAUva8XTQcsleMACFOCO0AnzTVpLUOfoL9JGInQNPbZp82DbUoZY/paSUfbBbJFsFu7dOLSIE5M/t0hgrkY9FozzZRmnXXLcv4RJs8rzqclY6dNfsPZcXgNR1eNJzQ1o= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709574215; c=relaxed/simple; bh=fayN4atEGzFYQ5i/PS9zBfTtIahmKBS++Op0Cmahz3A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L2n/FExa2bnbSH8ICWhfLPVBn/TApGn6WYfCS0nEgQSlwC+d/IsT2VL6Ie1JgjKTarmo9BwtKZ2UggeCuhySAorIElYFXguOsRhUuuf0sjfEL+dzHh3UzVbIpYqkrQLkQ6AoNK0H8QyrCX0f1gRatLpLlTrKbN/E8jA26uFcqUI= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FEmYMZbppr6AlEFmAubwENaPELffvk/XEMj9POJH9HM8TojYMS7hSv2WlU00+CJK8yeLI+f8RJ8V8C1xJIzaV7QM/EiBBvPb/gB4ZYALIsmiykgl9UHuxgxz/ejfT82L4XjScVvDzMvmTz0MFQByqh1XuyCmh7M43GWkiovGzIBBQry3ldlWk4rhOVpOPI9yOxhELZkHA7m9oa45rOEPPGKqMx140cGNT34UyVAWdMeqN1crgjSkhrqycVxeTtQ27OphvYVYbAOKAEZNhz05wW/Xfd8lw02mVjc7Cx6fwaZ4VcbLECicLLm9B4UhVKAfrWm7it4k/wH/PavQjQFf1w== 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=xxWga+cdWj62L4bFrm6HpZY2MgmB4z+5KIOZpvMm6ZA=; b=f3I2b3vJb9KOb78socAETQW3+XNTBX0IV+2t10dfTHEC2Bw0eTkoKmGiWEEfaCky3CmF4gTHJ1C/40pclKiZ7z12wOChvAjtMoarr85xekwXY+gwE0P8RtoYxw07IjcqrpHCe8mWpHbGkvBlxXWhPm1yEsPNtNIJWIw0Bh2v4H3FuA01dkoVDkdgSeK7qAit0QmyHebJZ2rRHCvq+w8PvngDxj5LbHX9uEdcmJD728eP5UTLkgSuaMn/DoYw6mnwxdcY5JZP0rmgDtYhPwwjCD1sGr0dpLNACj1QZS8/tYWkJ+1QfG/6wPp5vqBrZy73dlkQF1HgvO+liMjEbg8T+g== 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=xxWga+cdWj62L4bFrm6HpZY2MgmB4z+5KIOZpvMm6ZA=; b=gJ9H4rmK1Jh18zeZpOMsVqRTDsjDJ5qZmlliMuqR7oeoAl+yHhb6aqh7ypboGsjXB+e8WNtarScmOci8XRlvPLDagbi6CXJYWCxNfry5XmNdGAskt1o0Kjb7yTkkdxVn9S0bovtSRJmW+7YCno/LHEi1VaSKL/MfDkg5OQ7tf+Q= Received: from VI1PR83MB0431.EURPRD83.prod.outlook.com (2603:10a6:800:17f::6) by AM7PR83MB0436.EURPRD83.prod.outlook.com (2603:10a6:20b:1bf::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.0; Mon, 4 Mar 2024 17:43:30 +0000 Received: from VI1PR83MB0431.EURPRD83.prod.outlook.com ([fe80::7279:eea0:8540:a0f5]) by VI1PR83MB0431.EURPRD83.prod.outlook.com ([fe80::7279:eea0:8540:a0f5%7]) with mapi id 15.20.7386.002; Mon, 4 Mar 2024 17:43:30 +0000 From: Evgeny Karpov To: Evgeny Karpov , "gcc-patches@gcc.gnu.org" CC: "richard.sandiford@arm.com" , "Richard Earnshaw (lists)" , "Andrew Pinski (QUIC)" , Maxim Kuvyrkov , Radek Barton Subject: [PATCH v2 07/13] Exclude i386 functionality from aarch64 build Thread-Topic: [PATCH v2 07/13] Exclude i386 functionality from aarch64 build Thread-Index: AQHablt43GXY62gr7kGtSUDpRm8A7A== Date: Mon, 4 Mar 2024 17:43:29 +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=804f8e78-f263-4809-bbd5-d515c5934d44; 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-03-04T17:10:26Z; 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_|AM7PR83MB0436:EE_ x-ms-office365-filtering-correlation-id: e94dd7d7-2725-4409-703c-08dc3c729aa8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0inAlki39HLp1mcB8cjo7grkuQRHaD0miHvb4j0ayKXkwBlCph+ffkiYH2dGS+al97b5GnfHKoW1b2SsLpWQYJC74T2NN4PdzicYcryHCXJqd93OW/xmeI66MZHTkX8y6nG+gGHUIL/ltIx7eEGE7KSF6ePcCjuyT06LO4tdD/ihI2/wesP98ZLdvBAVhfCJaywsVjdeCwaZXeiS/Z84knI814uGN0R5yqcbFb7OQsepFnGQI5AZMMnYA3jj1TWzRAAFD7U+slj9BCamxdqVFTiCEb0NrEnSpF6wokBQBs/VOMbMPouVJGCauQRVkvwACLZ+DBc9i2mEStowjqEjz84+nI061ALtdlj8zqCR0qeHnv07IiKTFy3E+/52dVgMTBHNkTE6qvcQS8J+iKk2SuqFCZy9ZDd5xThLNu/s3mDnaSwT/WgD+ZfBUKHkvKA3Tpe3xJq7/ax2uQS/g2b02AOczYy5d/oB4bocETbnKWuiUdLINfJz8dYi1DiiMXJaa+nojKBXM5MMsbWE3dL3eph6+TTLo0UONzAN3Bc/H28Z+V9g2Gg3Wt5GZbRTysedvbwESBAzGC76vMFYZRd1f6ePYigJm6uakbT0AAQQvfdWwharN2gkGXHx45mmZKnX3OYmpgrk3U9CzB8J+4K8z0iPFQ9Ac4c8pXWgoppeGuk= 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)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: FIuR0B+ZQ9LSzjnhbYHe1Tea4hA0ufl9fBqyNuFrtzvi4HUGJ7CkIQkmW/tiGEBGBkJFQjrTFoV2QFkMHQvfv8zhabedH3wXCoSRxO2VZfsqCHeDWvC7iw14R13Zcx2BPJeTjBTARver2Z1dgZOg/A0H4kgo+lrFNQ4CXgzzK6dvJsWSfMXYc3VoL5VWiEPmJtA6lkSc6u0v3KkjbvOdeVLJgsVqAIsDOEHCUogTznWvG/UxPyspymY4JTQhy+JPFAyFepP35ik8IkzLQwDyombwsN6/L3uBlpeOpw14rk3SZr8QF00juFMnotLK2rG+0lPVnRvrNVAXGPnsZspUzg6Cr/4roX4JFWTm+sN5I7h03sz2Fw1/RAyucDRBSx0Yh+3GIA7hfBZcb60m5SjMQ90By0k2fRioptD6hELD6L3RrE7TKOnDL5RyplEoW+w8t5gDUrF4KY5LRx65MUiTFqKdYLvhUEgLMwtWp0JVS3HUX3qHhoTJ6L8rALisIxcb5HI+5ee2hwX6Zht381vqRVGLPFHIi2b77jfZUZGJ2VHONlv3Vp5dR4A05L0EDNmUl7ut5WT3vye8u709ykoHovnwLNp/M3BVKxWV/tbNeBuQ+bkJtAq32KpKD2Kuaeav7MYHyubcaCD/BkzftaDW9sgWGjjPPCzw9HLuSJy3bNY33iDo+NWhn++SziFKQczRoTCd0r/CZvkQqfIh/5vLkepr2Pq+yX1lhLXr/9qAeF75tYcWFLnqHQB1sT/ha04WBJcJdtir0D6SDdFZebM861106fZUJ4sKDHj0vGxVMXDGY5ouE4JWG7ztkv8CBDmAaztmA6AsvXjh4Su8/55oNAcwI/zFymfu0Tac/kUaCjDgXiOgM5a4bxhOANRa6D1SPXr9Bm5lM8kP4MNmuHG/KbMQbUeyQ/Xyf+vkUBknElP8xIPUKPLpFoPibEKD+eKmBBToupckGlsFxQleENi50ZwEyvLygR/sAu7GL7FWqnsjLwNAVFvWmK1hL521W21VxpZxZ599zU2rAr74pHF9E8cjXBCKP98pevQSGxR+MVFfxwYiYj4bPoxgTHmtlWgB86Po+UjOtzhntMD5RhvNcsooOY4Kjy/62KFBQR5NtW+/fayfUTmbdvke9bcUG1Rt3su8we/sDSiCtDXSvpmtkEiw9J0Hueg/85/abypTSKrGFtdqaf+gT0jsn9t8zC13ExNqEoy3mHPQNde8nkRSUjgpx1S8KK9R6QR7T1Guy1VsS5uq+Menh6CDPGuDCnWSPVnqUfDGRiVlrmeCrdPKD253ou+5ZTSOB4Tfa4gKBKDQ+C53F+u+Z6jOflX/vDnUKEDCNzWvV+yPKf87KE63WscaIDFKJonzwbYExGDop8MGILIwnfTDZGS8nh+i7aeck8Cr/fAepw09g1I/RCuZb3balIRAOxJv1myJ5/YdevPsvyEysm3MQsxyvIEEPOpi7k3vdfSM0e4qZFO3bFgZj0nRrtXYZ1wbDsY4Irv6Wr3cHrF2IKrp3lQ4AV7vaVy6W5fKDpAOMn7piCDtEv9EVXvMy2NNHihhRdRVRddTWUMzzvn94+1kRy7nV8x9LuFD 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: e94dd7d7-2725-4409-703c-08dc3c729aa8 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2024 17:43:29.8172 (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: 1WDNlWfF6MoNcYYDjyweZvbxZ3V0UcCS5h2mdOf1GIGa2XwKb2IJQCaz2aD/7ni3CtcO4yTCMq1b1Gl2vn8IrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR83MB0436 X-Spam-Status: No, score=-9.9 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_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792618535301631918 X-GMAIL-MSGID: 1792618535301631918 From: Zac Walker Date: Fri, 1 Mar 2024 02:35:40 +0100 Subject: [PATCH v2 07/13] 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 | 6 +++++- gcc/config/mingw/winnt.cc | 8 ++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 26564ead079..3aca257c322 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1278,6 +1278,7 @@ aarch64-*-mingw*) esac default_use_cxa_atexit=yes user_headers_inc_next_post="${user_headers_inc_next_post} float.h" + tm_defines="${tm_defines} TARGET_AARCH64_MS_ABI=1" ;; aarch64*-wrs-vxworks*) tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h" diff --git a/gcc/config/mingw/mingw-stdint.h b/gcc/config/mingw/mingw-stdint.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" -#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..040c3e1e521 100644 --- a/gcc/config/mingw/mingw32.h +++ b/gcc/config/mingw/mingw32.h @@ -19,7 +19,11 @@ along with GCC; see the file COPYING3. If not see . */ #undef DEFAULT_ABI -#define DEFAULT_ABI MS_ABI +#if defined (TARGET_AARCH64_MS_ABI) +# define DEFAULT_ABI AARCH64_CALLING_ABI_MS +#else +# define DEFAULT_ABI MS_ABI +#endif /* 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, bool fastcall) return get_identifier (new_str); } +#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. */ @@ -250,6 +252,8 @@ i386_pe_maybe_mangle_decl_assembler_name (tree decl, tree id) return new_id; } +#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"); } +#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); } +#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. */