From patchwork Thu Apr 11 13:56:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Karpov X-Patchwork-Id: 1922559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=microsoft.com header.i=@microsoft.com header.a=rsa-sha256 header.s=selector2 header.b=XP6LoDk1; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFh8b4t76z1yY8 for ; Thu, 11 Apr 2024 23:57:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E87BC3858C32 for ; Thu, 11 Apr 2024 13:57:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2092.outbound.protection.outlook.com [40.107.14.92]) by sourceware.org (Postfix) with ESMTPS id 33C1C3858D1E for ; Thu, 11 Apr 2024 13:56:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33C1C3858D1E 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 33C1C3858D1E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.14.92 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712843816; cv=pass; b=LFHvd4kJ0CMcKdlJDIlIghcHJQCzIA8aC4C+RMo9l902GMFJVa3/8Yfie1uENdz0gxiOQtywDpAoQB/Ixg+vQj92qtu6DCKtmP4305rsfvSFzztXbXOavuhCoD0JGVA1iAkpDI05X+7A2fX0svRtOcgxiKh94gzEzYekVrtZvlY= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712843816; c=relaxed/simple; bh=gbbVR2Np8yBq8fkhxoRsILWXlZYx/BRxvAKWMklnu1s=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=niBQxgY2wwm8jHNwBh1iGUQxUGV21GFQgqfEjIqkUmnUwk6wfynrj6DLeKa/nGSVXeHs8hHyFdvMBRliyEnVasdV5a1SJePVlvD2L7+T6bLPOCsI3it0eYrSPjljeRzGdsEIagixf5t648jjtB9nn1pJKJXBKfrAxdzQ5fFKQDg= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dbBug8+03UWn1LVhHIbu1GTzDNKMiCabePsElrpKDbaRlvOKfk61rSJwMinzspt8F2dmRT35PCEWVdMmr2wC9qDWss0Uht5QwdL1JQJn8E9I/vwfD0Tq5UuBg/GXXRHfx9b/j0zR2JnMX+IhviD0L6cuodS0QmklRAmKWba1g5off5DSjBpqm9Lh+4OmnRgpGxDut+QY+epdEAXbQDkykfe5CEU+nqSz73aXzzY9LQOfQsBs7vQa3zL2oiltBIHC+e+bIr2hgS3wiqLo7krV41g3b+00fYhW1CFOakHqxXOyFoRxfxCAasqD+S9TDVoyd+tmWTDH+4ev9e2TewMkSw== 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=gXTG2WNpb0BfbYteXf0kJys1QVaQOMgM1atn1zhtUUY=; b=eYlJCM1yKXHsqXGcxwR1HuclVGX2Dm5nTq1rUhJYUGM7Zh0iMdfWBp7YLLAstEA9IyuCCmZeWtVEwRqU7WIr/sLokEAvTvoFUxFQ4s4quM3acZHTl3ZEvyZ/9RXdNEN04AbqO5ZNlRyMUYdeitQdcwKp62s9tuMkSHW2kis2KvZ/bGShI7+Pbj4wmEdToqWrlUiwce1Fb4gH0Uur51Y7f0H4hQqNF7pYfCrW0fb6HFTOp1YY2E+1/3Pgkypst+DsTN9LChz4nPNs5NB67K8gCdX1cefuB13zUbCKm/BdnZUq684uCsaes1bu9gBhJ2xjmGqcAnqRBAmSf9SVkWrmlw== 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=gXTG2WNpb0BfbYteXf0kJys1QVaQOMgM1atn1zhtUUY=; b=XP6LoDk1tbFgdsnZMW8G2obEPGW8s6TbNOZrRmoJAecc+ECbxC4lqJZwoW1TtZCnLC+Wg6hBCWATFSmprXLo6pM7z1NeTvWvGLOR/qV8vX20J4frZAWZZeBCjCbmpDwOkPQT4JHXgYfYosHcOFUv1oVAsSqMzrI0WzS8qcs/9k8= 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:56:49 +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:56:49 +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 07/12] aarch64: Add Cygwin and MinGW environments for AArch64 Thread-Topic: [PATCH v3 07/12] aarch64: Add Cygwin and MinGW environments for AArch64 Thread-Index: AQHajBgZcXUWemOqDkO7Wi709w+pvg== Date: Thu, 11 Apr 2024 13:56:49 +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: eccbc03a-ddd7-4a78-2bc5-08dc5a2f3be6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 99FBZCLFxiGvoccArArvAD3yl6RmME4z/RYXmeWrIwYn63JzoeMaS4k6NxP4bH1Qiss0ZR0ggiiTz3L3zbOK9o5PD1x9BiEzpWREgQKDMPKfJSV5FoHVB8UE1856m7Wcfh+/+YwHJX8xkvjURA2HrJaqDgDju6h7I5B53avlkq2LWxPbA44w2gymZSJx+RtYuXyZWH/zzTF3N18oX+QZQiIX4t4xTDUmUOw2P6OYMnrSILb6fdIyvevbZKzHervYuOL70ReEKQFDHQfEAnYdtgK7E9FnIfIlm2nlo1BIdqbdMzGe5imTAPwrdSy7p/gJWYLk3ojsaMZWBMlQWlfsSeqRl0yxTF46/eoOTqaFOIHoAvlvlBvdnVFDocIh2+ZNXdZd4RHvH/hqKkDBbphdp3unOTE5Gghmyx8HfG0WGSZSBBQZVR9tDvttU0Sy3HWjTbWcWAkEotdwcQojJMhb4KLZzg/QBJEqyYJw6aZhgf9EievYXf/t8YcYZJBcNV8Y29ZoycSJd5zp879zcvNousVqBGBHknCEndbKommUyu/6zlzwA8tXV5uReu1J99BnGkHH95hi1ff0AWkJUNvhJhyoHryw6LI0jeiRbMms9BAh0aASTLMW53JWlvQtERG95ClPxCpTYoHBw/SSn0E7s+T7zZGuPFgAJTCFiAQC+og= 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: Hx0Ue4565YIjfrZguqp2JiaZN5ddv3ibxuguPzUo/fPmh7YClKLPhyD20AKGkRVmy13sxSZEcRf7UiNmM4Yh/iEdkY0np/XTvKo4Kdk/HZl1skSyHtqa/qqOz+bqWfiPhI0VnAzzAwGTSsdwCAS1HzhWaZ3jmQiEF8XJ31X1rCcMXQ3SruXD+DtUWhtagXm3TpPmnXbENFF86Qp9uWSAfWT/q6np8TLMVr4fGfkCVCZDTld+hTgn6HHAkLUUp4fSVAvH9mjY7D6N3oV8rpyRVh8GsiCWlOkVRn7SaRUhVI8UgRFBHhMKqb3vUthz/dUTuiGYQ35v1QzJogILRYeccp4DmF5+bbiLoTx1T49+8T5qVk4+TnPibfBCstTg91wlm8MrDRrBGoqokwEOk1bEw7MDJFs4pjeTpnvN/CbBc4j36vd69s5HifCKijSBeKxd+EH4CX7RFCroVFykUeNrzZRQ1juoE4dcYaH1QKkN5fhB4joK+Tsd5Rmdk0ZhXU7CSIBHGkOlUshOa8Gp1t0JCnjdCPilL0WMbJ1fzrl6KBLNgVojN5J4Oy95LJvVeVAK0YN743Khq5teukOO0iikpX1bGqoKNMkJlFj/gdiXQtbkhRlhpPuxEhjGEsgT2C8hMs/Nlyo5/c81fBik1hUXPSCyRU3aG6V7iGuEKVtnaSMU6mSgNeFht9eOwhc0woFh9mIikryPsxcoTqF2b3eDmHP1fg9RcQWKIqZDrbA01iIvor1XAjCdo4e/xlVnlzqa4gTCTgXzSrVkl/Uzs9wJyu+kNhky9K0uBRmNC1P02GQ+8xCnfg14Ib7RNlaIzeIzY/u+mZ+ngqX92RjAtWkejsKzJY42PRZD19DEYtkUpfzfxBtmGyQDXOybMQ3zH7UyBQlpCqXBUi+teD0GNFgMpOKEJ0PKeGy+H2lqZUyr0oIHApXxdINEYb95tvEKS7ivikShqOTMHpDyDIzWFwW+bIIHSVdwoMNdNZCLJERc5w6Bq+iOsIgT4FoSaWZQFKo/p2deGzrrVSNt4+n4Rzazhw5PP5g6RSNMU4ldU121PTwRSU3lPYQTSdJL5bqNpqlpme0qvuCOrNrWqlQnkn3BeqTE5y13m9Iil+M0FTuoVlB4T7+DhIADJmVvT7RolWG9wXb6vQLcx4lH6cQ+umgm8vweqWijY6YTG98AjF/r43DPhYKq0INloBv6fq0m43+7K9D4jyqQC6zfc6lTpen11pyvVyyJsuXIewwsr1p7ywJLwldMAILrlXY4HUPUWXmHdnT8t/NMhxUEo1/YMjQpQiUQS5d3dzpx78iLa7TxN03wDhcipQjTcAeiFQlgKBKV2Tr0HJfxQDO70k0CTB2Ox28bmacjaQmoBTuOgl49Pr8gQyJ2n9giPNUrRJDnZDtO1uHMMzlGiAv8TAjASkV4KVHw4OeupeS4U9JH7SE9gX3EDwp9/4HCqLySmLII488Yjacn6gIq8JgvaiKiYhqu/tHIUs2VTRQZ+10fDFOZvFydSrynb13bDQMA9mILOujoKYo7l5lbAJEyHYeAyXLidmE9qdnUQN+aDSyCPNUz9iyztCu2H22RNZEe/XHGYFp7 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: eccbc03a-ddd7-4a78-2bc5-08dc5a2f3be6 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2024 13:56:49.4497 (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: WLEU4/3y7EBdTMEnb/N7NZA03H3m8j8TKk0qQjbLWAn4499y5JDuUMTTTorPDzMZY6vNno9226vW9IfaZp1Z3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR83MB0525 X-Spam-Status: No, score=-10.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_NUMSUBJECT, KAM_SHORT, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Zac Walker Date: Thu, 11 Apr 2024 13:41:51 +0200 Subject: [PATCH v3 07/12] aarch64: Add Cygwin and MinGW environments for AArch64 Define Cygwin and MinGW environment such as types, SEH definitions, shared libraries, etc. gcc/ChangeLog: * config.gcc: Add Cygwin and MinGW difinitions. * config/aarch64/aarch64-protos.h (mingw_pe_maybe_record_exported_symbol): Declare functions which are used in Cygwin and MinGW environment. (mingw_pe_section_type_flags): Likewise. (mingw_pe_unique_section): Likewise. (mingw_pe_encode_section_info): Likewise. * config/aarch64/cygming.h: New file. --- gcc/config.gcc | 4 + gcc/config/aarch64/aarch64-protos.h | 5 + gcc/config/aarch64/cygming.h | 172 ++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 gcc/config/aarch64/cygming.h diff --git a/gcc/config.gcc b/gcc/config.gcc index 3bc4982850b..d2f92e0fc50 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1274,7 +1274,11 @@ aarch64*-*-gnu*) aarch64-*-mingw*) tm_file="${tm_file} aarch64/aarch64-abi-ms.h" tm_file="${tm_file} aarch64/aarch64-coff.h" + tm_file="${tm_file} aarch64/cygming.h" + tm_file="${tm_file} mingw/mingw32.h" + tm_file="${tm_file} mingw/mingw-stdint.h" tmake_file="${tmake_file} aarch64/t-aarch64" + target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt.cc" case ${enable_threads} in "" | yes | win32) thread_file='win32' diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 42639e9efcf..1d3f94c813e 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -1110,6 +1110,11 @@ extern void aarch64_output_patchable_area (unsigned int, bool); extern void aarch64_adjust_reg_alloc_order (); +extern void mingw_pe_maybe_record_exported_symbol (tree, const char *, int); +extern unsigned int mingw_pe_section_type_flags (tree, const char *, int); +extern void mingw_pe_unique_section (tree, int); +extern void mingw_pe_encode_section_info (tree, rtx, int); + bool aarch64_optimize_mode_switching (aarch64_mode_entity); void aarch64_restore_za (rtx); diff --git a/gcc/config/aarch64/cygming.h b/gcc/config/aarch64/cygming.h new file mode 100644 index 00000000000..2e7b01feb76 --- /dev/null +++ b/gcc/config/aarch64/cygming.h @@ -0,0 +1,172 @@ +/* Operating system specific defines to be used when targeting GCC for + hosting on Windows32, using a Unix style C library and tools. + Copyright (C) 1995-2024 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#ifndef GCC_AARCH64_CYGMING_H +#define GCC_AARCH64_CYGMING_H + +#undef PREFERRED_DEBUGGING_TYPE +#define PREFERRED_DEBUGGING_TYPE DINFO_TYPE_NONE + +#define FASTCALL_PREFIX '@' + +#define print_reg(rtx, code, file) (gcc_unreachable ()) + +#define SYMBOL_FLAG_DLLIMPORT 0 +#define SYMBOL_FLAG_DLLEXPORT 0 + +#define SYMBOL_REF_DLLEXPORT_P(X) \ + ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_DLLEXPORT) != 0) + +/* Disable SEH and declare the required SEH-related macros that are +still needed for compilation. */ +#undef TARGET_SEH +#define TARGET_SEH 0 + +#define SSE_REGNO_P(N) (gcc_unreachable (), 0) +#define GENERAL_REGNO_P(N) (gcc_unreachable (), 0) +#define SEH_MAX_FRAME_SIZE (gcc_unreachable (), 0) + +#undef TARGET_PECOFF +#define TARGET_PECOFF 1 + +#include +#ifdef __MINGW32__ +#include +#endif + +extern void mingw_pe_asm_named_section (const char *, unsigned int, tree); +extern void mingw_pe_declare_function_type (FILE *file, const char *name, + int pub); + +#define TARGET_ASM_NAMED_SECTION mingw_pe_asm_named_section + +/* Select attributes for named sections. */ +#define TARGET_SECTION_TYPE_FLAGS mingw_pe_section_type_flags + +#define TARGET_ASM_UNIQUE_SECTION mingw_pe_unique_section +#define TARGET_ENCODE_SECTION_INFO mingw_pe_encode_section_info + +/* Declare the type properly for any external libcall. */ +#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ + mingw_pe_declare_function_type (FILE, XSTR (FUN, 0), 1) + +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__MSVCRT__"); \ + builtin_define ("__MINGW32__"); \ + builtin_define ("_WIN32"); \ + builtin_define_std ("WIN32"); \ + builtin_define_std ("WINNT"); \ + builtin_define_with_int_value ("_INTEGRAL_MAX_BITS", \ + TYPE_PRECISION (intmax_type_node)); \ + builtin_define ("__MINGW64__"); \ + builtin_define_std ("WIN64"); \ + builtin_define ("_WIN64"); \ + builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ + builtin_define ("__fastcall=__attribute__((__fastcall__))"); \ + builtin_define ("__thiscall=__attribute__((__thiscall__))"); \ + builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ + } \ + while (0) + +/* Windows64 continues to use a 32-bit long type. */ +#undef LONG_TYPE_SIZE +#define LONG_TYPE_SIZE 32 + +#undef DEFAULT_SIGNED_CHAR +#define DEFAULT_SIGNED_CHAR 1 + +#undef SIZE_TYPE +#undef PTRDIFF_TYPE +#define SIZE_TYPE "long long unsigned int" +#define PTRDIFF_TYPE "long long int" + +#undef WCHAR_TYPE_SIZE +#undef WCHAR_TYPE +#define WCHAR_TYPE_SIZE 16 +#define WCHAR_TYPE "short unsigned int" + +#define drectve_section() \ + (fprintf (asm_out_file, "\t.section\t.drectve\n"), \ + in_section = NULL) + + +/* Enable alias attribute support. */ +#ifndef SET_ASM_OP +#define SET_ASM_OP "\t.set\t" +#endif + +/* GNU as supports weak symbols on PECOFF. */ +#define ASM_WEAKEN_LABEL(FILE, NAME) \ + do \ + { \ + fputs ("\t.weak\t", (FILE)); \ + assemble_name ((FILE), (NAME)); \ + fputc ('\n', (FILE)); \ + } \ + while (0) + +/* Get tree.cc to declare a target-specific specialization of + merge_decl_attributes. */ +#define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1 + +#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ + do { \ + switch (GET_MODE (BODY)) \ + { \ + case E_QImode: \ + asm_fprintf (STREAM, "\t.byte\t(%LL%d - %LLrtx%d) / 4\n", \ + VALUE, REL); \ + break; \ + case E_HImode: \ + asm_fprintf (STREAM, "\t.2byte\t(%LL%d - %LLrtx%d) / 4\n", \ + VALUE, REL); \ + break; \ + case E_SImode: \ + case E_DImode: /* See comment in aarch64_output_casesi. */ \ + asm_fprintf (STREAM, "\t.word\t(%LL%d - %LLrtx%d) / 4\n", \ + VALUE, REL); \ + break; \ + default: \ + gcc_unreachable (); \ + } \ + } while (0) + +#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rdata,\"dr\"" + +#undef SUBTARGET_OVERRIDE_OPTIONS +#define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + flag_stack_check = STATIC_BUILTIN_STACK_CHECK; \ + } while (0) + + +#define SUPPORTS_ONE_ONLY 1 + +/* Define this to be nonzero if static stack checking is supported. */ +#define STACK_CHECK_STATIC_BUILTIN 1 + +#define HAVE_GAS_ALIGNED_COMM 1 + +#undef MAX_OFILE_ALIGNMENT +#define MAX_OFILE_ALIGNMENT (8192 * 8) + +#endif