As I mentioned earlier, C++11 allows the memory model to be determined
at runtime. Rather than invoke a call to a runtime library or inline a
switch statement with all the valid options, just default to SEQ_CST
mode. This can easily be changed later if it is determined to be needed.
The documentation in extend.texi looks like:
Note that the C++11 standard allows for the memory model parameter
to be determined at runtime rather than at compile time. These
builtins will map any runtime value to __SYNC_MEM_SEQ_CST rather than
invoke a runtime library call or inline a switch statement. This is
standard compliant, safe, and the simplest approach for now.
Bootstrapped and no new regressions on x86_64-unknown-linux-gnu.
Andrew