Martin Reinecke
2018-11-06 12:35:39 UTC
Compiling and running the following code on a CPU with BMI2 support
prints "BMI2 detected" as one would expect:
#include <stdio.h>
int main(void)
{
if (__builtin_cpu_supports("bmi2"))
printf("BMI2 detected\n");
return 0;
}
However, "bmi2" is not documented in the list of arguments at
https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions
Is this list supposed to be complete? If yes, I can open a PR. If not,
is there any other way to obtain the full list of allowed parameters?
Cheers,
Martin
prints "BMI2 detected" as one would expect:
#include <stdio.h>
int main(void)
{
if (__builtin_cpu_supports("bmi2"))
printf("BMI2 detected\n");
return 0;
}
However, "bmi2" is not documented in the list of arguments at
https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions
Is this list supposed to be complete? If yes, I can open a PR. If not,
is there any other way to obtain the full list of allowed parameters?
Cheers,
Martin