This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51931] New: No support for MIPS16 long branches
- From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 21 Jan 2012 11:22:36 +0000
- Subject: [Bug target/51931] New: No support for MIPS16 long branches
- Auto-submitted: auto-generated
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)).