This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH], Add check ppc_cpu_supports_hw to testsuite


On 6/27/17 6:53 PM, Michael Meissner wrote:
> 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 like the idea, but some comments...



> +		#ifdef __MACH__
> +		  asm volatile ("xxlor vs0,vs0,vs0");
> +		#else
> +		  asm volatile ("xxlor 0,0,0");
> +	        #endif

What is this hunk for?  We're only interested in the return value from
the builtin below, correct?



> +		  if (!__builtin_cpu_supports ("vsx"))
> +		    return 1;
> +		  return 0;

...and more importantly, why limit us to testing "vsx"?  Why not test
for "ppc32", which should be true for *all* kernels we'd ever run on,
including ppc32, ppc64 and ppc64le?

Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]