diff options
author | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-06 15:04:09 +0000 |
---|---|---|
committer | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-06 15:04:09 +0000 |
commit | 8c8193e1f5f49c161d53cfff7494e2e4f7704731 (patch) | |
tree | 55fe407836f382ac16da8b2665c7119175760165 /libgcc | |
parent | 9d734fa8cb3d2255d8947e484ed998724a333568 (diff) | |
download | gcc-8c8193e1f5f49c161d53cfff7494e2e4f7704731.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 10 | ||||
-rw-r--r-- | libgcc/config/avr/lib1funcs.S | 28 |
2 files changed, 38 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 9ad344eea2e..cde3853b72f 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 c592c4caa5d..3545d095b60 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) */ |