[Top][All Lists]

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

Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os

From: David Brown
Subject: Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os
Date: Fri, 23 May 2008 09:49:27 +0200
User-agent: Thunderbird (Windows/20080421)

Andy H wrote:

To quote from the first paragraph of that manual page:

The following builtins are intended to be compatible with those described in the Intel Itanium Processor-specific Application Binary Interface, section 7.4. As such, they depart from the normal GCC practice of using the “__builtin_” prefix, and further that they are overloaded such that they work on multiple types.

I've never used these functions, so I may be skating on thin ice here - you'll no doubt correct me if I'm wrong!

These "atomic access" builtins are very much specific to the Itanium - they are basically wrappers around some assembly primitives, for use in operating system fundamentals such as locks and synchronisation primitives. For other targets, people normally just use a couple of lines of inline assembly - for the Itanium, assembly language is so hideous that it's worth having these builtin wrappers.

While I think it is worth having a set of consistent atomic access builtins that work across gcc ports, I'm not sure the Itanium's functions are the best model.



reply via email to

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