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: Joerg Wunsch
Subject: Re: [avr-gcc-list] Avr-gcc Removing Port Register Access
Date: Sat, 26 Aug 2006 07:56:46 +0200 (MET DST)

User Tomdean <address@hidden> wrote:

> Looking at the output from avr-objdump, if the last sbi in the code
> block is an access to the same register as the previous sbi, the
> last sbi is dropped, even if the bits are different.  If the last
> sbi in the code block is an access to a different register than the
> previous sbi, the instruction is kept.

(Btw., no need to use avr-objdump.  Replace the -c in the compilation
by a -S, and you can see the generated assembly code directly.)

Can you specify that as a fully compilable example that is known to
experience the problem with your compiler?  Which processor, which
optimization options?  With the few lines of code you provided, I
could neither reproduce it with GCC 3.4.6 nor 4.1.0 (both the FreeBSD
versions).

As the IO registers are marked volatile, the compiler is never
supposed to drop any access to them.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

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