aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2011-12-06 15:04:09 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2011-12-06 15:04:09 +0000
commit28c5e6b58f86f8f5446b959cb1decc1b6d6f7577 (patch)
tree55fe407836f382ac16da8b2665c7119175760165 /libgcc
parent562f552bd866b17d9425b443d341e1fb5f7d1184 (diff)
downloadgcc-28c5e6b58f86f8f5446b959cb1decc1b6d6f7577.zip
gcc-28c5e6b58f86f8f5446b959cb1decc1b6d6f7577.tar.gz
gcc-28c5e6b58f86f8f5446b959cb1decc1b6d6f7577.tar.bz2
Forward-port from gcc-4_6-branch r181936 2011-12-02.
libgcc/ Forward-port from gcc-4_6-branch r181936 2011-12-02. PR target/51345 PR target/51002 * config/avr/lib1funcs.S (__prologue_saves__, __epilogue_restores__, __divdi3_moddi3): Enclose parts using __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__). Add FIXME comments. gcc/ Forward-port from gcc-4_6-branch r181936 2011-12-02. PR target/51002 * config/avr/avr.md (movhi_sp_r): Set insn condition to !AVR_HAVE_8BIT_SP. * config/avr/avr.c (output_movhi): Use "clr%B0" instead of "in %B0,__SP_H__" if AVR_HAVE_8BIT_SP. (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP. From-SVN: r182052
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog10
-rw-r--r--libgcc/config/avr/lib1funcs.S28
2 files changed, 38 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 9ad344e..cde3853 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,13 @@
+2011-12-06 Georg-Johann Lay <avr@gjlay.de>
+
+ Forward-port from gcc-4_6-branch r181936 2011-12-02.
+
+ PR target/51345
+ PR target/51002
+ * config/avr/lib1funcs.S (__prologue_saves__,
+ __epilogue_restores__, __divdi3_moddi3): Enclose parts using
+ __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__). Add FIXME comments.
+
2011-12-04 Iain Sandoe <iains@gcc.gnu.org>
* config/rs6000/t-darwin64 (LIB2ADD): Add fp and gp save routines.
diff --git a/libgcc/config/avr/lib1funcs.S b/libgcc/config/avr/lib1funcs.S
index c592c4c..3545d09 100644
--- a/libgcc/config/avr/lib1funcs.S
+++ b/libgcc/config/avr/lib1funcs.S
@@ -1149,7 +1149,14 @@ DEFUN __divdi3_moddi3
4: ;; Epilogue: Restore the Z = 12 Registers and return
in r28, __SP_L__
+#if defined (__AVR_HAVE_8BIT_SP__)
+;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
+;; so this lines are dead code. To make it work, devices without
+;; SP_H must get their own multilib(s).
+ clr r29
+#else
in r29, __SP_H__
+#endif /* #SP = 8/16 */
ldi r30, 12
XJMP __epilogue_restores__ + ((18 - 12) * 2)
@@ -1229,6 +1236,15 @@ DEFUN __prologue_saves__
push r17
push r28
push r29
+#if defined (__AVR_HAVE_8BIT_SP__)
+;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
+;; so this lines are dead code. To make it work, devices without
+;; SP_H must get their own multilib(s).
+ in r28,__SP_L__
+ sub r28,r26
+ out __SP_L__,r28
+ clr r29
+#else
in r28,__SP_L__
in r29,__SP_H__
sub r28,r26
@@ -1238,6 +1254,8 @@ DEFUN __prologue_saves__
out __SP_H__,r29
out __SREG__,__tmp_reg__
out __SP_L__,r28
+#endif /* #SP = 8/16 */
+
#if defined (__AVR_HAVE_EIJMP_EICALL__)
eijmp
#else
@@ -1270,6 +1288,15 @@ DEFUN __epilogue_restores__
ldd r16,Y+4
ldd r17,Y+3
ldd r26,Y+2
+#if defined (__AVR_HAVE_8BIT_SP__)
+;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
+;; so this lines are dead code. To make it work, devices without
+;; SP_H must get their own multilib(s).
+ ldd r29,Y+1
+ add r28,r30
+ out __SP_L__,r28
+ mov r28, r26
+#else
ldd r27,Y+1
add r28,r30
adc r29,__zero_reg__
@@ -1280,6 +1307,7 @@ DEFUN __epilogue_restores__
out __SP_L__,r28
mov_l r28, r26
mov_h r29, r27
+#endif /* #SP = 8/16 */
ret
ENDF __epilogue_restores__
#endif /* defined (L_epilogue) */