public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "segher at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/101865] _ARCH_PWR8 is not defined when using -mcpu=power8
Date: Wed, 25 Aug 2021 14:39:01 +0000	[thread overview]
Message-ID: <bug-101865-4-Ssl03gYa6H@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101865-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101865

--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to HaoChen Gui from comment #6)
> (In reply to Segher Boessenkool from comment #5)
> > (In reply to HaoChen Gui from comment #4)
> > > I wonder if it's a Power8 architecture when those 6 options are all
> > > disabled. Or it is regressed to Power7? The "_ARCH_PWR8" represents the
> > > hardware architecture or the ISA it can be taken?
> > 
> > It says what version of the ISA is effective.  It should correspond to the
> > -mcpu= used.
> > 
> > Even if it would be possible to use -mcpu=power8 and then other command line
> > flags that set everything back to it being just like Power7 (architecturally
> > that is, ignoring scheduling etc.), we should still define _ARCH_PWR8.
> 
> Thanks for your comments. If it's architecturally Power7, why we still need
> to define _ARCH_PWR8. Does _ARCH_PWR8 impact anything during the compiling?
> Could we just use mcpu instead? Seems _ARCH_PWR8 only affects instruction
> selection right now.

No, it is *not* architecturally a p7.  A p8 is a p8, whether you manage to
disable everything that makes it differ from a p7 or not.

The _ARCH_PWRn predefines are made by the compiler based on the -mcpu= flag
it is provided, so that user code can change what it does if it wants, as
Tulio says.  The define is not used by the compiler itself, it has more direct
ways of getting this info (TARGET_* macros for example).

  parent reply	other threads:[~2021-08-25 14:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 19:41 [Bug target/101865] New: " tuliom at ascii dot art.br
2021-08-11 20:11 ` [Bug target/101865] " segher at gcc dot gnu.org
2021-08-18 14:12 ` wschmidt at gcc dot gnu.org
2021-08-18 15:39 ` segher at gcc dot gnu.org
2021-08-24  7:39 ` guihaoc at gcc dot gnu.org
2021-08-24 16:46 ` segher at gcc dot gnu.org
2021-08-25  2:34 ` guihaoc at gcc dot gnu.org
2021-08-25 14:00 ` tuliom at ascii dot art.br
2021-08-25 14:39 ` segher at gcc dot gnu.org [this message]
2021-08-26  0:52 ` guihaoc at gcc dot gnu.org
2021-08-26 13:21 ` tuliom at ascii dot art.br
2021-08-26 13:46 ` wschmidt at gcc dot gnu.org
2021-08-26 13:56 ` tuliom at ascii dot art.br
2021-08-31 16:09 ` bergner at gcc dot gnu.org
2021-08-31 16:26 ` wschmidt at linux dot ibm.com
2021-08-31 16:37 ` segher at gcc dot gnu.org
2021-08-31 16:42 ` segher at gcc dot gnu.org
2024-04-03 22:22 ` bergner at gcc dot gnu.org
2024-04-10  2:41 ` cvs-commit at gcc dot gnu.org
2024-04-11 22:38 ` bergner at gcc dot gnu.org
2024-04-12 20:27 ` cvs-commit at gcc dot gnu.org
2024-04-12 20:28 ` bergner at gcc dot gnu.org
2024-05-02  3:38 ` cvs-commit at gcc dot gnu.org
2024-05-02  3:38 ` cvs-commit at gcc dot gnu.org
2024-05-02 13:20 ` cvs-commit at gcc dot gnu.org
2024-05-02 13:20 ` cvs-commit at gcc dot gnu.org
2024-05-02 23:09 ` cvs-commit at gcc dot gnu.org
2024-05-02 23:09 ` cvs-commit at gcc dot gnu.org
2024-05-02 23:10 ` bergner at gcc dot gnu.org

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=bug-101865-4-Ssl03gYa6H@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).