public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: gcc-patches@gcc.gnu.org, hongtao.liu@intel.com
Subject: Re: [PATCH] x86: Define __APX_F__ for -mapxf
Date: Thu, 4 Apr 2024 20:46:27 +0200	[thread overview]
Message-ID: <CAFULd4bpkCjDNa1sHvuC3z8fSGHA1VhEvtXcjeGTD130ODTu=g@mail.gmail.com> (raw)
In-Reply-To: <20240404150840.323244-1-hjl.tools@gmail.com>

On Thu, Apr 4, 2024 at 5:08 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Define __APX_F__ when APX is enabled.
>
> gcc/
>
>         PR target/114587
>         * config/i386/i386-c.cc (ix86_target_macros_internal): Define
>         __APX_F__ when APX is enabled.
>
> gcc/testsuite/
>
>         PR target/114587
>         * gcc.target/i386/apx-2.c: New test.

OK.

Thanks,
Uros.

> ---
>  gcc/config/i386/i386-c.cc             | 2 ++
>  gcc/testsuite/gcc.target/i386/apx-2.c | 6 ++++++
>  2 files changed, 8 insertions(+)
>  create mode 100644 gcc/testsuite/gcc.target/i386/apx-2.c
>
> diff --git a/gcc/config/i386/i386-c.cc b/gcc/config/i386/i386-c.cc
> index 114908c7ec0..226d277676c 100644
> --- a/gcc/config/i386/i386-c.cc
> +++ b/gcc/config/i386/i386-c.cc
> @@ -749,6 +749,8 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
>      }
>    if (isa_flag2 & OPTION_MASK_ISA2_AVX10_1_512)
>      def_or_undef (parse_in, "__AVX10_1_512__");
> +  if (isa_flag2 & OPTION_MASK_ISA2_APX_F)
> +    def_or_undef (parse_in, "__APX_F__");
>    if (TARGET_IAMCU)
>      {
>        def_or_undef (parse_in, "__iamcu");
> diff --git a/gcc/testsuite/gcc.target/i386/apx-2.c b/gcc/testsuite/gcc.target/i386/apx-2.c
> new file mode 100644
> index 00000000000..2f6439e4b23
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/i386/apx-2.c
> @@ -0,0 +1,6 @@
> +/* { dg-do compile { target { ! ia32 } } } */
> +/* { dg-options "-mapxf" } */
> +
> +#ifndef __APX_F__
> +# error __APX_F__ not defined
> +#endif
> --
> 2.44.0
>

      reply	other threads:[~2024-04-04 18:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 15:08 H.J. Lu
2024-04-04 18:46 ` Uros Bizjak [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='CAFULd4bpkCjDNa1sHvuC3z8fSGHA1VhEvtXcjeGTD130ODTu=g@mail.gmail.com' \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=hongtao.liu@intel.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).