d3bug
Commendable
The problem with your argument is Intel's own compiler which is not that widely used in most software development. That is kinda beating a dead horse. Nowadays Intel's compiler is mostly used in datacenters and HPC environment (for servers and supercomputers). Actually the most widely used compiler is Microsoft's own compilers (for their Microsoft Visual Studio development platform). Heck besides Microsoft's own software, many games also uses Microsoft compilers. If you want to blame software preference then look at Microsoft was well.
I am aware of that, and it uses the same CPU dispatcher as the Intel compiler. There is a fix however, which I posted in this very forum. JIC you don't want to find it... you can find it yourself HERE
If you still don't want to look it up... Here you go:
Code:
// Example 13.3. Override Intel CPU dispatching
#include <stdint.h>
extern "C" {
// link to dispatcher in library libirc.lib or libirc.a
void __intel_cpu_features_init();
void __intel_cpu_features_init_x();
extern uint64_t __intel_cpu_feature_indicator;
extern uint64_t __intel_cpu_feature_indicator_x;
}
// call this function in the beginning of your program:
void dispatch_patch() {
// replace the Intel-only dispatcher with the fair dispatcher
__intel_cpu_feature_indicator = 0;
__intel_cpu_feature_indicator_x = 0;
__intel_cpu_features_init_x(); // call fair dispatcher
__intel_cpu_feature_indicator = __intel_cpu_feature_indicator_x;
Now, of course for the Microsoft compiler, you have to choose the appropriate library.