public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Stubbs <ams@codesourcery.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [committed] amdgcn: Enable TImode
Date: Sat, 25 Jul 2020 15:48:11 +0100	[thread overview]
Message-ID: <6e0b59fb-0d41-0112-2984-afad0111270e@codesourcery.com> (raw)

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

This enables types __int128 et al for move, add, subtract, and logical 
operations.  At least shift, rotate, multiple, divide, and modulus are 
broken so we can expect some test failures.

This is required now because libgomp no longer builds without __int128.

An additional patch will be required to unbreak the libgfortran build, 
until TImode is completely supported.

Andrew

[-- Attachment #2: 200725-enable-timode.patch --]
[-- Type: text/x-patch, Size: 1644 bytes --]

amdgcn: Enable TImode

This enables types __int128 et al for move, add, subtract, and logical
operations.  At least shift, rotate, multiple, divide, and modulus are broken
so we can expect some test failures.

This is required now because libgomp no longer builds without __int128.

An additional patch will be required to unbreak the libgfortran build.

gcc/ChangeLog:

	* config/gcn/gcn.c (gcn_scalar_mode_supported_p): New function.
	(TARGET_SCALAR_MODE_SUPPORTED_P): New define.

diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c
index babecef7888..8b3c4544dd5 100644
--- a/gcc/config/gcn/gcn.c
+++ b/gcc/config/gcn/gcn.c
@@ -350,6 +350,19 @@ static const struct attribute_spec gcn_attribute_table[] = {
 /* }}}  */
 /* {{{ Registers and modes.  */
 
+/* Implement TARGET_SCALAR_MODE_SUPPORTED_P.  */
+
+bool
+gcn_scalar_mode_supported_p (scalar_mode mode)
+{
+  return (mode == BImode
+	  || mode == QImode
+	  || mode == HImode /* || mode == HFmode  */
+	  || mode == SImode || mode == SFmode
+	  || mode == DImode || mode == DFmode
+	  || mode == TImode);
+}
+
 /* Implement TARGET_CLASS_MAX_NREGS.
  
    Return the number of hard registers needed to hold a value of MODE in
@@ -6331,6 +6344,8 @@ gcn_dwarf_register_span (rtx rtl)
 #define TARGET_SECONDARY_RELOAD gcn_secondary_reload
 #undef  TARGET_SECTION_TYPE_FLAGS
 #define TARGET_SECTION_TYPE_FLAGS gcn_section_type_flags
+#undef  TARGET_SCALAR_MODE_SUPPORTED_P
+#define TARGET_SCALAR_MODE_SUPPORTED_P gcn_scalar_mode_supported_p
 #undef  TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P
 #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P \
   gcn_small_register_classes_for_mode_p

                 reply	other threads:[~2020-07-25 14:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6e0b59fb-0d41-0112-2984-afad0111270e@codesourcery.com \
    --to=ams@codesourcery.com \
    --cc=gcc-patches@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).