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: asm volatile statement reordering


On 17/10/17 08:58, Andrew Haley wrote:
On 17/10/17 08:32, Jeffrey Walton wrote:
GCC guesses wrong on occasion. It will remove code that has value that
but does not produce an output because the language does not allow us
to express it.

The C language lacks what we need to express what we need to do. Its a
failure of the C (and C++) committees. Its not a GCC failure.

I disagree.  If you want a bunch of asms to execute in a particular
order, add a memory clobber or some dependencies.  It's not difficult
once you have the understanding.  In this particular case, fixing it
is trivial, and there are many ways to do it.

This is true, but - although I could be wrong - I think these solutions are not part of the standards. They are GCC specific. Jeffrey was talking about the C/C++ standards.


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