[PATCH][m68k] Fix 'value out of range' error for jump table references

Maxim Kuvyrkov maxim@codesourcery.com
Fri Mar 14 10:56:00 GMT 2008


Andreas Schwab wrote:
> Maxim Kuvyrkov <maxim@codesourcery.com> writes:
> 
>> Hello, Andreas,
>>
>> The below patch forbids use of addressing mode 7 (PC-relative indexed with
>> offset) for jump table references on certain targets.
>>
>> On ColdFire the offset in mode 7 must fit within 1 byte.  If the jump
>> table is big enough (i.e., case's in switch statement contain big chunks
>> of code) the offset might overflow 127 bytes limit which will result in
>> value out of range' error at assembly-time.
> 
> That mode should only be used to address the jump table, which should be
> located directly after the insn, thus the offset should be guarateed to
> fit.

Sorry for the delay.

Unfortunately, I've lost the testcase for this issue, so the patch can 
be dropped.

--
Maxim



More information about the Gcc-patches mailing list