lkml.org 
[lkml]   [2003]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: const versus __attribute__((const))


On Tue, 9 Dec 2003, Jamie Lokier wrote:
>
> (A long time ago there was a question about whether GCC could ever
> copy the value associated with an "m" operand to a stack slot, and
> pass the address of the stack slot. After all, GCC _will_ copy the
> value if the operand is an "r", and presumably gives mixed results
> with "rm". We seem to have concluded that it never will).

We never never concluded that they never would, but we did (I think)
convince the gcc people that a memory operand to an asm should always be
considered a lvalue. That will effectively mean that we know a memory op
will never be moved around - because then it wouldn't be the same lvalue
any more (a lvalue is literally defined by its address).

So yes, I think we can depend on it now, although we historically
couldn't.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.148 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site