This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[AVR, commited] Disbale interrupt in '_exit'
- From: "Anatoly Sokolov" <aesok at post dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Cc: eweddington at cso dot atmel dot com
- Date: Sat, 19 Jan 2008 15:02:45 +0300
- Subject: [AVR, commited] Disbale interrupt in '_exit'
Hi.
The function _exi run into an infinite loop. However,
interrupts
are still potentially enabled at that point so it's quite
possible
the application would just proceed anyway.
This patch add CLI instructions before loop.
2008-01-19 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.S (_exit): Disable interrupt.
Index: gcc/config/avr/libgcc.S
===================================================================
--- gcc/config/avr/libgcc.S (revision 131612)
+++ gcc/config/avr/libgcc.S (working copy)
@@ -647,6 +648,7 @@
/* Code from .fini8 ... .fini1 sections inserted by ld
script. */
.section .fini0,"ax",@progbits
+ cli
__stop_program:
rjmp __stop_program
.endfunc
Anatoly.