]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/50820 ([avr] Use EIND consistently)
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 2 May 2012 17:37:31 +0000 (17:37 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 2 May 2012 17:37:31 +0000 (17:37 +0000)
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
gcc/config/avr/libgcc.S

index ae5c76c90a9850cba5a937b7d9b2a6cb2de89e06..8dcbef1231d44c833af1a2e2f433a9a408c15c7d 100644 (file)
@@ -1,3 +1,12 @@
+2012-05-02  Georg-Johann Lay  <avr@gjlay.de>
+
+       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  <avr@gjlay.de>
 
        Backport from 2011-05-30 4.6-branch r174427.
index 571a0243de2017f503b2fe73e57e95c234350317..6d849773852133cf3acbe8564850774f09365589 100644 (file)
@@ -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