[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] patch to fix unbalanced 'cli' that causes interrupts
Re: [avr-gcc-list] patch to fix unbalanced 'cli' that causes interrupts to always be disabled
Sun, 1 Dec 2002 15:34:32 -0500 (EST)
Correct. I apparently solved the problem with a hammer by merely balancing
all cli with an sei. This definitely fixed my problem, yet did so at the
expense of inserting extraneous sei all over the place.
The problem appears to be with avr_output_function_epilogue() treating
signal functions the same as interrupt functions in epilogue creation. As
a result a cli is inserted prior to the exit of a signal function. This is
what I observed, yet I failed to look for the other other cli, and
hammered all with balanced sei, the incorrect solution. It was 5am, what
can I say.
I believe that the included patch addresses the real problem. The signal
function, which by definition has interrupts disabled, does not require
any cli/sei when modifying the SPH. This is the case for the prologue
function, yet not the epilogue function. This patch treats the signal
functions the same in both prologue and epilogue creation.
Description: Text document