Commit d573919e by Georg-Johann Lay Committed by Georg-Johann Lay

re PR target/50820 ([avr] Use EIND consistently)

	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
parent 8076c3e3
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> 2011-10-21 Bernd Schmidt <bernds@codesourcery.com>
* config/c6x/c6x.md (attr "op_pattern"): New. * config/c6x/c6x.md (attr "op_pattern"): New.
...@@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define __SP_H__ 0x3e #define __SP_H__ 0x3e
#define __SP_L__ 0x3d #define __SP_L__ 0x3d
#define __RAMPZ__ 0x3B #define __RAMPZ__ 0x3B
#define __EIND__ 0x3C
/* Most of the functions here are called directly from avr.md /* Most of the functions here are called directly from avr.md
patterns, instead of using the standard libcall mechanisms. patterns, instead of using the standard libcall mechanisms.
...@@ -821,17 +822,12 @@ ENDF __tablejump2__ ...@@ -821,17 +822,12 @@ ENDF __tablejump2__
DEFUN __tablejump__ DEFUN __tablejump__
#if defined (__AVR_HAVE_LPMX__) #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 __tmp_reg__, Z+
lpm r31, Z lpm r31, Z
mov r30, __tmp_reg__ mov r30, __tmp_reg__
#if defined (__AVR_HAVE_EIJMP_EICALL__)
eijmp
#else
ijmp ijmp
#endif #endif
...@@ -842,7 +838,8 @@ DEFUN __tablejump__ ...@@ -842,7 +838,8 @@ DEFUN __tablejump__
lpm lpm
push r0 push r0
#if defined (__AVR_HAVE_EIJMP_EICALL__) #if defined (__AVR_HAVE_EIJMP_EICALL__)
push __zero_reg__ in __tmp_reg__, __EIND__
push __tmp_reg__
#endif #endif
ret ret
#endif /* !HAVE_LPMX */ #endif /* !HAVE_LPMX */
...@@ -1034,7 +1031,8 @@ DEFUN __tablejump_elpm__ ...@@ -1034,7 +1031,8 @@ DEFUN __tablejump_elpm__
elpm elpm
push r0 push r0
#if defined (__AVR_HAVE_EIJMP_EICALL__) #if defined (__AVR_HAVE_EIJMP_EICALL__)
push __zero_reg__ in __tmp_reg__, __EIND__
push __tmp_reg__
#endif #endif
ret ret
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment