public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Rene Rebe <rene@exactcode.de>
Cc: gcc@gcc.gnu.org, sjames@gcc.gnu.org
Subject: Re: [PATCH] fix PowerPC < 7 w/ Altivec not to default to power7
Date: Fri, 8 Mar 2024 11:30:05 +0000	[thread overview]
Message-ID: <CAH6eHdSwPLQMRNCS+LMLdE1+xZ9uBFSvdj5Y6Xdn2Wjnj=LKmw@mail.gmail.com> (raw)
In-Reply-To: <20240308.122735.1470456012502302688.rene@exactcode.de>

On Fri, 8 Mar 2024 at 11:27, Rene Rebe <rene@exactcode.de> wrote:
>
> This might not be the best timing -short before a major release-,
> however, Sam just commented on the bug I filled years ago [1], so here
> we go:
>
> Glibc uses .machine to determine assembler optimizations to use.
> However, since reworking the rs6000 .machine output selection in
> commit e154242724b084380e3221df7c08fcdbd8460674 22 May 2019, G5 as
> well as Cell, and even power4 w/ -maltivec currently resulted in
> power7. Mask _ALTIVEC away as the .machine selection already did for
> GFX and GPOPT.
>
> powerpc64-t2-linux-gnu-gcc  test.c -S -o - -mcpu=G5
>         .file   "test.c"
>         .machine power7
>         .abiversion 2
>         .section        ".text"
>         .ident  "GCC: (GNU) 10.2.0"
>         .section        .note.GNU-stack,"",@progbits
>
> We ship this in T2/Linux [2] since 2020 and it is tested on G5, Cell
> and Power8.
>
> Signed-of-by: René Rebe <rene@exactcode.de>
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97367
> [2] https://t2sde.org
>
> --- gcc-11.1.0-RC-20210423/gcc/config/rs6000/rs6000.cc.vanilla  2021-04-25 22:57:16.964223106 +0200
> +++ gcc-11.1.0-RC-20210423/gcc/config/rs6000/rs6000.cc  2021-04-25 22:57:27.193223841 +0200
> @@ -5765,7 +5765,7 @@
>    HOST_WIDE_INT flags = rs6000_isa_flags;
>
>    /* Disable the flags that should never influence the .machine selection.  */
> -  flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ISEL);
> +  flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ALTIVEC | OPTION_MASK_ISEL);
>
>    if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0)
>      return "power10";


Patches should be sent to the gcc-patches list instead of this one,
and should be against trunk not an old gcc-11 RC. See
https://gcc.gnu.org/contribute.html#patches for more details - thanks!

  reply	other threads:[~2024-03-08 11:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 11:27 Rene Rebe
2024-03-08 11:30 ` Jonathan Wakely [this message]
2024-03-08 22:04   ` Peter Bergner

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='CAH6eHdSwPLQMRNCS+LMLdE1+xZ9uBFSvdj5Y6Xdn2Wjnj=LKmw@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=rene@exactcode.de \
    --cc=sjames@gcc.gnu.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).