[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] possible compiler bug?

From: Brian Dean
Subject: Re: [avr-gcc-list] possible compiler bug?
Date: Wed, 28 Aug 2002 22:42:29 -0400
User-agent: Mutt/1.4i

On Wed, Aug 28, 2002 at 07:28:11PM -0700, Theodore A. Roth wrote:
> But seeing this result, your argument is starting to seem more valid. The 
> desired result would be:

Precisely.  My main argument is that it shouldn't _hurt_ to do it all
the time, and certainly in the case of writing to 16 bit memory mapped
i/o registers, it makes the generated code more correct.

> I have no idea how hard it would be to implement this change in gcc.

Nor I.

> Of 
> course this doesn't obviate the need for the disabling of interrupts.

True.  But the same problem with regard to interrupts exists when it
generates 'out' instructions as well.  In either case, dealing with
interrupts should be handled independently, i.e., the compiler
shouldn't do it, the programmer should.  If one wants to disable
interrupts for a sequence of code, that should be done explicitly,

        *pwmreg = pwm;

avr-gcc-list at http://avr1.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]