[coldfire-gnu-discuss] Error: value too large for field of 2 bytes with FBcc

Maxim Kuvyrkov maxim at codesourcery.com
Thu May 8 19:54:03 UTC 2008


Nick Barratt wrote:
> Hello,
> 
> I'm building an application that my company has licensed for our 
> coldfire target using the CodeSourcery gcc package.  This application 
> has a massive switch statement that seems to be exposing a limitation in 
> the assembler.  Specifically, floating-point conditional branches with 
> displacements > 32k result in an assembler error (value of XXXXX too 
> large for field of 2 bytes at XXXXX), even though FBcc supports 32-bit 
> displacements using a size field in the instruction word.
> 
> I've tested and found the same behavior on both Sourcery G++ Lite 
> 4.2-125 (from the CodeSourcery website) and CodeSourcery Sourcery G++ 
> 4.1-30 (from Freescale).
> 
> Is there a work-around for this problem?  My first thought was 
> re-ordering the cases in the switch statement to reduce the displacement 
> magnitudes, but I'm not technically supposed to alter this portion of 
> the vendor source.

It's very hard to diagnose what the problem is without a testcase.  Can 
you construct a testcase that reproduces exposes the problem?  Also, 
what commands did you use to compile and link the test?


--
Maxim Kuvyrkov,
CodeSourcery Inc.



More information about the coldfire-gnu-discuss mailing list