This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], Add check ppc_cpu_supports_hw to testsuite
- From: Jeff Law <law at redhat dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Tue, 27 Jun 2017 22:33:48 -0600
- Subject: Re: [PATCH], Add check ppc_cpu_supports_hw to testsuite
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D171B83F42
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D171B83F42
- References: <20170627235321.GA13753@ibm-tiger.the-meissners.org>
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 <meissner@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