[4.7][google]Support for getting CPU type and feature information at run-time. (issue4893046)

Richard Guenther richard.guenther@gmail.com
Fri Aug 19 11:55:00 GMT 2011


On Fri, Aug 19, 2011 at 12:08 AM, Richard Henderson <rth@redhat.com> wrote:
> On 08/18/2011 02:51 PM, Sriraman Tallam wrote:
>> Oh!, right, sorry. So, the only available option now is to mark it as
>> a constructor in libgcc.
>
> Or call it explicitly from the out-of-line tests.
>
> The thing is, if you intend to use this from ifunc tests, I believe
> that these can run *extremely* early.  E.g. LD_BIND_NOW=1 will run
> these while relocating the entire application, and therefore before
> any of DT_INIT (aka .ctors), DT_INIT_ARRAY, or DT_PREINIT_ARRAY.

So make sure that __cpu_indicator initially has a conservative correct
value?  I'd still prefer the constructor-in-libgcc option - if only because
then the compiler-side is much simplified.

Richard.

>
> r~
>



More information about the Gcc-patches mailing list