This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/51931] New: No support for MIPS16 long branches


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)).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]