public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52125] New: Problems with LO16 asm operands on MIPS Date: Sun, 05 Feb 2012 14:48:00 -0000 [thread overview] Message-ID: <bug-52125-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125 Bug #: 52125 Summary: Problems with LO16 asm operands on MIPS Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: rsandifo@gcc.gnu.org On MIPS, the "m" asm constraint allows %lo16 addresses. This can cause orphaned HI16 relocations on REL targets if the memory operand isn't actually referenced in the asm string, but is simply there to record that a particular piece of memory is used or set. This can be seen in gcc/testsuite/gcc.dg/pr48774.c. It's difficult to know what to do here. On the one hand, passing any mem to "m" in this way ought to work, so it is a genuine bug. On the other hand, I think "m" has allowed LO16 addresses since -msplit-addresses was added all those years ago, and I can't remember any complaints about it causing problems in "real" code. It would only cause problems in cases where the CU has no other LO16 references to the same address (or the same address plus a constant). We could forbid LO16 "m" references on REL targets and provide a new memory constraint that allows them, but that might cause unnecessary pessimisation of working asm statements. People who want the best performance would have to conditionalise their code based on the GCC version, using "m" for old versions and the proposed constraint for new versions. Since this isn't a 4.7 regression, I'm not planning on doing anything at this stage.
next reply other threads:[~2012-02-05 14:48 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-05 14:48 rsandifo at gcc dot gnu.org [this message] 2012-02-05 14:48 ` [Bug target/52125] " rsandifo at gcc dot gnu.org 2012-02-05 14:56 ` rsandifo at gcc dot gnu.org 2014-01-19 11:35 ` rsandifo at gcc dot gnu.org 2014-01-23 8:25 ` rsandifo at gcc dot gnu.org 2014-01-23 8:28 ` rsandifo at gcc dot gnu.org 2014-01-27 21:41 ` sje at gcc dot gnu.org 2014-01-27 22:07 ` rsandifo at gcc dot gnu.org 2014-01-27 22:41 ` sje 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-52125-4@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: linkBe 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).