summaryrefslogtreecommitdiff
path: root/gcc/config/pa/pa.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-22 22:42:51 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-22 22:42:51 +0000
commitd09dbe0a437b37b0042058dc2d63ab815fe3af46 (patch)
tree49d63a6f66695967bb4c29a86117bad9b47d2486 /gcc/config/pa/pa.c
parent177dbc5b231beb5711da30c75a7995dd1a5be534 (diff)
downloadgcc-d09dbe0a437b37b0042058dc2d63ab815fe3af46.tar.gz
* config/pa/pa-hpux.opt (flag_pa_unix): New Variable entry.
(munix=93): Use Var. * config/pa/pa-hpux1010.opt (munix=95): Use Var. * config/pa/pa-hpux1111.opt (munix=98): Use Var. * config/pa/pa-opts.h: New. * config/pa/pa.c (pa_cpu, flag_pa_unix): Remove. (pa_handle_option): Don't assert that global structures are in use. Access target_flags via opts pointer. Don't handle OPT_mschedule_, OPT_mfixed_range_, OPT_munix_93, OPT_munix_95 or OPT_munix_98 here. (pa_option_override): Handle deferred OPT_mfixed_range_. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa/pa.c')
-rw-r--r--gcc/config/pa/pa.c78
1 files changed, 24 insertions, 54 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index c5cd8712c66..c1bf358eae6 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -193,12 +193,6 @@ static GTY(()) section *som_readonly_data_section;
static GTY(()) section *som_one_only_readonly_data_section;
static GTY(()) section *som_one_only_data_section;
-/* Which cpu we are scheduling for. */
-enum processor_type pa_cpu = TARGET_SCHED_DEFAULT;
-
-/* The UNIX standard to use for predefines and linking. */
-int flag_pa_unix = TARGET_HPUX_11_11 ? 1998 : TARGET_HPUX_10_10 ? 1995 : 1993;
-
/* Counts for the number of callee-saved general and floating point
registers which were saved by the current function's prologue. */
static int gr_saved, fr_saved;
@@ -480,74 +474,32 @@ fix_range (const char *const_str)
/* Implement TARGET_HANDLE_OPTION. */
static bool
-pa_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
+pa_handle_option (struct gcc_options *opts,
+ struct gcc_options *opts_set ATTRIBUTE_UNUSED,
const struct cl_decoded_option *decoded,
location_t loc ATTRIBUTE_UNUSED)
{
size_t code = decoded->opt_index;
- const char *arg = decoded->arg;
-
- gcc_assert (opts == &global_options);
- gcc_assert (opts_set == &global_options_set);
switch (code)
{
case OPT_mnosnake:
case OPT_mpa_risc_1_0:
case OPT_march_1_0:
- target_flags &= ~(MASK_PA_11 | MASK_PA_20);
+ opts->x_target_flags &= ~(MASK_PA_11 | MASK_PA_20);
return true;
case OPT_msnake:
case OPT_mpa_risc_1_1:
case OPT_march_1_1:
- target_flags &= ~MASK_PA_20;
- target_flags |= MASK_PA_11;
+ opts->x_target_flags &= ~MASK_PA_20;
+ opts->x_target_flags |= MASK_PA_11;
return true;
case OPT_mpa_risc_2_0:
case OPT_march_2_0:
- target_flags |= MASK_PA_11 | MASK_PA_20;
- return true;
-
- case OPT_mschedule_:
- if (strcmp (arg, "8000") == 0)
- pa_cpu = PROCESSOR_8000;
- else if (strcmp (arg, "7100") == 0)
- pa_cpu = PROCESSOR_7100;
- else if (strcmp (arg, "700") == 0)
- pa_cpu = PROCESSOR_700;
- else if (strcmp (arg, "7100LC") == 0)
- pa_cpu = PROCESSOR_7100LC;
- else if (strcmp (arg, "7200") == 0)
- pa_cpu = PROCESSOR_7200;
- else if (strcmp (arg, "7300") == 0)
- pa_cpu = PROCESSOR_7300;
- else
- return false;
- return true;
-
- case OPT_mfixed_range_:
- fix_range (arg);
- return true;
-
-#if TARGET_HPUX
- case OPT_munix_93:
- flag_pa_unix = 1993;
- return true;
-#endif
-
-#if TARGET_HPUX_10_10
- case OPT_munix_95:
- flag_pa_unix = 1995;
- return true;
-#endif
-
-#if TARGET_HPUX_11_11
- case OPT_munix_98:
- flag_pa_unix = 1998;
+ opts->x_target_flags |= MASK_PA_11 | MASK_PA_20;
return true;
-#endif
default:
return true;
@@ -559,6 +511,24 @@ pa_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
static void
pa_option_override (void)
{
+ unsigned int i;
+ cl_deferred_option *opt;
+ VEC(cl_deferred_option,heap) *vec
+ = (VEC(cl_deferred_option,heap) *) pa_deferred_options;
+
+ FOR_EACH_VEC_ELT (cl_deferred_option, vec, i, opt)
+ {
+ switch (opt->opt_index)
+ {
+ case OPT_mfixed_range_:
+ fix_range (opt->arg);
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+ }
+
/* Unconditional branches in the delay slot are not compatible with dwarf2
call frame information. There is no benefit in using this optimization
on PA8000 and later processors. */