public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Peter Bergner <bergner@linux.ibm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] rs6000/test: Fix bswap64-4.c with has_arch_ppc64 [PR106680]
Date: Mon, 5 Sep 2022 10:35:48 +0800	[thread overview]
Message-ID: <77fb914e-6ff2-3f6b-c7ff-02b2454e6859@linux.ibm.com> (raw)
In-Reply-To: <20220902174435.GX25951@gate.crashing.org>

on 2022/9/3 01:44, Segher Boessenkool wrote:
> On Fri, Sep 02, 2022 at 08:51:01AM +0800, Kewen.Lin wrote:
>> on 2022/9/1 23:04, Segher Boessenkool wrote:
>>> On Thu, Sep 01, 2022 at 05:05:44PM +0800, Kewen.Lin wrote:
>>>> Without any explicit -mpowerpc64 (and -mno-), I think we all agree
>>>> that -m64 should set OPTION_MASK_POWERPC64 in opts, conversely -m32
>>>> should unset OPTION_MASK_POWERPC64 in opts.
>>>
>>> The latter only for OSes that do not handle -mpowerpc64 correctly.
>>
>> I think it's the same for the OSes that handle -mpowerpc64 correctly.
> 
> No.  -m32 should not set or unset POWERPC64.  The two options are
> independent.
> 
> -m64 on the other hand forces POWERPC64 to on.  -m64 -mno-powerpc64 is
> invalid (and we do indeed error on that).  But we do allow
>   -m32 -mno-powerpc64 -m64
> (silently enabling it again), urgh.

I just realized the discussion here depends on how we implemented it,
I can understand what you mean now.  Yes, if we implemented it like the
other option supports in rs6000_option_override_internal, we only get
-m32 or -m64 eventually, we don't need to do anything for -m32 but need
to forces POWERPC64 for -m64 if it's not set in opts_set.  The current
implementation by setting and unsetting in command line option handling
is bad, it makes us have to set/unset on the way.

> 
>>
>> Note that it's for the context without any explicit -mpowerpc64 (and
>> -mno-), assuming we don't "unset OPTION_MASK_POWERPC64 in opts" for
>> -m32, then the command line "-m64 -m32" would not be the same as
>> "-m32", since the previous "-m64" sets OPTION_MASK_POWERPC64 in opts
>> and it's still kept, it's unexpected.
> 
> No.  -m64 -m32 does not set POWERPC64!  Or it shouldn't, in any case :-(
> 

Yeah, (... does not set/unset), thanks again for your clarification. :)

BR,
Kewen

      reply	other threads:[~2022-09-05  2:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31  9:33 Kewen.Lin
2022-08-31 14:13 ` Peter Bergner
2022-09-01  8:57   ` Kewen.Lin
2022-09-01 14:57     ` Segher Boessenkool
2022-09-02  0:50       ` Kewen.Lin
2022-09-02 17:36         ` Segher Boessenkool
2022-09-05  2:25           ` Kewen.Lin
2022-08-31 15:24 ` Segher Boessenkool
2022-08-31 15:48   ` Peter Bergner
2022-08-31 16:05     ` Segher Boessenkool
2022-08-31 17:00       ` Peter Bergner
2022-08-31 19:28         ` Segher Boessenkool
2022-08-31 19:53           ` Peter Bergner
2022-08-31 21:07             ` Segher Boessenkool
2022-08-31 21:38               ` Peter Bergner
2022-08-31 21:49                 ` Segher Boessenkool
2022-08-31 22:17                   ` Peter Bergner
2022-09-01  9:05   ` Kewen.Lin
2022-09-01 15:04     ` Segher Boessenkool
2022-09-02  0:51       ` Kewen.Lin
2022-09-02 17:44         ` Segher Boessenkool
2022-09-05  2:35           ` Kewen.Lin [this message]

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=77fb914e-6ff2-3f6b-c7ff-02b2454e6859@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.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).