ia64-opts.h: New.
* config/ia64/ia64-opts.h: New. * config/ia64/ia64.c (ia64_tune): Remove. (ia64_handle_option): Don't handle OPT_mfixed_range_ or OPT_mtune_ here. Use error_at. (ia64_option_override): Handle deferred OPT_mfixed_range_. * config/ia64/ia64.h (enum processor_type, ia64_tune): Remove. * config/ia64/ia64.opt (config/ia64/ia64-opts.h): New HeaderInclude entry. (ia64_tune): New Variable entry. (mfixed-range=): Use Defer and Var. (mtune=): Use Enum and Var. (ia64_tune): New Enum and EnumValue entries. From-SVN: r171317
This commit is contained in:
parent
db25893ca7
commit
e6cc0c98cf
|
@ -1,3 +1,18 @@
|
|||
2011-03-22 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* config/ia64/ia64-opts.h: New.
|
||||
* config/ia64/ia64.c (ia64_tune): Remove.
|
||||
(ia64_handle_option): Don't handle OPT_mfixed_range_ or OPT_mtune_
|
||||
here. Use error_at.
|
||||
(ia64_option_override): Handle deferred OPT_mfixed_range_.
|
||||
* config/ia64/ia64.h (enum processor_type, ia64_tune): Remove.
|
||||
* config/ia64/ia64.opt (config/ia64/ia64-opts.h): New
|
||||
HeaderInclude entry.
|
||||
(ia64_tune): New Variable entry.
|
||||
(mfixed-range=): Use Defer and Var.
|
||||
(mtune=): Use Enum and Var.
|
||||
(ia64_tune): New Enum and EnumValue entries.
|
||||
|
||||
2011-03-22 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* config/frv/frv-opts.h: New.
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/* Definitions for option handling for IA-64.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef IA64_OPTS_H
|
||||
#define IA64_OPTS_H
|
||||
|
||||
/* Which processor to schedule for. The cpu attribute defines a list
|
||||
that mirrors this list, so changes to ia64.md must be made at the
|
||||
same time. */
|
||||
|
||||
enum processor_type
|
||||
{
|
||||
PROCESSOR_ITANIUM, /* Original Itanium. */
|
||||
PROCESSOR_ITANIUM2,
|
||||
PROCESSOR_max
|
||||
};
|
||||
|
||||
#endif
|
|
@ -103,9 +103,6 @@ static const char * const ia64_local_reg_names[80] =
|
|||
static const char * const ia64_output_reg_names[8] =
|
||||
{ "out0", "out1", "out2", "out3", "out4", "out5", "out6", "out7" };
|
||||
|
||||
/* Which cpu are we scheduling for. */
|
||||
enum processor_type ia64_tune = PROCESSOR_ITANIUM2;
|
||||
|
||||
/* Determines whether we run our final scheduling pass or not. We always
|
||||
avoid the normal second scheduling pass. */
|
||||
static int ia64_flag_schedule_insns2;
|
||||
|
@ -5657,54 +5654,22 @@ fix_range (const char *const_str)
|
|||
/* Implement TARGET_HANDLE_OPTION. */
|
||||
|
||||
static bool
|
||||
ia64_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
|
||||
ia64_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED,
|
||||
struct gcc_options *opts_set ATTRIBUTE_UNUSED,
|
||||
const struct cl_decoded_option *decoded,
|
||||
location_t loc ATTRIBUTE_UNUSED)
|
||||
location_t loc)
|
||||
{
|
||||
size_t code = decoded->opt_index;
|
||||
const char *arg = decoded->arg;
|
||||
int value = decoded->value;
|
||||
|
||||
gcc_assert (opts == &global_options);
|
||||
gcc_assert (opts_set == &global_options_set);
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case OPT_mfixed_range_:
|
||||
fix_range (arg);
|
||||
return true;
|
||||
|
||||
case OPT_mtls_size_:
|
||||
if (value != 14 && value != 22 && value != 64)
|
||||
error ("bad value %<%s%> for -mtls-size= switch", arg);
|
||||
error_at (loc, "bad value %<%s%> for -mtls-size= switch", arg);
|
||||
return true;
|
||||
|
||||
case OPT_mtune_:
|
||||
{
|
||||
static struct pta
|
||||
{
|
||||
const char *name; /* processor name or nickname. */
|
||||
enum processor_type processor;
|
||||
}
|
||||
const processor_alias_table[] =
|
||||
{
|
||||
{"itanium2", PROCESSOR_ITANIUM2},
|
||||
{"mckinley", PROCESSOR_ITANIUM2},
|
||||
};
|
||||
int const pta_size = ARRAY_SIZE (processor_alias_table);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pta_size; i++)
|
||||
if (!strcmp (arg, processor_alias_table[i].name))
|
||||
{
|
||||
ia64_tune = processor_alias_table[i].processor;
|
||||
break;
|
||||
}
|
||||
if (i == pta_size)
|
||||
error ("bad value %<%s%> for -mtune= switch", arg);
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
@ -5715,6 +5680,24 @@ ia64_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
|
|||
static void
|
||||
ia64_option_override (void)
|
||||
{
|
||||
unsigned int i;
|
||||
cl_deferred_option *opt;
|
||||
VEC(cl_deferred_option,heap) *vec
|
||||
= (VEC(cl_deferred_option,heap) *) ia64_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 ();
|
||||
}
|
||||
}
|
||||
|
||||
if (TARGET_AUTO_PIC)
|
||||
target_flags |= MASK_CONST_GP;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Definitions of target machine GNU compiler. IA-64 version.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
Contributed by James E. Wilson <wilson@cygnus.com> and
|
||||
David Mosberger <davidm@hpl.hp.com>.
|
||||
|
||||
|
@ -102,19 +102,6 @@ enum ia64_inline_type
|
|||
#ifndef TARGET_CPU_DEFAULT
|
||||
#define TARGET_CPU_DEFAULT 0
|
||||
#endif
|
||||
|
||||
/* Which processor to schedule for. The cpu attribute defines a list
|
||||
that mirrors this list, so changes to ia64.md must be made at the
|
||||
same time. */
|
||||
|
||||
enum processor_type
|
||||
{
|
||||
PROCESSOR_ITANIUM, /* Original Itanium. */
|
||||
PROCESSOR_ITANIUM2,
|
||||
PROCESSOR_max
|
||||
};
|
||||
|
||||
extern enum processor_type ia64_tune;
|
||||
|
||||
/* Driver configuration */
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
; Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011
|
||||
; Free Software Foundation, Inc.
|
||||
;
|
||||
; This file is part of GCC.
|
||||
;
|
||||
|
@ -16,6 +17,13 @@
|
|||
; along with GCC; see the file COPYING3. If not see
|
||||
; <http://www.gnu.org/licenses/>.
|
||||
|
||||
HeaderInclude
|
||||
config/ia64/ia64-opts.h
|
||||
|
||||
; Which cpu are we scheduling for.
|
||||
Variable
|
||||
enum processor_type ia64_tune = PROCESSOR_ITANIUM2
|
||||
|
||||
mbig-endian
|
||||
Target Report RejectNegative Mask(BIG_ENDIAN)
|
||||
Generate big endian code
|
||||
|
@ -103,7 +111,7 @@ Target Report Mask(EARLY_STOP_BITS)
|
|||
Enable earlier placing stop bits for better scheduling
|
||||
|
||||
mfixed-range=
|
||||
Target RejectNegative Joined
|
||||
Target RejectNegative Joined Var(ia64_deferred_options) Defer
|
||||
Specify range of registers to make fixed
|
||||
|
||||
mtls-size=
|
||||
|
@ -111,9 +119,19 @@ Target RejectNegative Joined UInteger Var(ia64_tls_size) Init(22)
|
|||
Specify bit size of immediate TLS offsets
|
||||
|
||||
mtune=
|
||||
Target RejectNegative Joined
|
||||
Target RejectNegative Joined Enum(ia64_tune) Var(ia64_tune)
|
||||
Schedule code for given CPU
|
||||
|
||||
Enum
|
||||
Name(ia64_tune) Type(enum processor_type)
|
||||
Known Itanium CPUs (for use with the -mtune= option):
|
||||
|
||||
EnumValue
|
||||
Enum(ia64_tune) String(itanium2) Value(PROCESSOR_ITANIUM2)
|
||||
|
||||
EnumValue
|
||||
Enum(ia64_tune) String(mckinley) Value(PROCESSOR_ITANIUM2)
|
||||
|
||||
msched-br-data-spec
|
||||
Target Report Var(mflag_sched_br_data_spec) Init(0)
|
||||
Use data speculation before reload
|
||||
|
|
Loading…
Reference in New Issue