OSDN Git Service

* config/m68hc11/m68hc11-protos.h: Add a prototype for
[pf3gnuchains/gcc-fork.git] / gcc / config / m68hc11 / m68hc11.h
index ba0a2c7..a03956e 100644 (file)
@@ -1,6 +1,7 @@
 /* Definitions of target machine for GNU compiler.
    Motorola 68HC11 and 68HC12.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GCC.
@@ -92,7 +93,9 @@ Note:
   while (0)
 
 /* As an embedded target, we have no libc.  */
-#define inhibit_libc
+#ifndef inhibit_libc
+#  define inhibit_libc
+#endif
 
 /* Forward type declaration for prototypes definitions.
    rtx_ptr is equivalent to rtx. Can't use the same name.  */
@@ -879,7 +882,9 @@ extern enum reg_class m68hc11_tmp_regs_class;
                 && VALUE == CONST0_RTX (GET_MODE (VALUE))) : 0) 
 
 /* 'U' represents certain kind of memory indexed operand for 68HC12.
-   and any memory operand for 68HC11.  */
+   and any memory operand for 68HC11.
+   'R' represents indexed addressing mode or access to page0 for 68HC11.
+   For 68HC12, it represents any memory operand.  */
 #define EXTRA_CONSTRAINT(OP, C)                         \
 ((C) == 'U' ? m68hc11_small_indexed_indirect_p (OP, GET_MODE (OP)) \
  : (C) == 'Q' ? m68hc11_symbolic_p (OP, GET_MODE (OP)) \
@@ -1004,9 +1009,6 @@ extern enum reg_class m68hc11_tmp_regs_class;
 \f
 /* Passing Function Arguments on the Stack.  */
 
-/* When a prototype says `char' or `short', really pass an `int'.  */
-/* #define PROMOTE_PROTOTYPES */
-
 /* If we generate an insn to push BYTES bytes, this says how many the
    stack pointer really advances by. No rounding or alignment needed
    for MC6811.  */
@@ -1020,15 +1022,6 @@ extern enum reg_class m68hc11_tmp_regs_class;
    The standard MC6811 call, with arg count word, includes popping the
    args as part of the call template.  */
 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
-
-/* Nonzero if type TYPE should be returned in memory.
-   Blocks and data types largers than 4 bytes cannot be returned
-   in the register (D + X = 4).  */
-#define RETURN_IN_MEMORY(TYPE)                         \
-    ((TYPE_MODE (TYPE) == BLKmode)                     \
-     ? (int_size_in_bytes (TYPE) > 4)                  \
-     : (GET_MODE_SIZE (TYPE_MODE (TYPE)) > 4))
-
 \f
 /* Passing Arguments in Registers.  */
 
@@ -1044,17 +1037,6 @@ typedef struct m68hc11_args
   int nregs;
 } CUMULATIVE_ARGS;
 
-/* A C expression that indicates when an argument must be passed by reference.
-   If nonzero for an argument, a copy of that argument is made in memory and a
-   pointer to the argument is passed instead of the argument itself.
-   The pointer is passed in whatever way is appropriate for passing a pointer
-   to that type.
-   64-bit numbers are passed by reference.  */
-#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
-    m68hc11_function_arg_pass_by_reference (& (CUM), (MODE), (TYPE), (NAMED))
-
-
 /* If defined, a C expression which determines whether, and in which direction,
    to pad out an argument with extra space.  The value should be of type
    `enum direction': either `upward' to pad above the argument,
@@ -1068,21 +1050,9 @@ typedef struct m68hc11_args
 #define PAD_VARARGS_DOWN \
   (m68hc11_function_arg_padding (TYPE_MODE (type), type) == downward)
 
-/* A C expression that indicates when it is the called function's
-   responsibility to make a copy of arguments passed by invisible
-   reference.  Normally, the caller makes a copy and passes the
-   address of the copy to the routine being called.  When
-   FUNCTION_ARG_CALLEE_COPIES is defined and is nonzero, the caller
-   does not make a copy.  Instead, it passes a pointer to the "live"
-   value.  The called function must not modify this value.  If it can
-   be determined that the value won't be modified, it need not make a
-   copy; otherwise a copy must be made.  */
-#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED)             \
-    ((NAMED) && FUNCTION_ARG_PASS_BY_REFERENCE (CUM, MODE, TYPE, NAMED))
-
 /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a
    function whose data type is FNTYPE. For a library call, FNTYPE is 0.  */
