On 06/27/2017 05:53 PM, Michael Meissner wrote:
> The PowerPC __builtin_cpu_supports and __builtin_cpu_is built-in functions
> require GLIBC 2.23, since they use fixed words at the end of thread control
> area to store the HWCAP and HWCAP2 bits.  If the compiler was not configured
> with the appropriate GLIBC, the compiler will generate a 0 as the result of 
> the
> built-in function call.
> 
> I've been adding the target_clone attribute support to GCC, and the resolver
> function uses __builtin_cpu_supports to detect which hardware ISA is being
> used.  On systems with an older GLIBC, only the default clone function will 
> get
> called because __builtin_cpu_supports returns 0.
> 
> This adds a target supports option in dejagnu so that future tests can use 
> this
> to determine whether or not to test target_clones.
> 
> I have verified that this patch works with the patches I plan to submit
> tomorrow for enhancing the PowerPC target_clone support.
> 
> Can I install this into the trunk?
> 
> Given that GCC 7 supports __builtin_cpu_is and __builtin_cpu_supports, I would
> ask if I could backport this to GCC 7.x as well to allow future tests to be
> back ported.
> 
> 2017-06-27  Michael Meissner  <meiss...@linux.vnet.ibm.com>
> 
>       PR target/81193
>       * lib/target-supports.exp
>       (check_ppc_cpu_supports_hw_available): New test to make sure
>       __builtin_cpu_supports works on power7 and newer.
OK for the trunk.  It's not my call on the release branches though.

jeff

Reply via email to