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


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.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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