This is the mail archive of the gcc-help@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: Inline assembly without inputs considered const/pure?


On 02/25/2016 05:15 PM, Matthias Pfaller wrote:

> So that's not a solution I would like to use. I could use "i" (&poo)
> (which would yeld an #poo to get discarded), but I does that count
> as a memory reference?

It's tough to persuade GCC that data magically appears from nowhere,
but it's not so volatile that you have to read it (as in a
memory-mapped peripheral, where register must be read because they
have side effects).  Anything I tell you know beyond the most
straightforward interpretation might break in the future, or indeed
the past.  I can tell you that GCC 6 on AArch64 doesn't need the
volatile memory input.  Maybe some other version will.

Andrew.


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