diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 93c6d7ef4b1..1d4e1278bb9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2007-03-19 Andreas Krebbel + + * 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 * genemit.c (main): Print include statement for dfp.h. diff --git a/gcc/config.gcc b/gcc/config.gcc index c8fecaac65f..e1c0fed68d1 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 784b846f521..e72c34ed9ea 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 03bec777bd7..5f38f092985 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 21ef4f31065..cde3e293391 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