Inline assembly without inputs considered const/pure?
Andrew Haley
aph@redhat.com
Thu Feb 25 17:49:00 GMT 2016
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.
More information about the Gcc-help
mailing list