disable avx instructions at runtime

Tim Blechmann tim@klingt.org
Sun Mar 10 21:35:00 GMT 2013


>> i'm using a debugger, that does not support avx instructions (at least
>> the back-in-time functionality doesn't). unfortunately, glibc/libm uses
>> some sort of runtime dispatching to provide an avx-implementation for
>> mathematical functions like sin or cos.
> 
> yes, it uses cpuid to detect support.  there were bugs though in the 
> implementation in older releases that caused it to get used when it shouldn't.  
> try using glibc-2.17.


it is a bit tricky: my debugger provides a replay engine, which prbly
maps cpuid to the physical instruction, but it does not understand avx
instructions. so i'd like to to disable the avx-specific code,
*although* cpuid would allow them.

otherwise, is it possible to compile glibc, disabling the runtime
dispatching?

thnx, tim



More information about the Libc-help mailing list