-#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
+#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
     (m68hc11_init_cumulative_args (&CUM, FNTYPE, LIBNAME))
 
 /* Update the data in CUM to advance over an argument of mode MODE and data
@@ -1114,14 +1084,6 @@ typedef struct m68hc11_args
    caller saving results in spill failure.  */
 #define CALLER_SAVE_PROFITABLE(REFS,CALLS) 0
 
-/* For an arg passed partly in registers and partly in memory,
-   this is the number of registers used.
-   For args passed entirely in registers or entirely in memory, zero.
-
-   Passing an arg partly in register and memory does not work at all.
-   Don't do that.  */
-#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) (0)
-
 /* 1 if N is a possible register number for function argument passing.
    D is for 16-bit values, X is for 32-bit (X+D).  */
 #define FUNCTION_ARG_REGNO_P(N)        \
@@ -1134,13 +1096,13 @@ typedef struct m68hc11_args
       The high part is passed in X and the low part in D.
       For GCC, the register number must be HARD_X_REGNUM.  */
 #define FUNCTION_VALUE(VALTYPE, FUNC)                                  \
-     gen_rtx (REG, TYPE_MODE (VALTYPE),                                        \
+     gen_rtx_REG (TYPE_MODE (VALTYPE),                                 \
               ((TYPE_MODE (VALTYPE) == BLKmode                         \
                || GET_MODE_SIZE (TYPE_MODE (VALTYPE)) <= 2)            \
                   ? HARD_D_REGNUM : HARD_X_REGNUM))
 
 #define LIBCALL_VALUE(MODE)                                            \
-     gen_rtx (REG, MODE,                                               \
+     gen_rtx_REG (MODE,                                                \
               (((MODE) == BLKmode || GET_MODE_SIZE (MODE) <= 2)                \
                    ? HARD_D_REGNUM : HARD_X_REGNUM))
 
@@ -1148,10 +1110,6 @@ typedef struct m68hc11_args
 #define FUNCTION_VALUE_REGNO_P(N) \
      ((N) == HARD_D_REGNUM || (N) == HARD_X_REGNUM)
 
-/* Register in which address to store a structure value is passed to a
-   function.  */
-#define STRUCT_VALUE_REGNUM    HARD_D_REGNUM
-
 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
    the stack pointer does not matter.  The value is tested only in functions
    that have frame pointers. No definition is equivalent to always zero.  */
@@ -1615,7 +1573,7 @@ do {                                                                    \
    sections when it shrinks the code.  This results in invalid addresses
    when debugging.  This does not bless too much the HC11/HC12 as most
    applications are embedded and small, hence a reasonable debug info.
-   This problem is known for binutils 2.13, 2.14 and mainline.   */
+   This problem is known for binutils 2.13, 2.14 and mainline.  */
 #undef HAVE_AS_DWARF2_DEBUG_LINE
 
 /* The prefix for local labels.  You should be able to define this as
@@ -1632,26 +1590,6 @@ do {                                                                    \
 \f
 /* Miscellaneous Parameters.  */
 
-/* Define the codes that are matched by predicates in m68hc11.c.  */
-#define PREDICATE_CODES \
-{"stack_register_operand",   {SUBREG, REG}},                           \
-{"d_register_operand",       {SUBREG, REG}},                           \
-{"hard_addr_reg_operand",    {SUBREG, REG}},                           \
-{"hard_reg_operand",         {SUBREG, REG}},                           \
-{"m68hc11_logical_operator", {AND, IOR, XOR}},                         \
-{"m68hc11_arith_operator",   {AND, IOR, XOR, PLUS, MINUS,              \
-                             ASHIFT, ASHIFTRT, LSHIFTRT,               \
-                             ROTATE, ROTATERT }},                      \
-{"m68hc11_non_shift_operator", {AND, IOR, XOR, PLUS, MINUS}},          \
-{"m68hc11_unary_operator",   {NEG, NOT, SIGN_EXTEND, ZERO_EXTEND}},    \
-{"m68hc11_shift_operator",   {ASHIFT, ASHIFTRT, LSHIFTRT, ROTATE, ROTATERT}},\
-{"m68hc11_eq_compare_operator", {EQ, NE}},                              \
-{"non_push_operand",         {SUBREG, REG, MEM}},                      \
-{"reg_or_some_mem_operand",  {SUBREG, REG, MEM}},                      \
-{"tst_operand",              {SUBREG, REG, MEM}},                      \
-{"cmp_operand",              {SUBREG, REG, MEM, SYMBOL_REF, LABEL_REF, \
-                            CONST_INT, CONST_DOUBLE}},
-
 /* Specify the machine mode that this machine uses
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE       Pmode