public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-5586] LoongArch: Fix "-mexplict-relocs=none -mcmodel=medium" producing %call36 when the assembler does not
Date: Sat, 18 Nov 2023 20:46:51 +0000 (GMT) [thread overview]
Message-ID: <20231118204651.E9A013858035@sourceware.org> (raw)
https://gcc.gnu.org/g:84c5dede83de84e0a06b018103be0b9ede5b04a1
commit r14-5586-g84c5dede83de84e0a06b018103be0b9ede5b04a1
Author: Xi Ruoyao <xry111@xry111.site>
Date: Sun Nov 19 01:41:12 2023 +0800
LoongArch: Fix "-mexplict-relocs=none -mcmodel=medium" producing %call36 when the assembler does not support it
Even if !HAVE_AS_SUPPORT_CALL36, const_call_insn_operand should still
return false when -mexplict-relocs=none -mcmodel=medium to make
loongarch_legitimize_call_address emit la.local or la.global.
gcc/ChangeLog:
* config/loongarch/predicates.md (const_call_insn_operand):
Remove buggy "HAVE_AS_SUPPORT_CALL36" conditions. Change "1" to
"true" to make the coding style consistent.
Diff:
---
gcc/config/loongarch/predicates.md | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/config/loongarch/predicates.md b/gcc/config/loongarch/predicates.md
index 56f7c48e126..d02e846cb12 100644
--- a/gcc/config/loongarch/predicates.md
+++ b/gcc/config/loongarch/predicates.md
@@ -444,21 +444,19 @@
case SYMBOL_PCREL:
if (TARGET_CMODEL_EXTREME
|| (TARGET_CMODEL_MEDIUM
- && HAVE_AS_SUPPORT_CALL36
&& (la_opt_explicit_relocs == EXPLICIT_RELOCS_NONE)))
return false;
else
- return 1;
+ return true;
case SYMBOL_GOT_DISP:
if (TARGET_CMODEL_EXTREME
|| !flag_plt
|| (flag_plt && TARGET_CMODEL_MEDIUM
- && HAVE_AS_SUPPORT_CALL36
&& (la_opt_explicit_relocs == EXPLICIT_RELOCS_NONE)))
return false;
else
- return 1;
+ return true;
default:
return false;
reply other threads:[~2023-11-18 20:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231118204651.E9A013858035@sourceware.org \
--to=xry111@gcc.gnu.org \
--cc=gcc-cvs@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).