I have some code that I would like to run a quick built-in CPU popcnt instruction (when __builtin_popcountll compiled using the correct flags like g++ -mpopcnt or clang++ -march=corei7 , this happens), but will also be able to return to the code when cpuid shows that the CPU does not support the HW instruction.
Of course, in order to get a return code that I trust, people compilers are implemented correctly (so I donβt need to enter C or asm code for my popcount) I need a separate compilation unit that compiled without the -mpopcnt or -march=corei7 .
Does only compiled code bind in a single way? Are there any built-in compilers or other types of tooltips or other built-in modules that I don't know about what I can use to generate popcount backup code?
source share