From d8f426ecc93d65cb9c8c7698116b6bad194fbdb9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 6 May 2011 21:34:13 +0100 Subject: [PATCH] rs6000.opt (rs6000_ieeequad, [...]): Remove TargetVariable entries. * 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 | 13 +++++++ gcc/config/rs6000/rs6000.c | 69 ++++++------------------------------ gcc/config/rs6000/rs6000.opt | 50 ++++++++++++++++---------- 3 files changed, 55 insertions(+), 77 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d0294e369c..f72b2043216 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-05-06 Joseph Myers + + * 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 * dwarf2out.c (contains_subprogram_definition): New function. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d4851ad4d27..4504ffebb87 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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_: diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 131cec9cc8f..f62417cb9a6 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -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 -- 2.30.2