]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2007-03-19 Andreas Krebbel <krebbel1@de.ibm.com>
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Mar 2007 08:46:57 +0000 (08:46 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Mar 2007 08:46:57 +0000 (08:46 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123055 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/s390/s390.c
gcc/config/s390/s390.md
gcc/config/s390/s390.opt

index 93c6d7ef4b10cc8af37b9664be675f6436b9bc6e..1d4e1278bb97a613541fb8251a96f4889606b70a 100644 (file)
@@ -1,3 +1,17 @@
+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.
index c8fecaac65fb1a8c15e7a2abf7e2f38af31e56bd..e1c0fed68d1fcb39a23afc5d98baa93c7a2da240 100644 (file)
@@ -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
                                ;;
                        *)
index 784b846f52132f3464dda39d4745f49bc7a0fd4b..e72c34ed9eacf65d543edd58f535fd5ecbd9ffbe 100644 (file)
@@ -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;
index 03bec777bd79979765172b4bd0cde1d0c0cf933b..5f38f09298534c93e85e95ce96d835f88d8c2560 100644 (file)
 ;; 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
index 21ef4f31065ba45dec60c518e36bcd79bbf5b616..cde3e293391a2ea9e31bbc4c794d66e96163a63c 100644 (file)
@@ -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