summaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-03 05:53:58 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-03 05:53:58 +0000
commit430be8e2b1849cee13a6d721c24132194a371eed (patch)
treee606116f129427fd27bb72ba8a7b9932d86c2880 /gcc/config/i386
parent3459f6a629a7bf9e64cdd23cbd94349ea420980c (diff)
downloadgcc-430be8e2b1849cee13a6d721c24132194a371eed.tar.gz
libcpp/ChangeLog:
* include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q): Add new constants. * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q' suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q for 'q' or 'Q' suffixes. gcc/ChangeLog: * targhooks.h (default_mode_for_suffix): New function declaration. * targhooks.c (default_mode_for_suffix): New default target hook. * target.h (struct c): New structure in the targetm struct. (mode_for_suffix): New target hook as part of struct c. target-def.h (TARGET_C_MODE_FOR_SUFFIX): Define as default_mode_for_suffix. (TARGET_C): New define. * c-lex.c: Include "target.h". (interpret_float): Use targetm.c.mode_for_suffix to determine the mode for a given non-standard suffix. Makefile.in (c-lex.o): Depend on $(TARGET_H). * config/i386/i386.c (ix86_c_mode_for_suffix): New static function. (TARGET_C_MODE_FOR_SUFFIX): Define to ix86_c_mode_for_suffix. * doc/extend.texi (Floating Types): New node. Document __float80 and __float128 types. Document 'w', 'W', 'q' and 'Q' suffixes. testsuite/ChangeLog: * gcc.dg/const-float80.c : New test. * gcc.dg/const-float128.c : New test. * gcc.dg/const-float80-ped.c : New test. * gcc.dg/const-float128-ped.c : New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126244 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/i386.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 96c948f6dea..341bf90bf9e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -22423,6 +22423,18 @@ ix86_vector_mode_supported_p (enum machine_mode mode)
return false;
}
+/* Target hook for c_mode_for_suffix. */
+static enum machine_mode
+ix86_c_mode_for_suffix (char suffix)
+{
+ if (TARGET_64BIT && suffix == 'q')
+ return TFmode;
+ if (TARGET_MMX && suffix == 'w')
+ return XFmode;
+
+ return VOIDmode;
+}
+
/* Worker function for TARGET_MD_ASM_CLOBBERS.
We do this in the new i386 backend to maintain source compatibility
@@ -23520,6 +23532,9 @@ static const struct attribute_spec ix86_attribute_table[] =
#undef TARGET_VECTOR_MODE_SUPPORTED_P
#define TARGET_VECTOR_MODE_SUPPORTED_P ix86_vector_mode_supported_p
+#undef TARGET_C_MODE_FOR_SUFFIX
+#define TARGET_C_MODE_FOR_SUFFIX ix86_c_mode_for_suffix
+
#ifdef HAVE_AS_TLS
#undef TARGET_ASM_OUTPUT_DWARF_DTPREL
#define TARGET_ASM_OUTPUT_DWARF_DTPREL i386_output_dwarf_dtprel