From: Jakub Jelinek <jakub@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Hongyu Wang <wwwhhhyyy333@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Uros Bizjak <ubizjak@gmail.com>
Subject: Re: [PATCH v3] x86: Don't enable UINTR in 32-bit mode
Date: Tue, 13 Jul 2021 20:59:17 +0200 [thread overview]
Message-ID: <20210713185917.GS2380545@tucnak> (raw)
In-Reply-To: <CAMe9rOqzYRdhcZ3iW9Y1ekEzyVOyPDz6F91=0xSeabmib5=mTw@mail.gmail.com>
On Tue, Jul 13, 2021 at 09:35:18AM -0700, H.J. Lu wrote:
> Here is the v3 patch. OK for master?
From my POV LGTM, but please give Uros a chance to chime in.
> From ceab81ef97ab102c410830c41ba7fea911170d1a Mon Sep 17 00:00:00 2001
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Date: Fri, 9 Jul 2021 09:16:01 -0700
> Subject: [PATCH v3] x86: Don't enable UINTR in 32-bit mode
>
> UINTR is available only in 64-bit mode. Since the codegen target is
> unknown when the the gcc driver is processing -march=native, to properly
> handle UINTR for -march=native:
>
> 1. Pass "arch [32|64]" and "tune [32|64]" to host_detect_local_cpu to
> indicate 32-bit and 64-bit codegen.
> 2. Change ix86_option_override_internal to enable UINTR only in 64-bit
> mode for -march=CPU when PTA_CPU includes PTA_UINTR.
>
> gcc/
>
> PR target/101395
> * config/i386/driver-i386.c (host_detect_local_cpu): Check
> "arch [32|64]" and "tune [32|64]" for 32-bit and 64-bit codegen.
> Enable UINTR only for 64-bit codegen.
> * config/i386/i386-options.c
> (ix86_option_override_internal::DEF_PTA): Skip PTA_UINTR if not
> in 64-bit mode.
> * config/i386/i386.h (ARCH_ARG): New.
> (CC1_CPU_SPEC): Pass "[arch|tune] 32" for 32-bit codegen and
> "[arch|tune] 64" for 64-bit codegen.
>
> gcc/testsuite/
>
> PR target/101395
> * gcc.target/i386/pr101395-1.c: New test.
> * gcc.target/i386/pr101395-2.c: Likewise.
> * gcc.target/i386/pr101395-3.c: Likewise.
Jakub
next prev parent reply other threads:[~2021-07-13 18:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 1:51 [PATCH v2] " H.J. Lu
2021-07-13 6:55 ` Jakub Jelinek
2021-07-13 16:35 ` [PATCH v3] " H.J. Lu
2021-07-13 18:59 ` Jakub Jelinek [this message]
2021-07-14 5:52 ` Uros Bizjak
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=20210713185917.GS2380545@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=ubizjak@gmail.com \
--cc=wwwhhhyyy333@gmail.com \
/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).