diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2007-03-19 08:46:57 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2007-03-19 08:46:57 +0000 |
commit | 3443392a8a5ec38a0e1c58689c166e025226b802 (patch) | |
tree | 424ef0516d90005fc4c736c199941d07d7d83da5 | |
parent | c413e1b5beea151b19a980d40906c5a874c1bc32 (diff) | |
download | gcc-3443392a8a5ec38a0e1c58689c166e025226b802.zip gcc-3443392a8a5ec38a0e1c58689c166e025226b802.tar.gz gcc-3443392a8a5ec38a0e1c58689c166e025226b802.tar.bz2 |
s390.opt ("mhard-float", [...]): Bit value inverted and documentation adjusted.
2007-03-19 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.opt ("mhard-float", "msoft-float"): Bit value
inverted and documentation adjusted.
("mhard-dfp", "msoft-dfp"): New options.
* config/s390/s390.c (s390_handle_arch_option): New architecture
switch: z9-ec.
(override_options): Sanity checks for the new options added.
* config.gcc: New architecture switch: z9-ec.
* config/s390/s390.h (processor_flags): PF_DFP added.
(TARGET_CPU_DFP, TARGET_DFP): Macro definitions added.
(TARGET_DEFAULT): Due to the s390.opt changes hard float is enabled
when the bit is NOT set so remove it from the defaults.
From-SVN: r123055
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/config.gcc | 2 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 27 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 2 | ||||
-rw-r--r-- | gcc/config/s390/s390.opt | 16 |
5 files changed, 54 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 93c6d7e..1d4e127 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,19 @@ 2007-03-19 Andreas Krebbel <krebbel1@de.ibm.com> + * config/s390/s390.opt ("mhard-float", "msoft-float"): Bit value + inverted and documentation adjusted. + ("mhard-dfp", "msoft-dfp"): New options. + * config/s390/s390.c (s390_handle_arch_option): New architecture + switch: z9-ec. + (override_options): Sanity checks for the new options added. + * config.gcc: New architecture switch: z9-ec. + * config/s390/s390.h (processor_flags): PF_DFP added. + (TARGET_CPU_DFP, TARGET_DFP): Macro definitions added. + (TARGET_DEFAULT): Due to the s390.opt changes hard float is enabled + when the bit is NOT set so remove it from the defaults. + +2007-03-19 Andreas Krebbel <krebbel1@de.ibm.com> + * genemit.c (main): Print include statement for dfp.h. * dfp.h (decimal_real_arithmetic): Hide prototype if tree_code enum is not available. diff --git a/gcc/config.gcc b/gcc/config.gcc index c8fecaa..e1c0fed 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3023,7 +3023,7 @@ case "${target}" in for which in arch tune; do eval "val=\$with_$which" case ${val} in - "" | g5 | g6 | z900 | z990 | z9-109) + "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec) # OK ;; *) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 784b846..e72c34e 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -1340,6 +1340,8 @@ s390_handle_arch_option (const char *arg, | PF_LONG_DISPLACEMENT}, {"z9-109", PROCESSOR_2094_Z9_109, PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT | PF_EXTIMM}, + {"z9-ec", PROCESSOR_2094_Z9_109, PF_IEEE_FLOAT | PF_ZARCH + | PF_LONG_DISPLACEMENT | PF_EXTIMM | PF_DFP }, }; size_t i; @@ -1418,11 +1420,34 @@ override_options (void) } /* Sanity checks. */ - if (TARGET_ZARCH && !(s390_arch_flags & PF_ZARCH)) + if (TARGET_ZARCH && !TARGET_CPU_ZARCH) error ("z/Architecture mode not supported on %s", s390_arch_string); if (TARGET_64BIT && !TARGET_ZARCH) error ("64-bit ABI not supported in ESA/390 mode"); + if (TARGET_HARD_DFP && (!TARGET_CPU_DFP || !TARGET_ZARCH)) + { + if (target_flags_explicit & MASK_SOFT_DFP) + { + if (!TARGET_CPU_DFP) + error ("Hardware decimal floating point instructions" + " not available on %s", s390_arch_string); + if (!TARGET_ZARCH) + error ("Hardware decimal floating point instructions" + " not available in ESA/390 mode"); + } + else + target_flags |= MASK_SOFT_DFP; + } + + if ((target_flags_explicit & MASK_SOFT_FLOAT) && TARGET_SOFT_FLOAT) + { + if ((target_flags_explicit & MASK_SOFT_DFP) && TARGET_HARD_DFP) + error ("-mhard-dfp can't be used in conjunction with -msoft-float"); + + target_flags |= MASK_SOFT_DFP; + } + /* Set processor cost function. */ if (s390_tune == PROCESSOR_2094_Z9_109) s390_cost = &z9_109_cost; diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 03bec77..5f38f09 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -195,7 +195,7 @@ ;; this description is also used for the g5 and g6. (include "2064.md") -;; Pipeline description for z990. +;; Pipeline description for z990, z9-109 and z9-ec. (include "2084.md") ;; Predicates diff --git a/gcc/config/s390/s390.opt b/gcc/config/s390/s390.opt index 21ef4f31..cde3e29 100644 --- a/gcc/config/s390/s390.opt +++ b/gcc/config/s390/s390.opt @@ -47,9 +47,13 @@ mfused-madd Target Report Mask(FUSED_MADD) Enable fused multiply/add instructions +mhard-dfp +Target Report RejectNegative InverseMask(SOFT_DFP, HARD_DFP) +Enable hardware decimal floating point + mhard-float -Target Report RejectNegative Mask(HARD_FLOAT) -Use hardware fp +Target Report RejectNegative InverseMask(SOFT_FLOAT, HARD_FLOAT) +Enable hardware floating point mlong-double-128 Target Report RejectNegative Mask(LONG_DOUBLE_128) @@ -67,9 +71,13 @@ msmall-exec Target Report Mask(SMALL_EXEC) Use bras for executable < 64k +msoft-dfp +Target Report RejectNegative Mask(SOFT_DFP) +Disable hardware decimal floating point + msoft-float -Target Report RejectNegative InverseMask(HARD_FLOAT, SOFT_FLOAT) -Don't use hardware fp +Target Report RejectNegative Mask(SOFT_FLOAT) +Disable hardware floating point mstack-guard= Target RejectNegative Joined |