From d0ce847b824806451082749e61294eeadc8b0af5 Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 2 May 2012 17:37:31 +0000 Subject: [PATCH] backport: re PR target/50820 ([avr] Use EIND consistently) Backport from 2011-10-21 4.6-branch 180303. PR target/50820 * config/avr/libgcc.S (__EIND__): New define to 0x3C. (__tablejump__): Consistently use EIND for indirect jump/call. (__tablejump_elpm__): Ditto. From-SVN: r187059 --- gcc/ChangeLog | 9 +++++++++ gcc/config/avr/libgcc.S | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae5c76c90a98..8dcbef1231d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-05-02 Georg-Johann Lay + + Backport from 2011-10-21 4.6-branch 180303. + + PR target/50820 + * config/avr/libgcc.S (__EIND__): New define to 0x3C. + (__tablejump__): Consistently use EIND for indirect jump/call. + (__tablejump_elpm__): Ditto. + 2012-05-02 Georg-Johann Lay Backport from 2011-05-30 4.6-branch r174427. diff --git a/gcc/config/avr/libgcc.S b/gcc/config/avr/libgcc.S index 571a0243de20..6d8497738521 100644 --- a/gcc/config/avr/libgcc.S +++ b/gcc/config/avr/libgcc.S @@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define __SP_H__ 0x3e #define __SP_L__ 0x3d #define __RAMPZ__ 0x3B +#define __EIND__ 0x3C /* Most of the functions here are called directly from avr.md patterns, instead of using the standard libcall mechanisms. @@ -689,7 +690,8 @@ __tablejump__: lpm push r0 #if defined (__AVR_HAVE_EIJMP_EICALL__) - push __zero_reg__ + in __tmp_reg__, __EIND__ + push __tmp_reg__ #endif ret #endif @@ -889,7 +891,8 @@ __tablejump_elpm__: elpm push r0 #if defined (__AVR_HAVE_EIJMP_EICALL__) - push __zero_reg__ + in __tmp_reg__, __EIND__ + push __tmp_reg__ #endif ret #endif -- 2.47.2