aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2011-10-21 12:48:04 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2011-10-21 12:48:04 +0000
commitd573919e7c70042a4d9d260b57ec84d10c099280 (patch)
tree0e6d975520d904cf483abcc29700d8a023b36772 /gcc
parent8076c3e3e4e29ce18299bc1e5e3e1535993eaf15 (diff)
downloadgcc-d573919e7c70042a4d9d260b57ec84d10c099280.zip
gcc-d573919e7c70042a4d9d260b57ec84d10c099280.tar.gz
gcc-d573919e7c70042a4d9d260b57ec84d10c099280.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/avr/libgcc.S18
2 files changed, 15 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6b8be05..ac292bc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/gcc/config/avr/libgcc.S b/gcc/config/avr/libgcc.S
index 8df3607..8c369c9 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.
@@ -821,17 +822,12 @@ ENDF __tablejump2__
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
@@ -842,7 +838,8 @@ DEFUN __tablejump__
lpm
push r0
#if defined (__AVR_HAVE_EIJMP_EICALL__)
- push __zero_reg__
+ in __tmp_reg__, __EIND__
+ push __tmp_reg__
#endif
ret
#endif /* !HAVE_LPMX */
@@ -1034,7 +1031,8 @@ DEFUN __tablejump_elpm__
elpm
push r0
#if defined (__AVR_HAVE_EIJMP_EICALL__)
- push __zero_reg__
+ in __tmp_reg__, __EIND__
+ push __tmp_reg__
#endif
ret
#endif