This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Request for discussion: Rewrite of inline assembler docs


On 28-Mar-14 01:46 PM, Hannes Frederic Sowa wrote:
On Fri, Mar 28, 2014 at 09:41:41AM +0000, Andrew Haley wrote:
Ok, I see the problem. Maybe something like this by avoiding the term? Using this clobber causes the compiler to flush all (modified) registers being used to store values which gcc decided to originally allocate in memory before executing the @code{asm} statement.
What is true here is that all registers used to cache variables that
are reachable from pointers in the program are flushed.  Anything that
is statically allocated is reachable, as is anything dynamically
allocated by malloc; auto variables are not reachable unless their
address is taken.
One would have to go into detail of various optimizations which could
remove the address taking e.g. IMHO the last sentence of the paragraph already
deals with this.

Bye,

   Hannes

By this wording (gcc decided), the consequences are unpredictable. You should probably mention the registers which will definitely be flushed and thereby limit the ambiguity.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]