This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: disable avx instructions at runtime


On Sun, Mar 10, 2013 at 5:35 PM, Tim Blechmann <tim@klingt.org> wrote:
>>> 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?

I know of no way to easily disable AVX support. The framework that
enables the support was not designed to be disabled (though
it should).

The community is in the middle of a discussion right now about runtime
library tuning and what kinds of things we might expose to the users
to control. Perhaps there is an additional use case in allowing users
to tune the supported features used by the runtime.

Could you tell us a little bit more about your use case? Is this a temporary
thing where AVX support will eventually be added e.g. where hacking
glibc/sysdeps/x86_64/multiarch/init-firc.c to disable AVX is not an
option?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]