avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Avr-gcc Removing Port Register Access


From: User Tomdean
Subject: Re: [avr-gcc-list] Avr-gcc Removing Port Register Access
Date: Fri, 25 Aug 2006 22:53:16 -0700 (PDT)

Sorry to answer my own post, but...

The compiler is doing what I told it to.  I was using -Os.

The PORTx registers are not volatile.  I set a bit at the bottom of a
loop and, at the top of the loop, I clear it again.  So, avr-gcc
detects this and removes the sbi.

If I drop down to -O, the sbi is not removed.

Maybe the registers should be volatile?

tomdean




reply via email to

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