rs6000.opt (rs6000_ieeequad, [...]): Remove TargetVariable entries.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 6 May 2011 20:34:13 +0000 (21:34 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 6 May 2011 20:34:13 +0000 (21:34 +0100)
* config/rs6000/rs6000.opt (rs6000_ieeequad, rs6000_altivec_abi,
rs6000_spe_abi, rs6000_darwin64_abi): Remove TargetVariable
entries.
(mabi=): Replace with separate entries for mabi=altivec,
mabi=no-altivec, mabi=spe, mabi=no-spe, mabi=d64, mabi=d32,
mabi=ieeelongdouble and mabi=ibmlongdouble.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Move
check for -mabi=spe without SPE ABI support here.
(rs6000_handle_option): Replace OPT_mabi_ handling with
OPT_mabi_altivec and OPT_mabi_spe handling.

From-SVN: r173509

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.opt

index 9d0294e369c935e1dda69c77ec55f91cf08b388c..f72b204321691c4e85dbd298e0a23f18977212f6 100644 (file)
@@ -1,3 +1,16 @@
+2011-05-06  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/rs6000/rs6000.opt (rs6000_ieeequad, rs6000_altivec_abi,
+       rs6000_spe_abi, rs6000_darwin64_abi): Remove TargetVariable
+       entries.
+       (mabi=): Replace with separate entries for mabi=altivec,
+       mabi=no-altivec, mabi=spe, mabi=no-spe, mabi=d64, mabi=d32,
+       mabi=ieeelongdouble and mabi=ibmlongdouble.
+       * config/rs6000/rs6000.c (rs6000_option_override_internal): Move
+       check for -mabi=spe without SPE ABI support here.
+       (rs6000_handle_option): Replace OPT_mabi_ handling with
+       OPT_mabi_altivec and OPT_mabi_spe handling.
+
 2011-05-06  Cary Coutant  <ccoutant@google.com>
 
        * dwarf2out.c (contains_subprogram_definition): New function.
index d4851ad4d27b423f158fd4e4c4b19cc60fd4de06..4504ffebb872ec848ea5a34ce9ffd4fc8fcac8b7 100644 (file)
@@ -2665,6 +2665,11 @@ rs6000_option_override_internal (bool global_init_p)
     warning (0, "-malign-power is not supported for 64-bit Darwin;"
             " it is incompatible with the installed C and C++ libraries");
 
+  if (global_options_set.x_rs6000_spe_abi
+      && rs6000_spe_abi
+      && !TARGET_SPE_ABI)
+    error ("not configured for SPE ABI");
+
   /* Numerous experiment shows that IRA based loop pressure
      calculation works better for RTL loop invariant motion on targets
      with enough (>= 32) registers.  It is an expensive optimization.
@@ -4335,65 +4340,13 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
       break;
 #endif
 
-    case OPT_mabi_:
-      if (!strcmp (arg, "altivec"))
-       {
-         opts_set->x_rs6000_altivec_abi = true;
-         opts->x_rs6000_altivec_abi = 1;
-
-         /* Enabling the AltiVec ABI turns off the SPE ABI.  */
-         opts->x_rs6000_spe_abi = 0;
-       }
-      else if (! strcmp (arg, "no-altivec"))
-       {
-         opts_set->x_rs6000_altivec_abi = true;
-         opts->x_rs6000_altivec_abi = 0;
-       }
-      else if (! strcmp (arg, "spe"))
-       {
-         opts_set->x_rs6000_spe_abi = true;
-         opts->x_rs6000_spe_abi = 1;
-         opts->x_rs6000_altivec_abi = 0;
-         if (!TARGET_SPE_ABI)
-           error_at (loc, "not configured for ABI: '%s'", arg);
-       }
-      else if (! strcmp (arg, "no-spe"))
-       {
-         opts_set->x_rs6000_spe_abi = true;
-         opts->x_rs6000_spe_abi = 0;
-       }
-
-      /* These are here for testing during development only, do not
-        document in the manual please.  */
-      else if (! strcmp (arg, "d64"))
-       {
-         opts->x_rs6000_darwin64_abi = 1;
-         warning_at (loc, 0, "using darwin64 ABI");
-       }
-      else if (! strcmp (arg, "d32"))
-       {
-         opts->x_rs6000_darwin64_abi = 0;
-         warning_at (loc, 0, "using old darwin ABI");
-       }
-
-      else if (! strcmp (arg, "ibmlongdouble"))
-       {
-         opts_set->x_rs6000_ieeequad = true;
-         opts->x_rs6000_ieeequad = 0;
-         warning_at (loc, 0, "using IBM extended precision long double");
-       }
-      else if (! strcmp (arg, "ieeelongdouble"))
-       {
-         opts_set->x_rs6000_ieeequad = true;
-         opts->x_rs6000_ieeequad = 1;
-         warning_at (loc, 0, "using IEEE extended precision long double");
-       }
+    case OPT_mabi_altivec:
+      /* Enabling the AltiVec ABI turns off the SPE ABI.  */
+      opts->x_rs6000_spe_abi = 0;
+      break;
 
