public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Lulu Cheng <chenglulu@loongson.cn>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn
Subject: Re: [PATCH v2] LoongArch: Add support code model extreme.
Date: Fri, 19 Aug 2022 18:41:57 +0800	[thread overview]
Message-ID: <094d188ab3be68172debe93534705bdba6efe999.camel@xry111.site> (raw)
In-Reply-To: <20220819015624.2449297-1-chenglulu@loongson.cn>

On Fri, 2022-08-19 at 09:56 +0800, Lulu Cheng wrote:
> v1 -> v2:
> - Modify some description information.
> - Add options -W[no]extreme-plt, warn about code model extreme not support plt mode,
> and then disable plt.

I think we can make -mcmodel=large imply -fno-plt, and reject if user
uses "-fplt -mcmodel=large" explicitly:

diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index 114ff8ec836..25483da0f44 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5961,9 +5961,8 @@ loongarch_option_override_internal (struct gcc_options *opts)
 
 	if (opts->x_flag_plt)
 	  {
-	    warning (OPT_Wextreme_plt, "code model %qs not support %s mode,"
-		     "now set to %s",
-		     "extreme", "plt", "noplt");
+	    if (global_options_set.x_flag_plt)
+	      error ("code model %qs is not compatible with %s", "-fplt");
 	    opts->x_flag_plt = 0;
 	  }
 	break;

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

      reply	other threads:[~2022-08-19 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  1:56 Lulu Cheng
2022-08-19 10:41 ` Xi Ruoyao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=094d188ab3be68172debe93534705bdba6efe999.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).