[Top][All Lists]

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

Re: [avr-gcc-list] Add builtins in avr target.

From: Wouter van Gulik
Subject: Re: [avr-gcc-list] Add builtins in avr target.
Date: Tue, 22 Apr 2008 09:33:05 +0200
User-agent: Thunderbird (Windows/20080213)

Anatoly Sokolov schreef:

I have considered all proposals on changing '__builtin_avr_delay_cycles' 
builtin. Also has  added '__builtin_avr_fmul*' builtins.

There is one thing that crosses my mind. A user would not only want a

void    interrupt_enable  (void)
uint8_t interrupt_disable (void)

but also a

void interrupt_restore  (uint8_t)

In 99% of the cases interrupt_disable would be used, the user needs an option to restore the interrupt flag to it's previous state. This feature would also make the atomic access builtin set of GCC functions reachable. See http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Atomic-Builtins.html#Atomic-Builtins
for more detail.



reply via email to

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