public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51931] New: No support for MIPS16 long branches
@ 2012-01-21 11:58 rsandifo at gcc dot gnu.org
2012-01-22 12:12 ` [Bug target/51931] " rsandifo at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-01-21 11:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51931
Bug #: 51931
Summary: No support for MIPS16 long branches
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rsandifo@gcc.gnu.org
The MIPS port doesn't detect when MIPS16 branches are out of range,
and it doesn't provide the same kind of "branch around jump" fallback
as it does for non-MIPS16 code.
This has always been a problem, and shows up as a long-standing failure
in gcc.c-torture/compile/20001226-1.c and g++.dg/opt/longbranch1.C.
I've thought about various fixes, such as saving a MIPS16 register
to $1 before using it as a scratch, then restoring it in the branch
delay slot. But there are various ugly cases.
The bug only triggers for very large functions and at least these days
there's a workaround: add __attribute__((nomips16)).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/51931] No support for MIPS16 long branches
2012-01-21 11:58 [Bug target/51931] New: No support for MIPS16 long branches rsandifo at gcc dot gnu.org
@ 2012-01-22 12:12 ` rsandifo at gcc dot gnu.org
2012-01-22 17:11 ` rsandifo at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-01-22 12:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51931
--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2012-01-22 10:33:10 UTC ---
Author: rsandifo
Date: Sun Jan 22 10:33:07 2012
New Revision: 183389
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183389
Log:
gcc/testsuite/
PR target/51931
* gcc.c-torture/compile/20001226-1.c: Add nomips16 attribute.
* g++.dg/opt/longbranch1.C: Likewise.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/opt/longbranch1.C
trunk/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/51931] No support for MIPS16 long branches
2012-01-21 11:58 [Bug target/51931] New: No support for MIPS16 long branches rsandifo at gcc dot gnu.org
2012-01-22 12:12 ` [Bug target/51931] " rsandifo at gcc dot gnu.org
@ 2012-01-22 17:11 ` rsandifo at gcc dot gnu.org
2012-08-02 21:32 ` rsandifo at gcc dot gnu.org
2015-08-05 14:41 ` rsandifo at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-01-22 17:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51931
rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-22
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/51931] No support for MIPS16 long branches
2012-01-21 11:58 [Bug target/51931] New: No support for MIPS16 long branches rsandifo at gcc dot gnu.org
2012-01-22 12:12 ` [Bug target/51931] " rsandifo at gcc dot gnu.org
2012-01-22 17:11 ` rsandifo at gcc dot gnu.org
@ 2012-08-02 21:32 ` rsandifo at gcc dot gnu.org
2015-08-05 14:41 ` rsandifo at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-08-02 21:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51931
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2012-08-02 21:32:02 UTC ---
Author: rsandifo
Date: Thu Aug 2 21:31:57 2012
New Revision: 190104
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190104
Log:
gcc/
PR target/51931
* config/mips/mips-protos.h (mips_strip_unspec_address): Declare.
* config/mips/mips.c (mips_strip_unspec_address): Make extern.
(mips16_rewrite_pool_constant): Make a copy of the pool constant
before adding to a PC-relative table.
(mips16_lay_out_constants): Add a SPLIT_P parameter.
(mips16_load_branch_target, mips16_split_long_branches): New functions.
(mips_reorg): Update call to mips16_lay_out_constants.
Call mips16_split_long_branches.
* config/mips/predicates.md (pc_or_label_operand): Delete.
* config/mips/mips.md (length): Add a calculation for MIPS16 branches.
Move the extended_mips16 handling further down.
(*branch_equality<mode>_mips16): Replace use pc_or_label_operand
with explicit label_ref and pc. Follow the usual operand numbering.
(*branch_equality<mode>_mips16_inverted): New pattern.
(*jump_mips16): Add length attribute.
(indirect_jump_and_restore_<mode>): New pattern.
(consttable_int): Call mips_strip_unspec_address on the operand.
gcc/testsuite/
PR target/51931
* gcc.c-torture/compile/20001226-1.c: Remove nomips16 attribute.
* g++.dg/opt/longbranch1.C: Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips-protos.h
trunk/gcc/config/mips/mips.c
trunk/gcc/config/mips/mips.md
trunk/gcc/config/mips/predicates.md
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/opt/longbranch1.C
trunk/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/51931] No support for MIPS16 long branches
2012-01-21 11:58 [Bug target/51931] New: No support for MIPS16 long branches rsandifo at gcc dot gnu.org
` (2 preceding siblings ...)
2012-08-02 21:32 ` rsandifo at gcc dot gnu.org
@ 2015-08-05 14:41 ` rsandifo at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2015-08-05 14:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51931
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fix some time ago.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-05 14:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-21 11:58 [Bug target/51931] New: No support for MIPS16 long branches rsandifo at gcc dot gnu.org
2012-01-22 12:12 ` [Bug target/51931] " rsandifo at gcc dot gnu.org
2012-01-22 17:11 ` rsandifo at gcc dot gnu.org
2012-08-02 21:32 ` rsandifo at gcc dot gnu.org
2015-08-05 14:41 ` rsandifo 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).