* config/iq2000/iq2000-opts.h: New.
* config/iq2000/iq2000.c: Don't include opts.h.
(iq2000_tune, iq2000_handle_option, TARGET_HANDLE_OPTION): Remove.
* config/iq2000/iq2000.h (enum processor_type, iq2000_tune):
Remove.
* config/iq2000/iq2000.opt (config/iq2000/iq2000-opts.h): New
HeaderInclude entry.
(iq2000_tune): New Variable entry.
(march=): Add comment. Use Enum.
(iq2000_arch): New Enum and EnumValue entries.
(mcpu=): Use Enum and Var.
(iq2000_tune): New Enum and EnumValue entries.
From-SVN: r171318
+2011-03-22 Joseph Myers <joseph@codesourcery.com>
+
+ * config/iq2000/iq2000-opts.h: New.
+ * config/iq2000/iq2000.c: Don't include opts.h.
+ (iq2000_tune, iq2000_handle_option, TARGET_HANDLE_OPTION): Remove.
+ * config/iq2000/iq2000.h (enum processor_type, iq2000_tune):
+ Remove.
+ * config/iq2000/iq2000.opt (config/iq2000/iq2000-opts.h): New
+ HeaderInclude entry.
+ (iq2000_tune): New Variable entry.
+ (march=): Add comment. Use Enum.
+ (iq2000_arch): New Enum and EnumValue entries.
+ (mcpu=): Use Enum and Var.
+ (iq2000_tune): New Enum and EnumValue entries.
+
2011-03-22 Joseph Myers <joseph@codesourcery.com>
* config/ia64/ia64-opts.h: New.
--- /dev/null
+/* Definitions for option handling for Vitesse IQ2000 processors.
+ Copyright (C) 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 IQ2000_OPTS_H
+#define IQ2000_OPTS_H
+
+/* Which processor to schedule for. */
+
+enum processor_type
+{
+ PROCESSOR_DEFAULT,
+ PROCESSOR_IQ2000,
+ PROCESSOR_IQ10
+};
+
+#endif
#include "target-def.h"
#include "langhooks.h"
#include "df.h"
-#include "opts.h"
/* Enumeration for all of the relational tests, so that we can build
arrays indexed by the test type, and not worry about the order
/* List of all IQ2000 punctuation characters used by iq2000_print_operand. */
static char iq2000_print_operand_punct[256];
-/* The target cpu for optimization and scheduling. */
-enum processor_type iq2000_tune;
-
/* Which instruction set architecture to use. */
int iq2000_isa;
\f
/* Initialize the GCC target structure. */
static struct machine_function* iq2000_init_machine_status (void);
-static bool iq2000_handle_option (struct gcc_options *,
- struct gcc_options *,
- const struct cl_decoded_option *,
- location_t);
static void iq2000_option_override (void);
static section *iq2000_select_rtx_section (enum machine_mode, rtx,
unsigned HOST_WIDE_INT);
#define TARGET_EXPAND_BUILTIN iq2000_expand_builtin
#undef TARGET_ASM_SELECT_RTX_SECTION
#define TARGET_ASM_SELECT_RTX_SECTION iq2000_select_rtx_section
-#undef TARGET_HANDLE_OPTION
-#define TARGET_HANDLE_OPTION iq2000_handle_option
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE iq2000_option_override
#undef TARGET_OPTION_OPTIMIZATION_TABLE
return ggc_alloc_cleared_machine_function ();
}
-/* Implement TARGET_HANDLE_OPTION. */
-
-static bool
-iq2000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
- 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_mcpu_:
- if (strcmp (arg, "iq10") == 0)
- iq2000_tune = PROCESSOR_IQ10;
- else if (strcmp (arg, "iq2000") == 0)
- iq2000_tune = PROCESSOR_IQ2000;
- else
- return false;
- return true;
-
- case OPT_march_:
- /* This option has no effect at the moment. */
- return (strcmp (arg, "default") == 0
- || strcmp (arg, "DEFAULT") == 0
- || strcmp (arg, "iq2000") == 0);
-
- default:
- return true;
- }
-}
-
/* Detect any conflicts in the switches. */
static void
/* Definitions of target machine for GNU compiler.
Vitesse IQ2000 processors
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
DELAY_FCMP /* Delay after doing c.<xx>.{d,s}. */
};
-/* Which processor to schedule for. */
-
-enum processor_type
-{
- PROCESSOR_DEFAULT,
- PROCESSOR_IQ2000,
- PROCESSOR_IQ10
-};
-
/* Recast the cpu class to be the cpu attribute. */
#define iq2000_cpu_attr ((enum attr_cpu) iq2000_tune)
#define SDATA_SECTION_ASM_OP "\t.sdata" /* Small data. */
\f
-/* The target cpu for optimization and scheduling. */
-extern enum processor_type iq2000_tune;
-
/* Which instruction set architecture to use. */
extern int iq2000_isa;
; Options for the Vitesse IQ2000 port of the compiler.
-; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+; Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
+HeaderInclude
+config/iq2000/iq2000-opts.h
+
+; The target cpu for optimization and scheduling.
+Variable
+enum processor_type iq2000_tune
+
+; This option has no effect at the moment.
march=
-Target RejectNegative Joined
+Target RejectNegative Joined Enum(iq2000_arch)
Specify CPU for code generation purposes
+Enum
+Name(iq2000_arch) Type(int)
+
+EnumValue
+Enum(iq2000_arch) String(default) Value(0)
+
+EnumValue
+Enum(iq2000_arch) String(DEFAULT) Value(0)
+
+EnumValue
+Enum(iq2000_arch) String(iq2000) Value(0)
+
mcpu=
-Target RejectNegative Joined
+Target RejectNegative Joined Enum(iq2000_tune) Var(iq2000_tune)
Specify CPU for scheduling purposes
+Enum
+Name(iq2000_tune) Type(enum processor_type)
+Known IQ2000 CPUs (for use with the -mcpu= option):
+
+EnumValue
+Enum(iq2000_tune) String(iq10) Value(PROCESSOR_IQ10)
+
+EnumValue
+Enum(iq2000_tune) String(iq2000) Value(PROCESSOR_IQ2000)
+
membedded-data
Target Mask(EMBEDDED_DATA)
Use ROM instead of RAM