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: unassig...@gcc.gnu.org
        ReportedBy: rsand...@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)).

Reply via email to