[Top][All Lists]

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

Re: [avr-chat] Missed Optimisation ?

From: Pertti Kellomäki
Subject: Re: [avr-chat] Missed Optimisation ?
Date: Fri, 4 Mar 2011 07:26:29 +0200

On Fri, Mar 4, 2011 at 12:05 AM, Michael Hennebry
<address@hidden> wrote:
> avr-gcc isn't obligated to produce code for anything that is not an AVR.

Herein lies the rub.

If you think of avr-gcc primarily as a tool that maps C programs to
the specific chips manufactured by Atmel, then the compiler indeed has
complete freedom to do whatever it wants as long as the external
behavior of the chip (i.e. the physical pins) is in accordance with
the source program.

On the other hand, if you think of avr-gcc primarily as a C compiler
which just happens to target the AVR architecture, then it needs to
stick to the C standard even in cases where it would not be necessary
for the Atmel chips. I would be surprised if there were no soft core
implementations of the AVR architecture on FPGA, so a non-Atmel AVR is
not such a far fetched idea.

There are also shades of gray in between the two views of avr-gcc. As
noted, the behavior wrt. sbi probably violates the ANSI standard, yet
nobody gets upset because of the convenience value offered.

reply via email to

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