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: r180299
+2011-10-21 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/50820
+ * config/avr/libgcc.S (__EIND__): New define to 0x3C.
+ (__tablejump__): Consistently use EIND for indirect jump/call.
+ (__tablejump_elpm__): Ditto.
+
2011-10-21 Bernd Schmidt <bernds@codesourcery.com>
* config/c6x/c6x.md (attr "op_pattern"): New.
#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.
DEFUN __tablejump__
#if defined (__AVR_HAVE_LPMX__)
-#if defined (__AVR_HAVE_EIJMP_EICALL__)
- lpm __tmp_reg__, Z+
- push __tmp_reg__
- lpm __tmp_reg__, Z
- push __tmp_reg__
- push __zero_reg__
- ret
-#else
lpm __tmp_reg__, Z+
lpm r31, Z
mov r30, __tmp_reg__
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+ eijmp
+#else
ijmp
#endif
lpm
push r0
#if defined (__AVR_HAVE_EIJMP_EICALL__)
- push __zero_reg__
+ in __tmp_reg__, __EIND__
+ push __tmp_reg__
#endif
ret
#endif /* !HAVE_LPMX */
elpm
push r0
#if defined (__AVR_HAVE_EIJMP_EICALL__)
- push __zero_reg__
+ in __tmp_reg__, __EIND__
+ push __tmp_reg__
#endif
ret
#endif