Predefined Version expansion
Dan
murpsoft at hotmail.com
Tue Apr 3 07:48:01 PDT 2007
Walter Bright Wrote:
> I think what you need is a runtime check, which is provided in std.cpuid.
So what you're saying is, we can't optimize the compiler for a specific variation of the x86, and are therefore stuck with writing generic programs that branch off for each cpu kind during runtime?
@Jarrett: It would be completely pointless to virtualize SSE3, or any other x86 upgrade. They provide instructions to assist with optimization. Virtualizing it is a huge de-optimization.
If you somehow version'd off some asm, you could write asm for x86_64, one for x86 with SSE2, and one for the rest, and you'd have reasonable version control with fallbacks. If the compiler was targetting an x86 without any extensions, it would automatically choose the right code.
Is it bad to allow that?
More information about the Digitalmars-d
mailing list