Error: value too large for field of 2 bytes with FBcc

Nick Barratt NBarratt at Opto22.com
Thu May 8 17:03:15 UTC 2008


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.

Thanks,

Nick Barratt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/coldfire-gnu-discuss/attachments/20080508/09e9982f/attachment.html>


More information about the coldfire-gnu-discuss mailing list