stormy16.h (IRA_COVER_CLASSES): Define.
[gcc.git] / gcc / config / stormy16 / stormy16.h
index b2472bc841f152af47f1ae2cb8d77626cd49d8ac..4cd4084a2bbf2e9733699f18e4fafb784a3992c1 100644 (file)
@@ -1,13 +1,13 @@
 /* Xstormy16 cpu description.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-   Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
+   2008  Free Software Foundation, Inc.
    Contributed by Red Hat, 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 2, or (at your option)
+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,
@@ -16,9 +16,8 @@ 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 COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 \f
 /* Driver configuration */
@@ -58,15 +57,9 @@ Boston, MA 02111-1307, USA.  */
 #define TARGET_CPU_CPP_BUILTINS() do { \
   builtin_define_std ("xstormy16");    \
   builtin_assert ("machine=xstormy16");        \
+  builtin_assert ("cpu=xstormy16");     \
 } while (0)
 
-/* This declaration should be present.  */
-extern int target_flags;
-
-#define TARGET_SWITCHES                                        \
-  {{ "sim", 0, "Provide libraries for the simulator" },        \
-   { "", 0, "" }}
-
 #define TARGET_VERSION fprintf (stderr, " (xstormy16 cpu core)");
 
 #define CAN_DEBUG_WITHOUT_FP
@@ -205,6 +198,11 @@ enum reg_class
 
 #define N_REG_CLASSES ((int) LIM_REG_CLASSES)
 
+#define IRA_COVER_CLASSES                      \
+{                                              \
+  GENERAL_REGS, CARRY_REGS, LIM_REG_CLASSES    \
+}
+
 #define REG_CLASS_NAMES                                \
 {                                              \
   "NO_REGS",                                   \
@@ -343,7 +341,7 @@ enum reg_class
    because we don't have any pre-increment ones.  */
 #define STACK_PUSH_CODE POST_INC
 
-/* #define FRAME_GROWS_DOWNWARD */
+#define FRAME_GROWS_DOWNWARD 0
 
 #define ARGS_GROW_DOWNWARD 1
 
@@ -416,10 +414,6 @@ enum reg_class
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
        xstormy16_function_arg (CUM, MODE, TYPE, NAMED)
 
-#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0
-
-#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
-
 /* For this platform, the value of CUMULATIVE_ARGS is the number of words
    of arguments that have been passed in registers so far.  */
 #define CUMULATIVE_ARGS int
@@ -472,21 +466,6 @@ enum reg_class
    contains a '%s' sequence, this will be replaced by the name of the function.  */
 /* #define TARGET_CANNOT_INLINE_P(FN_DECL) xstormy16_cannot_inline_p (FN_DECL) */
 \f
-/* Implementing the Varargs Macros.  */
-
-/* Implement the stdarg/varargs va_start macro.  STDARG_P is nonzero if this
-   is stdarg.h instead of varargs.h.  VALIST is the tree of the va_list
-   variable to initialize.  NEXTARG is the machine independent notion of the
-   'next' argument after the variable arguments.  If not defined, a standard
-   implementation will be defined that works for arguments passed on the stack.  */
-#define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \
-  xstormy16_expand_builtin_va_start (VALIST, NEXTARG)
-
-/* Implement the stdarg/varargs va_arg macro.  VALIST is the variable of type
-   va_list as a tree, TYPE is the type passed to va_arg.  */
-#define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \
-  xstormy16_expand_builtin_va_arg (VALIST, TYPE)
-\f
 /* Trampolines for Nested Functions.  */
 
 #define TRAMPOLINE_SIZE 8
@@ -634,8 +613,9 @@ do {                                                        \
 #define CTORS_SECTION_ASM_OP   "\t.section\t.ctors,\"a\""
 #define DTORS_SECTION_ASM_OP   "\t.section\t.dtors,\"a\""
 
-#define JUMP_TABLES_IN_TEXT_SECTION 1
+#define TARGET_ASM_INIT_SECTIONS xstormy16_asm_init_sections
 
+#define JUMP_TABLES_IN_TEXT_SECTION 1
 \f
 /* The Overall Framework of an Assembler File.  */
 
@@ -647,17 +627,24 @@ do {                                                      \
 \f
 /* Output of Data.  */
 
-#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '|')
+#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '|')
+
+#define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGNMENT) \
+  xstormy16_asm_output_aligned_common (STREAM, DECL, NAME, SIZE, ALIGNMENT, 1)
+#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGNMENT) \
+  xstormy16_asm_output_aligned_common (STREAM, DECL, NAME, SIZE, ALIGNMENT, 0)
 
 \f
 /* Output and Generation of Labels.  */
+#define SYMBOL_FLAG_XSTORMY16_BELOW100 (SYMBOL_FLAG_MACH_DEP << 0)
 
 #define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL)                          \
   do {                                                                 \
+    const char *rn = XSTR (SYMBOL, 0);                                 \
     if (SYMBOL_REF_FUNCTION_P (SYMBOL))                                        \
-      ASM_OUTPUT_LABEL_REF ((STREAM), XSTR (SYMBOL, 0));               \
+      ASM_OUTPUT_LABEL_REF ((STREAM), rn);                             \
     else                                                               \
-      assemble_name (STREAM, XSTR (SYMBOL, 0));                                \
+      assemble_name (STREAM, rn);                                      \
   } while (0)
 
 #define ASM_OUTPUT_LABEL_REF(STREAM, NAME)     \
@@ -787,13 +774,6 @@ do  {                                              \
 \f
 /* Miscellaneous Parameters.  */
 
-#define PREDICATE_CODES                                        \
-  {"shift_operator", {ASHIFT, ASHIFTRT, LSHIFTRT }},   \
-  {"equality_operator", {EQ, NE }},                    \
-  {"inequality_operator", {GE, GT, LE, LT, GEU, GTU, LEU, LTU }}, \
-  {"xstormy16_ineqsi_operator", {LT, GE, LTU, GEU }}, \
-  {"nonimmediate_nonstack_operand", {REG, MEM}},
-
 #define CASE_VECTOR_MODE SImode
 
 #define WORD_REGISTER_OPERATIONS