For anyone who has done game development on a PC, does a PC binary contain code for different architectures or just the min spec one?
For example, Nehalem introduced SSE4.2, Sandy Briddge introduced 256-bit AVX, Haswell will introduce AVX2. Obviously the compiler would have to generate code for those instructions and at runtime, the program would have to choose the proper code path to take depending on the CPU to execute it.
Is this the kind of thing that's done, or are games pretty much compile for min spec CPU only and you get improved performance not by new ISA features, just by executing old code faster?
For example, Nehalem introduced SSE4.2, Sandy Briddge introduced 256-bit AVX, Haswell will introduce AVX2. Obviously the compiler would have to generate code for those instructions and at runtime, the program would have to choose the proper code path to take depending on the CPU to execute it.
Is this the kind of thing that's done, or are games pretty much compile for min spec CPU only and you get improved performance not by new ISA features, just by executing old code faster?