> -----Original Message-----
> From: 
> avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org 
> [mailto:avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.
> org] On Behalf Of Joerg Wunsch
> Sent: Monday, March 23, 2009 4:27 PM
> To: avr-libc-dev@nongnu.org
> Subject: Re: [avr-libc-dev] Inline assembler and compiler optimization
> 
> As Weddington, Eric wrote:
> 
> > > Likewise, the same goes for using nop(), as tempting as it is.
> > > Again, _NOP() would be fine, as will __nop().
> 
> > Hmm. I think that might be included as part of the new builtins for
> > the AVR port.
> 
> I don't think there's a reason to have that as a builtin, when it can
> be so conveniently had as an inline asm statement.  That's much
> different from __delay_cycles.

There is already a precedent. There are other instructions that are added as 
builtins: sei, cli, wdr, sleep, swap, fmul*. The AVR32 port has many more. And 
other GCC ports (IIRC e.g. ARM) seem to include every instruction as a builtin.

I just checked the builtin patch, nop needs to be added to the list (but there 
is an implementation of it that is used for the delay_cycles).

> Well, it would rather be <avr/nojtag.h> :).  Rather something like
> <avr/mcufeatures.h> or such.  After all, it's about MCUCR/MCUCSR.

How about <avr/mcu.h> then? That's fairly short and easy to remember.


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to