This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to implement XFmode/TFmode constant suffixes on IA64


When the patch to allow the use of 'q' and 'w' suffixes went in for
i386, the tests that were added were also enabled for IA64 but the code
to allow these suffixes was not put in.  Here is a patch to implement
the suffixes for IA64, it is basically the same code that i386 uses.

It fixes:

FAIL: gcc.dg/const-float128-ped.c  (test for warnings, line 5)
FAIL: gcc.dg/const-float128-ped.c  (test for warnings, line 5)
FAIL: gcc.dg/const-float128-ped.c (test for excess errors)
FAIL: gcc.dg/const-float128-ped.c (test for excess errors)
FAIL: gcc.dg/const-float128.c (test for excess errors)
FAIL: gcc.dg/const-float128.c (test for excess errors)
FAIL: gcc.dg/const-float80-ped.c  (test for warnings, line 6)
FAIL: gcc.dg/const-float80-ped.c  (test for warnings, line 6)
FAIL: gcc.dg/const-float80-ped.c (test for excess errors)
FAIL: gcc.dg/const-float80-ped.c (test for excess errors)
FAIL: gcc.dg/const-float80.c (test for excess errors)
FAIL: gcc.dg/const-float80.c (test for excess errors)

OK for checkin?

Steve Ellcey
sje@cup.hp.com


2007-07-27  Steve Ellcey  <sje@cup.hp.com>

	* config/ia64/ia64.c (ia64_c_mode_for_suffix): New.
	(TARGET_C_MODE_FOR_SUFFIX): New.

Index: config/ia64/ia64.c
===================================================================
--- config/ia64/ia64.c	(revision 126968)
+++ config/ia64/ia64.c	(working copy)
@@ -283,6 +283,7 @@ static const char *ia64_mangle_type (tre
 static const char *ia64_invalid_conversion (tree, tree);
 static const char *ia64_invalid_unary_op (int, tree);
 static const char *ia64_invalid_binary_op (int, tree, tree);
+static enum machine_mode ia64_c_mode_for_suffix (char);
 
 /* Table of valid machine attributes.  */
 static const struct attribute_spec ia64_attribute_table[] =
@@ -486,6 +487,9 @@ static const struct attribute_spec ia64_
 #undef TARGET_INVALID_BINARY_OP
 #define TARGET_INVALID_BINARY_OP ia64_invalid_binary_op
 
+#undef TARGET_C_MODE_FOR_SUFFIX
+#define TARGET_C_MODE_FOR_SUFFIX ia64_c_mode_for_suffix
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 typedef enum
@@ -9850,4 +9854,17 @@ ia64_handle_version_id_attribute (tree *
   return NULL_TREE;
 }
 
+/* Target hook for c_mode_for_suffix.  */
+
+static enum machine_mode
+ia64_c_mode_for_suffix (char suffix)
+{
+  if (suffix == 'q')
+    return TFmode;
+  if (suffix == 'w')
+    return XFmode;
+
+  return VOIDmode;
+}
+
 #include "gt-ia64.h"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]