From patchwork Mon Mar 4 17:39:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Karpov X-Patchwork-Id: 209653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1574749dyc; Mon, 4 Mar 2024 09:40:13 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCXHMunvp9hj2hrxzxNBZrJg1bmwyNzMVCuIe9qbICHj57yO5eeOHNNzT0FgV2MeO7ERMSyzpcydoVsFDvz2ZwpPzyj4xg== X-Google-Smtp-Source: AGHT+IFTAORvMrhBC8IzHjKKGdZPvHxqbrFbTp88QYUDTUCs5+GrU8kOZU5Z9omvlI1KO+w/5xKx X-Received: by 2002:a05:6808:13c7:b0:3c1:b3c8:fbfe with SMTP id d7-20020a05680813c700b003c1b3c8fbfemr10709875oiw.4.1709574013741; Mon, 04 Mar 2024 09:40:13 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1709574013; cv=pass; d=google.com; s=arc-20160816; b=WGoA8wVihJ7h0jUggBfNC2jd5ozj6wa7ja3A8B02GcDKS0pALtCR9nhaTUMPUtITYa 7P1e+t8sUvdGi221v0OdjFlTTX84U3S4RI3ru1GQu1I4OL3c/U6E/VCIq3lkvdBRXX3X KFtfwlwdjCU8J1D/GHUoLAwLyo5DqeZGmO0HBs2rjw03xAwXIOitONSxFw3U+ukQ9Ld9 45wiA2H6TFLevagqu/QGhDsoK7axTo31LTJUk8oV9wbwelR9NjB51xaL3aN9J0F3UqRn tGfUOyMqMf4LFxLQES73KZ9FflGpqxgIOEH+oTGP8PUqnq2x5y2+MZqJ68ko6fhx69+V VAlA== 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=0pim9HY8gVVZi4XBxKVWk8wUhmGKa98xKVGQbfxYpE4=; fh=+2oejmI9rg4HZgWvTrkP8qDufDd61kvBMNz7Wu2ta60=; b=XAfTpL72vyvKbHU4aReRD2oidf1HbblC8QziGkeaoxBthiapC5NGTgsOg4kDeUhF83 4qJsOzPguFk9mWKAnfpOH0WBCpkJK8EvYHhXnBSDdz5kRL9R/X6Powhb72/dml6WekEC g8/Xa4oPZGy40YNkSCCqTPYeUfRG1aOlWPBOGHXFLnvL0GkNJZ0a3bcOXcc5QcPjxhIN QbL8zZe6YAjXK3simrv6Zb2Jl35F5o/Vubp0il4JlPgsYkdjuzBU8L3NK688cUgm0Hh0 IuA81Hi4tFSi8Tfc5VrGf4UslIuMSCz9ytp++9/38LMYAAHOTLaS4vAqmvd97vXSKomU XHnw==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=RDnjF3e5; 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 k15-20020a05622a03cf00b0042e76eba305si10638371qtx.520.2024.03.04.09.40.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 09:40:13 -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=RDnjF3e5; 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 687673858434 for ; Mon, 4 Mar 2024 17:40:13 +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-am7eur03on2124.outbound.protection.outlook.com [40.107.105.124]) by sourceware.org (Postfix) with ESMTPS id 2C10E3858409 for ; Mon, 4 Mar 2024 17:39:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C10E3858409 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 2C10E3858409 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.105.124 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709573963; cv=pass; b=koaf90Vt4YKMe/3OvpDhl0BlPaZdM14oxJce5FT3yfyvGUkCPoyJj0JBO7dWLdvV89EZbJZ0Z9Jt96jkAzFW6v4Zd3jFJPWC2oGKwSM2sZ839e9gTaHJ2GXxL8g1JMixl8GI6QfVXi5dbacHF9vFVVyhfk5iOn4avm7QozJfhNo= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709573963; c=relaxed/simple; bh=b7xZpGSzInWrB4lmU+dcGSBisk2QNmo4s3hkoRT6wjQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IMlIJOaRz+kMwJOmE3BkZGnvxcpTOWfT+9xUAkn+yuygWBXnhlxIEHfK3ABswd79AP3DpOegJQh42Ehp+bYB4D7T35a6Sb/86fxD4eh1pP3c/kpzbQF+/UsnVR8YG8citIW6V+pcNsym6XK/wWvlBhxC30QDfkZAqXHB5OXIbyY= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jKiudaL6i+Ij0P+BfwUGmz6OyRQpQyVY5iSXSCh4BrrObAcCO+5SiZ78yHrp6Ija3O+5KqE1N85NLiRQj/rIsz25hH4xDEwFC/pHxkB0dfsrJ7IoGEhBAPRQYJGv0xCOrA+guMl5WG++nrybolS1MppAg5FfC2xJc2iovSBFeEdPyo41Sg8AKR4PoDOYHm9mUuTehZ260Ux6DdXT25OtLk03yKoRuXMjaEvD7sV4a8tcMscxFCw36yv5f5nsgFMB4VbPF7HjclLQhQYfTn9iCJT79Lzike38rb3+hlPPnMiQPie3ofYQL+LIaLLZrL7GjVz4xZb2QUxmw3TV7ntldg== 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=0pim9HY8gVVZi4XBxKVWk8wUhmGKa98xKVGQbfxYpE4=; b=NQPH6wOEcO9+H4ZHpjI/0/KYeq+KTlyI+EamxiQyQa8DosdZdgtIto7R0uR3wpUqTzcldxDY8XZMPRpvZj4IUTPWCVpTTyFfd+RaFlP6oGSrBcVIpwhzbVmeQCQqiUfm1XvairM8Ikfuuho84yDY9HDhCsLk1zj2qy7+JDrJYc/15cbPeEImYZm5jfDhL/tPsPyBxEETppg45Gcg+w/ne7fMMb5kfrrC2Cq12Xw2Otl+tjpCOcCPIIEErpH++0tNymwLpjmMIrUMsd/Z/4P3o7XiedPILQbDCpCWn8v2XLf3m1WzoBHBUA8H3MUpPz0tcZc53uvRokJdyH99kSdolg== 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=0pim9HY8gVVZi4XBxKVWk8wUhmGKa98xKVGQbfxYpE4=; b=RDnjF3e5jw+LUCcLsUozXU/4Qz4PDyhwcjfpBl0oT3WTNFW+nUN4jFIGpWIOvXCtRHFCauMWOUQvo4t9kpQ0KGzZC8JsFIIVg4SAbwOuZ2IbZTEg7VASjB9R9MLHbO5kRFPj15AFjG4tTOJD0JkhGJgl8Mg8W95SwD5Jd62smg8= Received: from VI1PR83MB0431.EURPRD83.prod.outlook.com (2603:10a6:800:17f::6) by GVXPR83MB0607.EURPRD83.prod.outlook.com (2603:10a6:150:154::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.3; Mon, 4 Mar 2024 17:39:09 +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:39:09 +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 04/13] aarch64: Add aarch64-w64-mingw32 COFF Thread-Topic: [PATCH v2 04/13] aarch64: Add aarch64-w64-mingw32 COFF Thread-Index: AQHablrcwmu+EOZNWE+UzNR+AZV++w== Date: Mon, 4 Mar 2024 17:39:08 +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_|GVXPR83MB0607:EE_ x-ms-office365-filtering-correlation-id: d74cc06e-b971-4777-a2dd-08dc3c71ff1f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EGaAsnRYlBtOA5m6n0p0imnYBUAKpB1XnHHKwHL+uw7aDjJ6hej36EWCQ17Bgfjz8xjxnJUnxMWa51UCmCtRwz6JpFC7bWRcbsvTJrIbTNnvaI1AjGAMXUq3OSGdDDxcmhoVjZXOvhZoSFH7xPKiq9d1bra/cCGUR32N3Mnoes+bAhWW5gQDbBZ2/j/ZovzfIbVW1vP5PfRRmL/poUUPEs3Ev1zd6CkR5pKzqFkZv5UVhhTwOWiy2NqKhzKHzosmK47RB+KFzUCAO0Yu/NdjMro8r22S81KZFG7B8FFiGcZLM563KxqgKdPLfvDZuwNOfv6pNJljF4xZMAw2+QOuvNk+3rJKyYjHy05UuYLoFEVxFFtkMU72NnNUmFoMwrsiDTY6IAss6PQWLtnGICl/uJZK5LKiKNOYOyZeiO6MOSWFOTZgAI1q6//G+Rj3PhoLt5ZZnBjUHD2zPOLc/M3W/KyMIHS96AhiJj2Vec+W2r7+B9mU47OTYRya9brcVgXRCnihS5vTvp8heeV6FD/pp3EdEhGMWDocFrxtM4QGCgVPT3GTgZiddjviGk5Bm9shQ59COcRGeaSSpl70ePZWgtFo6GJlIEMY7ET+8o7I1Srz+HhZ/I2VjbXAIche63ycUNoPuTqZMilQ9VdjcCx5Rrp2HdUSeoyA0wJExB8hKwM= 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: QBnxbu/eT6N8Li5A/txdEaw7O2L17LCwmRX+eYP7HvPfCL+yTNx7oQlnM5lEPCw1i6sDrBrIW3zXGAQMaxi9WwhRd8u2lGrLdWh9Of3YBbkaWwoZzAbtDoIowQwq+/C2o3uZvLf1ME/cvDsJXAjDFRjZnT78FxZ/+p55T3N3LMgbbDI1mtJ9NwGWJrHm37s4/zIMZn/dLegoFUVqLMl9oWsiQ53++3QnbZkLejXN0r6UbT8xd/xd7jlWvcGwL6WXn1qXygaZ4NNscoR+Z2MrlPAemQZrXYVkPZOuhNP56bBlDWTD1m/jI1GRdp0pweGpDTjt61PeEswFPrKd7RdDjz55jrqkp0JSsfHTyvN7RWafFslxjg5VMr5nX9ksqk669dt+vYLiH3864A2zbllPJsD1TJBMFt0PSoFwAlKDsT+ilQWEqtISEL/QwX/Wgf8zbGKg51PABoDbY8Y9L8I0SNRFuRLeq6fyolNNMbqis7QRTeFqZ2bxO1Pnr4hDXVPZvOooODt84UF1mkZA41W8L7crxiNhHY4Tu5Kl4UpW/ARoV3XlkmMCba4zsv7wmULcZgNSxv0RicoXuk7uqA9x4gPRIrLZaCqRs4a10CxZJ5U0Ab8AdfTeHAKV/R/jphmVL/h9rvgBAWT/A/ZWSQZG2ZTfkSi70Hr2mpGP76jDXr8nipTPFfrSTwNdOoOPliNjiRqxBx36vM1IxX/PMNe76XtSJewDxa0EUZE2/krejYsmGTmBNuzVOtjYW+ygzFmWRu5oF0z76MHYZHyn7HMRjogwXDWJpP/m4jOrjrTyRUL9zUAZKvBniztRrpXqKB/jlP6fc5NxjEVxStypPqo/6OI46ibBM5OZ3IYT1/eHcFN5h/PG51Ypi9104Pyu4qSR98BwlE+kYE9cqe60M0YTMbf4ZV/I8566uyVt3u7W/Ash4Dmg6c4HVLAjY5s9fg9xXN6Uec9xV4EL6+/rlSYcx7ADzYKZpROA+QfqaVaRWUr7SmMbYXQP8YsCwxWmSP4ElqiNM1EwjG8sK7bYiov+66sjS9G5bDVamedczgYcPOknId1qS3AyV+Z40xnPBoKch5FJ+ooFjaV5Vhqj49DDfZHHs5kKgEK0tMP8AsyOoqyWJMW1cEIE3MQHnbu/YTVyRuvPJSkNw0zfvxdkWELnmruxAdIY6ZCjmAn1aC1iK4RtfdMsbjKmZ7+2YQP7vPCIKRly4h7HRoZFR+6jJOiwPAnDOP/niYUl5TvHjhDLr5+klsFUmTOe/B1PgnaJ6GcckENkioucWzhNn0wBWH14Qe2L07NJFu2cWyUVezITzKknG+QHEBac4xsHYT8GeqWWSG5sgw4D/xlknyfxHMIyIX/iaMl887xepoPs9ul4d0EE6mUyIYwnAHcCSc7qvnqA1sG3TdDlr5H/MKNJuuJ5qMVbFYzgXOMUntpDYjqelq9CCoEAySwQI8AG+gxpr2tn0NAIuvwMdN0ovCKaBz4je6m5jWhTZu7o2fK0KSru/ZY0uBxnvR4EUWCK722xasFgLpcTilvyO8PJJWcDFiptVciV0cYxEcmAyqi302wlRXGzEOjR0vQhuH2jEaneogOK 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: d74cc06e-b971-4777-a2dd-08dc3c71ff1f X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2024 17:39:08.8419 (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: OxzD4aMCgQCTWgMHs4JFdpiyghHsfYJsNnrIp4vKzwWruYJnh0cBUvDcdpGAXIvuUx5fs6oRVXR0xKyK4wjRrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR83MB0607 X-Spam-Status: No, score=-9.7 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: 1792618281090496702 X-GMAIL-MSGID: 1792618281090496702 From: Zac Walker Date: Fri, 1 Mar 2024 01:55:47 +0100 Subject: [PATCH v2 04/13] aarch64: Add aarch64-w64-mingw32 COFF Define ASM specific for COFF format on AArch64. gcc/ChangeLog: * config.gcc: Add COFF format support definitions. * config/aarch64/aarch64-coff.h: New file. --- gcc/config.gcc | 1 + gcc/config/aarch64/aarch64-coff.h | 91 +++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 gcc/config/aarch64/aarch64-coff.h diff --git a/gcc/config.gcc b/gcc/config.gcc index b762393b64c..cb6661f44ef 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1266,6 +1266,7 @@ aarch64*-*-linux*) ;; aarch64-*-mingw*) tm_file="${tm_file} aarch64/aarch64-abi-ms.h" + tm_file="${tm_file} aarch64/aarch64-coff.h" tmake_file="${tmake_file} aarch64/t-aarch64" case ${enable_threads} in "" | yes | win32) diff --git a/gcc/config/aarch64/aarch64-coff.h b/gcc/config/aarch64/aarch64-coff.h new file mode 100644 index 00000000000..79c5a43b970 --- /dev/null +++ b/gcc/config/aarch64/aarch64-coff.h @@ -0,0 +1,91 @@ +/* Machine description for AArch64 architecture. + Copyright (C) 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_COFF_H +#define GCC_AARCH64_COFF_H + +#include "aarch64.h" + +#ifndef LOCAL_LABEL_PREFIX +# define LOCAL_LABEL_PREFIX "" +#endif + +/* Using long long breaks -ansi and -std=c90, so these will need to be + made conditional for an LLP64 ABI. */ +#undef SIZE_TYPE +#define SIZE_TYPE "long long unsigned int" + +#undef PTRDIFF_TYPE +#define PTRDIFF_TYPE "long long int" + +#undef LONG_TYPE_SIZE +#define LONG_TYPE_SIZE 32 + +#ifndef ASM_GENERATE_INTERNAL_LABEL +# define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \ + sprintf (STRING, "*%s%s%u", LOCAL_LABEL_PREFIX, PREFIX, (unsigned int)(NUM)) +#endif + +#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ + fprintf (STREAM, "\t.align\t%d\n", (int)POWER) + +/* Output a common block. */ +#ifndef ASM_OUTPUT_COMMON +# define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ + { \ + fprintf (STREAM, "\t.comm\t"); \ + assemble_name (STREAM, NAME); \ + asm_fprintf (STREAM, ", %d, %d\n", \ + (int)(ROUNDED), (int)(SIZE)); \ + } +#endif + +/* Output a local common block. /bin/as can't do this, so hack a + `.space' into the bss segment. Note that this is *bad* practice, + which is guaranteed NOT to work since it doesn't define STATIC + COMMON space but merely STATIC BSS space. */ +#ifndef ASM_OUTPUT_ALIGNED_LOCAL +# define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \ + { \ + switch_to_section (bss_section); \ + ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \ + ASM_OUTPUT_LABEL (STREAM, NAME); \ + fprintf (STREAM, "\t.space\t%d\n", (int)(SIZE)); \ + } +#endif + +#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \ + fprintf (STREAM, "\t.space\t%d // skip\n", (int) (NBYTES)) + +#define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) +#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) + +#define TEXT_SECTION_ASM_OP "\t.text" +#define DATA_SECTION_ASM_OP "\t.data" +#define BSS_SECTION_ASM_OP "\t.bss" + +#define CTORS_SECTION_ASM_OP "\t.section\t.ctors, \"aw\"" +#define DTORS_SECTION_ASM_OP "\t.section\t.dtors, \"aw\"" + +#define GLOBAL_ASM_OP "\t.global\t" + +#undef SUPPORTS_INIT_PRIORITY +#define SUPPORTS_INIT_PRIORITY 0 + +#endif