From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by sourceware.org (Postfix) with ESMTP id EC35F3858D29 for ; Fri, 3 Sep 2021 01:48:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EC35F3858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id 4189A92009C; Fri, 3 Sep 2021 03:48:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 33CC892009B; Fri, 3 Sep 2021 03:48:14 +0200 (CEST) Date: Fri, 3 Sep 2021 03:48:14 +0200 (CEST) From: "Maciej W. Rozycki" To: YunQiang Su cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH v3] MIPS: add .module mipsREV/.set arch= to all output asm file In-Reply-To: <20210903013530.3992107-1-yunqiang.su@cipunited.com> Message-ID: References: <20210903013530.3992107-1-yunqiang.su@cipunited.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3495.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, 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, 03 Sep 2021 01:48:17 -0000 On Thu, 2 Sep 2021, YunQiang Su wrote: > diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c > index 493d3de48..743a1d0fe 100644 > --- a/gcc/config/mips/mips.c > +++ b/gcc/config/mips/mips.c > @@ -9896,6 +9896,12 @@ mips_file_start (void) > else > fputs ("\t.module\tnooddspreg\n", asm_out_file); > > + if (!global_options_set.x_mips_arch_option > + || startswith(mips_arch_info->name, "mips")) > + fprintf (asm_out_file, "\t.module\t%s\n", mips_arch_info->name); > + else > + fprintf (asm_out_file, "\t.set\tarch=%s\n", mips_arch_info->name); Why not consistently `.module' for both legs? And actually why not just `.module arch=...' in all cases? Maciej