Commit 4e324bfe authored by gjl's avatar gjl

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
parent b6df3917
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
......
......@@ -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
......
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