This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][m68k] Fix 'value out of range' error for jump table references
- From: Andreas Schwab <schwab at suse dot de>
- To: Maxim Kuvyrkov <maxim at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Jan 2008 13:21:20 +0100
- Subject: Re: [PATCH][m68k] Fix 'value out of range' error for jump table references
- References: <479CCAF2.3070902@codesourcery.com>
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."