This is the mail archive of the gcc@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]

Re: Assembler error?


> /var/tmp/ccx5FTas.s: Assembler messages:
> /var/tmp/ccx5FTas.s: 12847: Error: Branch out of range

I'm not a MIPS assembler guru, but looking at the binutils source
code, I see the following comment right before the message is
produced:

  /* FIXME.  It would be possible in principle to handle
     conditional branches which overflow.  They could be
     transformed into a branch around a jump.  This would
     require setting up variant frags for each different
     branch type.  The native MIPS assembler attempts to
     handle these cases, but it appears to do it
     incorrectly.  */

This seems to happen if a jump instruction needs go further than
32768, and this not PIC code. More correctly:

  /* The branch offset is too large.  If this is an
     unconditional branch, and we are not generating PIC code,
     we can convert it to an absolute jump instruction.  */

Without seeing the source, or knowing anything about it, I'd guess
this is the result of compiling a huge function. You might want to
experiment with the various options, although I have no clue whether
-mhalf-pic or similar has any chance of getting your code compiled.

Good luck,
Martin


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