public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@baylibre.com>
To: Tobias Burnus <tburnus@baylibre.com>,
	gcc-patches@gcc.gnu.org, Andrew Stubbs <ams@baylibre.com>
Subject: GCN: Restore lost '__gfx90a__' target CPU definition (was: [Patch] GCN: Add pre-initial support for gfx1100)
Date: Mon, 19 Feb 2024 18:05:10 +0100	[thread overview]
Message-ID: <87msrwjsft.fsf@euler.schwinge.ddns.net> (raw)
In-Reply-To: <b53b0b78-c963-4d4f-83c5-2aa6071f5163@net-b.de>

[-- Attachment #1: Type: text/plain, Size: 1812 bytes --]

Hi!

On 2024-01-07T20:20:19+0100, Tobias Burnus <burnus@net-b.de> wrote:
> --- a/gcc/config/gcn/gcn.h
> +++ b/gcc/config/gcn/gcn.h
> @@ -30,6 +30,8 @@
>  	builtin_define ("__CDNA2__");                                          \
>        else if (TARGET_RDNA2)                                                   \
>  	builtin_define ("__RDNA2__");                                          \
> +      else if (TARGET_RDNA3)                                                   \
> +	builtin_define ("__RDNA3__");                                          \
>        if (TARGET_FIJI)                                                         \
>  	{                                                                      \
>  	  builtin_define ("__fiji__");                                         \
> @@ -41,11 +43,13 @@
>  	builtin_define ("__gfx906__");                                         \
>        else if (TARGET_GFX908)                                                  \
>  	builtin_define ("__gfx908__");                                         \
> -      else if (TARGET_GFX90a)                                                  \
> -	builtin_define ("__gfx90a__");                                         \
> +      else if (TARGET_GFX1030)                                                 \
> +	builtin_define ("__gfx1030");                                          \
> +      else if (TARGET_GFX1100)                                                 \
> +	builtin_define ("__gfx1100__");                                        \
>    } while (0)

Supposedly it wasn't intentional that we lost gfx90a here -- I've pushed
to master branch commit 159174f25716c18a74a915cb01b9a28024ea7a3d
"GCN: Restore lost '__gfx90a__' target CPU definition", see attached.


Grüße
 Thomas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-GCN-Restore-lost-__gfx90a__-target-CPU-definition.patch --]
[-- Type: text/x-diff, Size: 2338 bytes --]

From 159174f25716c18a74a915cb01b9a28024ea7a3d Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tschwinge@baylibre.com>
Date: Thu, 8 Feb 2024 23:27:19 +0100
Subject: [PATCH] GCN: Restore lost '__gfx90a__' target CPU definition

Also, add some safeguards for the future.

Fix-up for commit 52a2c659ae6c21f84b6acce0afcb9b93b9dc71a0
"GCN: Add pre-initial support for gfx1100".

	gcc/
	* config/gcn/gcn.h (TARGET_CPU_CPP_BUILTINS): Restore lost
	'__gfx90a__' target CPU definition.  Add some safeguards for the future.
---
 gcc/config/gcn/gcn.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h
index a17f16aacc40..c314c7b4ae8e 100644
--- a/gcc/config/gcn/gcn.h
+++ b/gcc/config/gcn/gcn.h
@@ -32,6 +32,8 @@
 	builtin_define ("__RDNA2__");                                          \
       else if (TARGET_RDNA3)                                                   \
 	builtin_define ("__RDNA3__");                                          \
+      else                                                                     \
+	gcc_unreachable ();                                                    \
       if (TARGET_FIJI)                                                         \
 	{                                                                      \
 	  builtin_define ("__fiji__");                                         \
@@ -43,10 +45,14 @@
 	builtin_define ("__gfx906__");                                         \
       else if (TARGET_GFX908)                                                  \
 	builtin_define ("__gfx908__");                                         \
+      else if (TARGET_GFX90a)                                                  \
+	builtin_define ("__gfx90a__");                                         \
       else if (TARGET_GFX1030)                                                 \
 	builtin_define ("__gfx1030");                                          \
       else if (TARGET_GFX1100)                                                 \
 	builtin_define ("__gfx1100__");                                        \
+      else                                                                     \
+	gcc_unreachable ();                                                    \
   } while (0)
 
 #define ASSEMBLER_DIALECT (TARGET_RDNA2_PLUS ? 1 : 0)
-- 
2.43.0


      parent reply	other threads:[~2024-02-19 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-07 19:20 [Patch] GCN: Add pre-initial support for gfx1100 Tobias Burnus
2024-01-08 10:06 ` Andrew Stubbs
2024-01-08 14:30   ` Tobias Burnus
2024-01-08 19:48     ` Thomas Schwinge
2024-02-19 17:05 ` Thomas Schwinge [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=87msrwjsft.fsf@euler.schwinge.ddns.net \
    --to=tschwinge@baylibre.com \
    --cc=ams@baylibre.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tburnus@baylibre.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).