[patch,avr] Make jump tables work with bootloader

Denis Chertykov chertykov@gmail.com
Wed Sep 10 16:23:00 GMT 2014


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.



More information about the Gcc-patches mailing list