Re: __attribute__ ifunc examples?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "ILT" == Ian Lance Taylor <iant@xxxxxxxxxx> writes:

JC>> Does anyone have a worked example in C of using attribute ifunc to
JC>> dispatch over the various x86 SSE/AVX flags, as well as arm neon?

ILT> For your case you need to write foo_ifunc using appropriate asm
ILT> instructions to check cpuid or whatever.

Thanks, but that much I already got out of the docs.  I was hoping for
an example of actual checks for the various cpu features for x86 & arm
in the ifunc context.

The existing cpu feature detectors out in the wild, plus the i+a+v docs,
should provide enough extra clue, of course.  Just a matter of coding,
after all. 

ILT> At present you have to call it manually.  There is an outstanding patch
ILT> to add __builtin_cpuid on x86 systems, but I don't think it has been
ILT> approved.

That would be a useful addition.

Thank you.

-JimC
-- 
James Cloos <cloos@xxxxxxxxxxx>         OpenPGP: 1024D/ED7DAEA6


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux