This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

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


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


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