This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]