public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
To: Anton Blanchard <anton@ozlabs.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 1/3] powerpc64: Replace some PPC_FEATURE_HAS_VSX with PPC_FEATURE_ARCH_2_06
Date: Thu, 08 Jul 2021 19:29:38 -0300	[thread overview]
Message-ID: <87k0m0l9rh.fsf@linux.ibm.com> (raw)
In-Reply-To: <20210706105107.1866836-1-anton@ozlabs.org>

Anton Blanchard via Libc-alpha <libc-alpha@sourceware.org> writes:

> We use PPC_FEATURE_HAS_VSX to select a number of POWER7 optimised
> functions. These functions don't use any VSX instructions, so
> PPC_FEATURE_ARCH_2_06 seems like a better fit.

I don't think we can replace PPC_FEATURE_HAS_VSX with PPC_FEATURE_ARCH_2_06
because it would cause issues similar to the ones fixed in patch 3/3, i.e.
this function would run on a processor that implements the Power ISA 2.06
but does not implement Altivec.

So, if testing for PPC_FEATURE_ARCH_2_06 is important, I think it has to test
for:

    (hwcap & PPC_FEATURE_ARCH_2_06 && hwcap & PPC_FEATURE_HAS_ALTIVEC)

However, VSX was introduced by Power ISA 2.06. So, PPC_FEATURE_HAS_VSX
implies PPC_FEATURE_ARCH_2_06.  PPC_FEATURE_HAS_VSX also implies
PPC_FEATURE_HAS_ALTIVEC.
The change would only make a difference if a processor implements both Power
ISA 2.06 and Altivec, but does not implement VSX.

Am I missing anything?

Another important point is to keep the tests in the IFUNC resolvers in sync
with sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
Otherwise, glibc tests and benchtests may not execute correctly.

-- 
Tulio Magno

  parent reply	other threads:[~2021-07-08 22:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 10:51 Anton Blanchard
2021-07-06 10:51 ` [PATCH 2/3] powerpc64: Check cacheline size before using optimised memset routines Anton Blanchard
2021-07-08 22:33   ` Tulio Magno Quites Machado Filho
2021-07-06 10:51 ` [PATCH 3/3] powerpc64: Add checks for Altivec and VSX in ifunc selection Anton Blanchard
2021-07-06 15:05 ` [PATCH 1/3] powerpc64: Replace some PPC_FEATURE_HAS_VSX with PPC_FEATURE_ARCH_2_06 Adhemerval Zanella
2021-07-08 22:29 ` Tulio Magno Quites Machado Filho [this message]
2021-07-13 19:03   ` Adhemerval Zanella
2021-07-16 13:28     ` Tulio Magno Quites Machado Filho
2021-07-26 23:23       ` Anton Blanchard
2021-07-27  5:47 Anton Blanchard
2021-08-06 19:48 ` Tulio Magno Quites Machado Filho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0m0l9rh.fsf@linux.ibm.com \
    --to=tuliom@linux.ibm.com \
    --cc=anton@ozlabs.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).