This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,avr] Make jump tables work with bootloader
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg Lay <Georg dot Lay at hightec-rt dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 10 Sep 2014 20:22:52 +0400
- Subject: Re: [patch,avr] Make jump tables work with bootloader
- Authentication-results: sourceware.org; auth=none
- References: <540DE364 dot 1060006 at hightec-rt dot com>
2014-09-08 21:12 GMT+04:00 Georg Lay <Georg.Lay@hightec-rt.com>:
> avr-gcc puts jump tables in section .progmem.gcc_sw_table and assumes that
> .text starts at 0, i.e. LPM is on order to read table entries.
>
> This is no more the case if .text starts ata higher address like typically
> used with boot loaders.
>
> This patch adds the few instructions to set RAMPZ and make casesi and
> __tablejump2__ more generic. __tablejump__ and __tablejump_elpm__ are no
> more needed. Moreover, using gs() for a jump table is odd because the
> linker should never generate a stub for this; thus use pm_lo8 etc. instead
> of gs() for >128k devices.
>
> Ok for trunk?
Ok.
Denis.