diff options
author | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-22 10:46:11 +0000 |
---|---|---|
committer | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-22 10:46:11 +0000 |
commit | 4e324bfe4d4bcb2fc761446dac78e9e79f99cc12 (patch) | |
tree | f46383f3fd1969c31cb468996b5c7507647b5043 /libgcc | |
parent | b6df3917eea9d73723e994ef6acbbc44a2eafb7e (diff) | |
download | ppe42-gcc-4e324bfe4d4bcb2fc761446dac78e9e79f99cc12.tar.gz ppe42-gcc-4e324bfe4d4bcb2fc761446dac78e9e79f99cc12.zip |
PR target/63223
* config/avr/lib1funcs.S (__do_global_dtors): Reverse execution
order to first...last.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 6 | ||||
-rw-r--r-- | libgcc/config/avr/lib1funcs.S | 18 |
2 files changed, 16 insertions, 8 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index ec295541630..e34db931564 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2014-10-22 Georg-Johann Lay <avr@gjlay.de> + + PR target/63223 + * config/avr/lib1funcs.S (__do_global_dtors): Reverse execution + order to first...last. + 2014-09-18 Joseph Myers <joseph@codesourcery.com> * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear diff --git a/libgcc/config/avr/lib1funcs.S b/libgcc/config/avr/lib1funcs.S index 080e250cd61..5ad1e93f13d 100644 --- a/libgcc/config/avr/lib1funcs.S +++ b/libgcc/config/avr/lib1funcs.S @@ -2390,27 +2390,29 @@ ENDF __do_global_ctors #ifdef L_dtors .section .fini6,"ax",@progbits DEFUN __do_global_dtors - ldi r17, pm_hi8(__dtors_start) - ldi r28, pm_lo8(__dtors_end) - ldi r29, pm_hi8(__dtors_end) + ldi r17, pm_hi8(__dtors_end) + ldi r28, pm_lo8(__dtors_start) + ldi r29, pm_hi8(__dtors_start) #ifdef __AVR_HAVE_EIJMP_EICALL__ - ldi r16, pm_hh8(__dtors_end) + ldi r16, pm_hh8(__dtors_start) #endif /* HAVE_EIJMP */ rjmp .L__do_global_dtors_start .L__do_global_dtors_loop: - sbiw r28, 1 #ifdef __AVR_HAVE_EIJMP_EICALL__ - sbc r16, __zero_reg__ mov r24, r16 #endif /* HAVE_EIJMP */ mov_h r31, r29 mov_l r30, r28 XCALL __tablejump2__ + adiw r28, 1 +#ifdef __AVR_HAVE_EIJMP_EICALL__ + adc r16, __zero_reg__ +#endif /* HAVE_EIJMP */ .L__do_global_dtors_start: - cpi r28, pm_lo8(__dtors_start) + cpi r28, pm_lo8(__dtors_end) cpc r29, r17 #ifdef __AVR_HAVE_EIJMP_EICALL__ - ldi r24, pm_hh8(__dtors_start) + ldi r24, pm_hh8(__dtors_end) cpc r16, r24 #endif /* HAVE_EIJMP */ brne .L__do_global_dtors_loop |