Header for _blsr_u64 with Sun supplied GCC on Solaris 11?
问题 We've got some code that runs on multiple platforms. The code uses BMI/BMI2 intrinsics when available, like a Core i7 5th gen. GCC supplied by Sun on Solaris 11.3 is defining __BMI__ and __BMI2__ , but its having trouble locating BMI/BMI2 intrinsics: $ cat test.cxx #include <x86intrin.h> int main(int argc, char* argv[]) { unsigned long long t = argc; #if defined(__BMI__) || defined(__BMI2__) t = _blsr_u64(t); #endif return int(t); } $ /bin/g++ -march=native test.cxx -o test.exe test.cxx: In