aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2020-07-25 15:02:52 +0100
committerAndrew Stubbs <ams@codesourcery.com>2020-07-25 15:44:46 +0100
commit8d0b2b33748014ee57973c1d7bc9fd7706bb3da9 (patch)
tree8c190c90f75d3eea393f24722b1212ef27a7d3ca
parent53256ee3d582162d0ef914c068b58a02aa20c466 (diff)
downloadgcc-8d0b2b33748014ee57973c1d7bc9fd7706bb3da9.zip
gcc-8d0b2b33748014ee57973c1d7bc9fd7706bb3da9.tar.gz
gcc-8d0b2b33748014ee57973c1d7bc9fd7706bb3da9.tar.bz2
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.
-rw-r--r--gcc/config/gcn/gcn.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c
index babecef7..8b3c454 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