This is the mail archive of the gcc-bugs@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]

[Bug target/34736] [avr] optimiser does not keep interrupt disabled blocks small



------- Comment #4 from eric dot weddington at atmel dot com  2009-08-24 17:07 -------
The cli() and sei() macros from avr-libc are volatile and generate inline
assembly, which the compiler knows nothing about. The compiler is not aware
that the load of the constant into a register can be done, and should be done,
outside of your critical block.

I suggest that you write this whole code snippet in inline assembly to get the
shortest possible time with interrupts disabled.


-- 

eric dot weddington at atmel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34736


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