asm volatile statement reordering
Jeffrey Walton
noloader@gmail.com
Tue Oct 17 08:42:00 GMT 2017
>> 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.
>
> Yes, the compiler is bad at guessing what you mean. It does not even
> try; it only cares about what you *say*.
I've had both SIGILL probes and memory zeroizers removed by GCC. I was
very clear about what I said should be done.
The language did not give me a way to tell GCC, please don't mess with
this code and please ensure it executes like I've written it.
Jeff
More information about the Gcc-help
mailing list