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: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Wed, 28 Jun 2017 17:04:37 -0400
- Subject: Re: [PATCH], Add check ppc_cpu_supports_hw to testsuite
- Authentication-results: sourceware.org; auth=none
- References: <20170627235321.GA13753@ibm-tiger.the-meissners.org> <20170628204850.GG16550@gate.crashing.org>
On Wed, Jun 28, 2017 at 03:48:50PM -0500, Segher Boessenkool wrote:
> As Peter said, I'd rather test for "ppc32", so this works anywhere.
Fair enough.
> That would give
>
> proc check_cpu_supports_available { } {
> if { [istarget powerpc*-*-*] } {
> return [check_runtime cpu_supports_available {
> int main() { return !__builtin_cpu_supports ("ppc32"); }
> }]
> }
>
> return 0
> }
>
> (and other archs can add their stuff then).
>
> Why did you use check_runtime_nocache btw? Is that just copy-paste?
Just copy-paste.
Like the target_clones stuff, right now, it is only x86 and PowerPC that
supports __builtin_cpu*.
I don't really see the point of having a machine independent test for
__builtin_cpu_*, but if you feel strongly about it go for it.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797