[Bug target/85100] __builtin_cpu_supports avx does not verify OS supports it
njs at pobox dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 28 10:06:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85100
--- Comment #3 from Nathaniel J. Smith <njs at pobox dot com> ---
We're using it exactly like the docs recommend. What on earth is
__builtin_cpu_supports for, if not to tell you whether you can use a given
feature?
If this is by design, than at the very least the docs need to make clear that a
return value of 1 does not mean you can actually use the feature. Also, it
would be nice if gcc provided some function that *did* answer the question of
what CPU features you can use, since AFAICT this is what every current user of
__builtin_cpu_supports actually wants.
More information about the Gcc-bugs
mailing list