public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mschiffer@universe-factory.net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/84790] Miscompilation for MIPS16 with -fpic and -Os or -O2
Date: Sun, 26 May 2024 08:55:21 +0000 [thread overview]
Message-ID: <bug-84790-4-ktO27rXZUj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-84790-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790
--- Comment #10 from Matthias Schiffer <mschiffer@universe-factory.net> ---
(In reply to YunQiang Su from comment #8)
> Ohh, In fact we should use $28 if TARGET_USE_GOT.
>
> Can you help to test this patch?
>
> ```
> diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
> index b63d40a357b..fe8641d3916 100644
> --- a/gcc/config/mips/mips.cc
> +++ b/gcc/config/mips/mips.cc
> @@ -3342,7 +3342,7 @@ mips16_gp_pseudo_reg (void)
> rtx
> mips_pic_base_register (rtx temp)
> {
> - if (MIPS16_GP_LOADS ||!TARGET_MIPS16)
> + if (MIPS16_GP_LOADS || TARGET_USE_GOT ||!TARGET_MIPS16)
> return pic_offset_table_rtx;
>
> if (currently_expanding_to_rtl)
> ```
Testing might take a while, I haven't built GCC for some time.
next prev parent reply other threads:[~2024-05-26 8:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-84790-4@http.gcc.gnu.org/bugzilla/>
2024-05-22 14:28 ` syq at gcc dot gnu.org
2024-05-25 16:37 ` syq at gcc dot gnu.org
2024-05-26 0:05 ` mschiffer@universe-factory.net
2024-05-26 3:42 ` syq at gcc dot gnu.org
2024-05-26 3:45 ` syq at gcc dot gnu.org
2024-05-26 8:55 ` mschiffer@universe-factory.net [this message]
2024-05-27 1:34 ` syq at gcc dot gnu.org
2024-05-27 2:10 ` syq at gcc dot gnu.org
2024-05-27 18:20 ` mschiffer@universe-factory.net
2024-05-28 7:26 ` syq at gcc dot gnu.org
2024-05-29 17:16 ` cvs-commit at gcc dot gnu.org
2024-05-29 17:17 ` syq at gcc dot gnu.org
2024-05-29 17:44 ` mschiffer@universe-factory.net
2024-05-30 1:48 ` cvs-commit at gcc dot gnu.org
2024-05-30 2:11 ` cvs-commit at gcc dot gnu.org
2024-05-30 2:11 ` cvs-commit at gcc dot gnu.org
2024-05-30 2:17 ` cvs-commit at gcc dot gnu.org
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=bug-84790-4-ktO27rXZUj@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).