-      else
-       {
-         error_at (loc, "unknown ABI specified: '%s'", arg);
-         return false;
-       }
+    case OPT_mabi_spe:
+      opts->x_rs6000_altivec_abi = 0;
       break;
 
     case OPT_mcpu_:
index 131cec9cc8f5b13db03885a80cfd9edc62e864fa..f62417cb9a6140b1f88d4577f2fec8a2ec9c07d3 100644 (file)
@@ -47,22 +47,6 @@ enum rs6000_dependence_cost rs6000_sched_costly_dep = no_dep_costly
 TargetVariable
 enum rs6000_nop_insertion rs6000_sched_insert_nops = sched_finish_none
 
-;; IEEE quad extended precision long double.
-TargetVariable
-unsigned char rs6000_ieeequad
-
-;; Nonzero to use AltiVec ABI.
-TargetVariable
-unsigned char rs6000_altivec_abi
-
-;; Nonzero if we want SPE ABI extensions.
-TargetVariable
-unsigned char rs6000_spe_abi
-
-;; Nonzero if we want Darwin's struct-by-value-in-regs ABI.
-TargetVariable
-unsigned char rs6000_darwin64_abi
-
 ;; Non-zero to allow overriding loop alignment.
 TargetVariable
 unsigned char can_override_loop_align
@@ -385,9 +369,37 @@ mdebug=
 Target RejectNegative Joined
 -mdebug=       Enable debug output
 
-mabi=
-Target RejectNegative Joined
--mabi= Specify ABI to use
+mabi=altivec
+Target RejectNegative Var(rs6000_altivec_abi) Save
+Use the AltiVec ABI extensions
+
+mabi=no-altivec
+Target RejectNegative Var(rs6000_altivec_abi, 0)
+Do not use the AltiVec ABI extensions
+
+mabi=spe
+Target RejectNegative Var(rs6000_spe_abi) Save
+Use the SPE ABI extensions
+
+mabi=no-spe
+Target RejectNegative Var(rs6000_spe_abi, 0)
+Do not use the SPE ABI extensions
+
+; These are here for testing during development only, do not document
+; in the manual please.
+
+; If we want Darwin's struct-by-value-in-regs ABI.
+mabi=d64
+Target RejectNegative Undocumented Warn(using darwin64 ABI) Var(rs6000_darwin64_abi) Save
+
+mabi=d32
+Target RejectNegative Undocumented Warn(using old darwin ABI) Var(rs6000_darwin64_abi, 0)
+
+mabi=ieeelongdouble
+Target RejectNegative Undocumented Warn(using IEEE extended precision long double) Var(rs6000_ieeequad) Save
+
+mabi=ibmlongdouble
+Target RejectNegative Undocumented Warn(using IBM extended precision long double) Var(rs6000_ieeequad, 0)
 
 mcpu=
 Target RejectNegative Joined