public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
@ 2012-02-05 14:48 ` rsandifo at gcc dot gnu.org
2012-02-05 14:56 ` rsandifo at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-02-05 14:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |mips*-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-05
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] New: Problems with LO16 asm operands on MIPS
@ 2012-02-05 14:48 rsandifo at gcc dot gnu.org
2012-02-05 14:48 ` [Bug target/52125] " rsandifo at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-02-05 14:48 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
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
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-02-05 14:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2012-02-05 14:56:39 UTC ---
Author: rsandifo
Date: Sun Feb 5 14:56:35 2012
New Revision: 183910
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183910
Log:
gcc/testsuite/
PR target/52125
* lib/target-supports.exp (check_effective_target_mips_rel): New.
* gcc.dg/pr48774.c: Skip on MIPS REL targets.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pr48774.c
trunk/gcc/testsuite/lib/target-supports.exp
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
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
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2014-01-19 11:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Testing a patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
` (2 preceding siblings ...)
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
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2014-01-23 8:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Author: rsandifo
Date: Thu Jan 23 08:24:38 2014
New Revision: 206955
URL: http://gcc.gnu.org/viewcvs?rev=206955&root=gcc&view=rev
Log:
gcc/
PR target/52125
* rtl.h (get_referenced_operands): Declare.
* recog.c (get_referenced_operands): New function.
* config/mips/mips.c (mips_reorg_process_insns): Check which asm
operands have been referenced when recording LO_SUM references.
gcc/testsuite/
PR target/52125
* gcc.dg/pr48774.c: Remove skip for mips_rel.
* gcc.target/mips/pr52125.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/mips/pr52125.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips.c
trunk/gcc/recog.c
trunk/gcc/rtl.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pr48774.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
` (3 preceding siblings ...)
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
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2014-01-23 8:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed on trunk. Not a regression, so probably not backport material.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
` (4 preceding siblings ...)
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
7 siblings, 0 replies; 9+ messages in thread
From: sje at gcc dot gnu.org @ 2014-01-27 21:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
Steve Ellcey <sje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at gcc dot gnu.org
--- Comment #5 from Steve Ellcey <sje at gcc dot gnu.org> ---
The new test (gcc.target/mips/pr52125.c) is passing on my linux target
(mips-mti-linux-gnu) but failing for my elf target (mips-mti-elf). The code
for the asm statement I get on elf is:
#APP
# 8 "pr52125.c" 1
%gp_rel(b)($28) %gp_rel(d)($28)
# 0 "" 2
#NO_APP
It looks like I can fix this by using -mno-gpopt. Is this a reasonable
fix or does it break what we want to test?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
` (5 preceding siblings ...)
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
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2014-01-27 22:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Yeah, got the same thing in overnight mipsisa64-sde-elf testing but
hadn't had chance to look at it.
Adding -mno-gpopt is fine.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/52125] Problems with LO16 asm operands on MIPS
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
` (6 preceding siblings ...)
2014-01-27 22:07 ` rsandifo at gcc dot gnu.org
@ 2014-01-27 22:41 ` sje at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: sje at gcc dot gnu.org @ 2014-01-27 22:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52125
--- Comment #7 from Steve Ellcey <sje at gcc dot gnu.org> ---
OK, I will check that in as an obvious fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-27 22:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-05 14:48 [Bug target/52125] New: Problems with LO16 asm operands on MIPS rsandifo at gcc dot gnu.org
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
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).