From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by sourceware.org (Postfix) with ESMTPS id 5B8633858420 for ; Fri, 17 Dec 2021 07:45:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5B8633858420 Received: by mail-yb1-xb34.google.com with SMTP id d10so4069817ybe.3 for ; Thu, 16 Dec 2021 23:45:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5UBo0rJ7u+YfFNjhsTWlnrXwS3Xi6bZ455bNoDSSaVc=; b=fR8WO9oN1SJfycrBfXnl/w9QiEv0UUnUqfoc6dYZ8kAkJskV+YE2/I11f1CGcrZynK xxFAQT941xe2Gh5JLC3zsO/1Nn16vku/CR35CnnBHw62FaAFKfskUJZy8dFyZWoJ9ao6 +LY7ew+60rhJclNVt+EdPPxdg8RS3kYAJ+MNRHNYVBCfNKwpk8Tdge9kXp8N5O1f9Djf L0kZRtGMUHxVV4ODxlK9J+fIVz/yPbwuO/IJojBml0VLQzgZGtwrQz2GL2Ip4Hafnwf4 uc9LFZIT64nmq9D1xkoUFA6tB+dDU9jr3lQC2S6117Re1q/NbTGI8JIANVetGb5WrU2r Jnuw== X-Gm-Message-State: AOAM533OtxzzTJS1TBNfOdmHpmLRbbA1nqDayzvnkP826oUYMXftyIv5 fTqeXle2oZHuSgY22u1oyfiK0hkomT8eVB81Ass= X-Google-Smtp-Source: ABdhPJyESYeVoX/klOAw9di4Zlpdplp38oP+0dQiSWKc5XGPiAs8kAMGjbqB9/PqUUGasiRN0ipTZHVATP3XNTasvVg= X-Received: by 2002:a25:28c6:: with SMTP id o189mr2529782ybo.462.1639727151975; Thu, 16 Dec 2021 23:45:51 -0800 (PST) MIME-Version: 1.0 References: <20211210074359.988056-1-xuchenghua@loongson.cn> <20211210074359.988056-7-xuchenghua@loongson.cn> In-Reply-To: From: Paul Hua Date: Fri, 17 Dec 2021 15:45:41 +0800 Message-ID: Subject: Re: [PATCH v3 06/12] LoongArch Port: Builtin macros. To: Joseph Myers Cc: Chenghua Xu , yangyujie@loongson.cn, chenglulu@loongson.cn, gcc-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2021 07:45:53 -0000 Hi Joseph, Thanks for your suggestion, Those macros can be removed, we will send the v4 version soon. Are there any problems in this series of patches? In other words, What conditions are required for LoongArch back-end merged? By the way, We are preparing the LoongArch machine to send to Cfarm for testing. On Tue, Dec 14, 2021 at 8:13 AM Joseph Myers wrote: > > On Fri, 10 Dec 2021, Chenghua Xu wrote: > > > + /* Macros dependent on the C dialect. */ > > + if (preprocessing_asm_p ()) > > + { > > + builtin_define_std ("LANGUAGE_ASSEMBLY"); > > + builtin_define ("_LANGUAGE_ASSEMBLY"); > > + } > > + else if (c_dialect_cxx ()) > > + { > > + builtin_define ("_LANGUAGE_C_PLUS_PLUS"); > > + builtin_define ("__LANGUAGE_C_PLUS_PLUS"); > > + builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); > > + } > > + else > > + { > > + builtin_define_std ("LANGUAGE_C"); > > + builtin_define ("_LANGUAGE_C"); > > + } > > + if (c_dialect_objc ()) > > + { > > + builtin_define ("_LANGUAGE_OBJECTIVE_C"); > > + builtin_define ("__LANGUAGE_OBJECTIVE_C"); > > + /* Bizarre, but retained for backwards compatibility. */ > > + builtin_define_std ("LANGUAGE_C"); > > + builtin_define ("_LANGUAGE_C"); > > + } > > +} > > I think all of this should be removed. It's a new architecture, there > should be no need for any such macros for things that are not > architecture-specific. In general, be careful to remove anything in the > port that is actually about the peculiarities of what was once done for > compatibility with existing software for an old architecture (MIPS?) that > you modelled the port on and that is not considered best practice for a > new architecture where you can make a fresh start. > > -- > Joseph S. Myers > joseph@codesourcery.com