This is the mail archive of the 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 Wed, Jun 28, 2017 at 09:58:40AM -0500, Peter Bergner wrote:
> 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?

I wanted to make sure the test actually returned true in the correct test.
I.e. guarantee that the machine had VSX instructions (i.e. the asm) and that
__builtin_cpu_supports returned true.

But if you wanted to use a previous ISA flag, feel free to submit patches.  I
just wanted a quick way to make sure the clone tests were run properly when GCC
was configured with a 2.23 GLIBC or newer.

Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email:, phone: +1 (978) 899-4797

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