OSDN Git Service

PR c++/17413
[pf3gnuchains/gcc-fork.git] / gcc / config / dsp16xx / dsp16xx.h
index 36abc14..472ba1f 100644 (file)
@@ -1,22 +1,22 @@
 /* Definitions of target machine for GNU compiler.  AT&T DSP1600.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Contributed by Michael Collison (collison@isisinc.net).
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
+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)
 any later version.
 
-GNU CC is distributed in the hope that it will be useful,
+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 GNU CC; see the file COPYING.  If not, write to
+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.  */
 
@@ -31,29 +31,29 @@ extern const char *const_seg_name;
 extern const char *rsect_const;
 extern const char *chip_name;
 extern const char *save_chip_name;
-extern struct rtx_def *dsp16xx_compare_op0, *dsp16xx_compare_op1;
-extern struct rtx_def *dsp16xx_addhf3_libcall;
-extern struct rtx_def *dsp16xx_subhf3_libcall;
-extern struct rtx_def *dsp16xx_mulhf3_libcall;
-extern struct rtx_def *dsp16xx_divhf3_libcall;
-extern struct rtx_def *dsp16xx_cmphf3_libcall;
-extern struct rtx_def *dsp16xx_fixhfhi2_libcall;
-extern struct rtx_def *dsp16xx_floathihf2_libcall;
-extern struct rtx_def *dsp16xx_neghf2_libcall;
-extern struct rtx_def *dsp16xx_umulhi3_libcall;
-extern struct rtx_def *dsp16xx_mulhi3_libcall;
-extern struct rtx_def *dsp16xx_udivqi3_libcall;
-extern struct rtx_def *dsp16xx_udivhi3_libcall;
-extern struct rtx_def *dsp16xx_divqi3_libcall;
-extern struct rtx_def *dsp16xx_divhi3_libcall;
-extern struct rtx_def *dsp16xx_modqi3_libcall;
-extern struct rtx_def *dsp16xx_modhi3_libcall;
-extern struct rtx_def *dsp16xx_umodqi3_libcall;
-extern struct rtx_def *dsp16xx_umodhi3_libcall;
-
-extern struct rtx_def *dsp16xx_ashrhi3_libcall;
-extern struct rtx_def *dsp16xx_ashlhi3_libcall;
-extern struct rtx_def *dsp16xx_lshrhi3_libcall;
+extern GTY(()) rtx dsp16xx_compare_op0;
+extern GTY(()) rtx dsp16xx_compare_op1;
+extern GTY(()) rtx dsp16xx_addhf3_libcall;
+extern GTY(()) rtx dsp16xx_subhf3_libcall;
+extern GTY(()) rtx dsp16xx_mulhf3_libcall;
+extern GTY(()) rtx dsp16xx_divhf3_libcall;
+extern GTY(()) rtx dsp16xx_cmphf3_libcall;
+extern GTY(()) rtx dsp16xx_fixhfhi2_libcall;
+extern GTY(()) rtx dsp16xx_floathihf2_libcall;
+extern GTY(()) rtx dsp16xx_neghf2_libcall;
+extern GTY(()) rtx dsp16xx_mulhi3_libcall;
+extern GTY(()) rtx dsp16xx_udivqi3_libcall;
+extern GTY(()) rtx dsp16xx_udivhi3_libcall;
+extern GTY(()) rtx dsp16xx_divqi3_libcall;
+extern GTY(()) rtx dsp16xx_divhi3_libcall;
+extern GTY(()) rtx dsp16xx_modqi3_libcall;
+extern GTY(()) rtx dsp16xx_modhi3_libcall;
+extern GTY(()) rtx dsp16xx_umodqi3_libcall;
+extern GTY(()) rtx dsp16xx_umodhi3_libcall;
+
+extern GTY(()) rtx dsp16xx_ashrhi3_libcall;
+extern GTY(()) rtx dsp16xx_ashlhi3_libcall;
+extern GTY(()) rtx dsp16xx_lshrhi3_libcall;
 
 /* RUN-TIME TARGET SPECIFICATION */
 #define DSP16XX   1
@@ -71,13 +71,9 @@ extern struct rtx_def *dsp16xx_lshrhi3_libcall;
   (!strcmp (STR, "ifile") ? 1 :                 \
    0)
 
-#ifdef  CC1_SPEC
 #undef  CC1_SPEC
-#endif
 #define CC1_SPEC       "%{!O*:-O}"
 
-#define CPP_SPEC       "%{!O*:-D__OPTIMIZE__}"
-
 /* Define this as a spec to call the AT&T assembler */
 
 #define CROSS_ASM_SPEC   "%{!S:as1600 %a %i\n }"
@@ -94,13 +90,13 @@ extern struct rtx_def *dsp16xx_lshrhi3_libcall;
    circumstances */
 #define LIB_SPEC "-lc"
 
-/* Specify the startup file to link with. */
+/* Specify the startup file to link with.  */
 #define STARTFILE_SPEC "%{mmap1:m1_crt0.o%s}  \
 %{mmap2:m2_crt0.o%s}                          \
 %{mmap3:m3_crt0.o%s}                          \
 %{mmap4:m4_crt0.o%s}                          \
 %{!mmap*: %{!ifile*: m4_crt0.o%s} %{ifile*:     \
-%eA -ifile option requires a -map option}}"
+%ea -ifile option requires a -map option}}"
 
 /* Specify the end file to link with */
 
@@ -109,7 +105,7 @@ extern struct rtx_def *dsp16xx_lshrhi3_libcall;
 %{mmap3:m3_crtn.o%s}                          \
 %{mmap4:m4_crtn.o%s}                          \
 %{!mmap*: %{!ifile*: m4_crtn.o%s} %{ifile*:     \
-%eA -ifile option requires a -map option}}"
+%ea -ifile option requires a -map option}}"
 
 
 /* Tell gcc where to look for the startfile */
@@ -134,14 +130,33 @@ extern struct rtx_def *dsp16xx_lshrhi3_libcall;
 /* Include path is determined from the environment variable */
 #define INCLUDE_DEFAULTS     \
 {                            \
-  { 0, 0, 0 }                \
+  { 0, 0, 0, 0, 0 }          \
 }
 
 /* Names to predefine in the preprocessor for this target machine.  */
+#define TARGET_CPU_CPP_BUILTINS()              \
+  do                                           \
+    {                                          \
+      builtin_define_std ("dsp1600");          \
+      builtin_define_std ("DSP1600");          \
+    }                                          \
+  while (0)
+
 #ifdef __MSDOS__
-#define CPP_PREDEFINES "-Ddsp1600 -DDSP1600 -DMSDOS"
+# define TARGET_OS_CPP_BUILTINS()              \
+  do                                           \
+    {                                          \
+      builtin_define_std ("MSDOS");            \
+    }                                          \
+  while (0)
 #else
-#define CPP_PREDEFINES "-Ddsp1600 -DDSP1600 -Ddsp1610 -DDSP1610"
+# define TARGET_OS_CPP_BUILTINS()              \
+  do                                           \
+    {                                          \
+      builtin_define_std ("dsp1610");          \
+      builtin_define_std ("DSP1610");          \
+    }                                          \
+  while (0)
 #endif
 
 /* Run-time compilation parameters selecting different hardware subsets.  */
@@ -182,7 +197,7 @@ extern int target_flags;
 #define TARGET_NEAR_JUMP (target_flags & MASK_NEAR_JUMP)
 
 /* Generate shift instructions to use the 1610 Bit Manipulation
-   Unit. */
+   Unit.  */
 #define TARGET_BMU (target_flags & MASK_BMU)
 
 #define TARGET_YBASE_HIGH (target_flags & MASK_YBASE_HIGH)
@@ -251,35 +266,18 @@ extern int target_flags;
 #define TARGET_DEFAULT  MASK_REGPARM|MASK_YBASE_HIGH
 #endif
 
-/* This macro is similar to `TARGET_SWITCHES' but defines names of
-   command options that have values.  Its definition is an
-   initializer with a subgrouping for each command option.
-
-   Each subgrouping contains a string constant, that defines the
-   fixed part of the option name, and the address of a variable. 
-   The variable, type `char *', is set to the variable part of the
-   given option if the fixed part matches.  The actual option name
-   is made by appending `-m' to the specified name.
-
-   Here is an example which defines `-mshort-data-NUMBER'.  If the
-   given option is `-mshort-data-512', the variable `m88k_short_data'
-   will be set to the string `"512"'.
-
-       extern char *m88k_short_data;
-       #define TARGET_OPTIONS { { "short-data-", &m88k_short_data } }  */
-
 #define TARGET_OPTIONS                                         \
 {                                                              \
   { "text=",   &text_seg_name,                                 \
-    N_("Specify alternate name for text section") },            \
+    N_("Specify alternate name for text section"), 0},          \
   { "data=",   &data_seg_name,                                 \
-    N_("Specify alternate name for data section") },            \
+    N_("Specify alternate name for data section"), 0},          \
   { "bss=",    &bss_seg_name,                                  \
-    N_("Specify alternate name for bss section") },             \
+    N_("Specify alternate name for bss section"), 0},           \
   { "const=",   &const_seg_name,                                \
-    N_("Specify alternate name for constant section") },        \
+    N_("Specify alternate name for constant section"), 0},      \
   { "chip=",    &chip_name,                                     \
-    N_("Specify alternate name for dsp16xx chip") },            \
+    N_("Specify alternate name for dsp16xx chip"), 0},          \
 }
 
 /* Sometimes certain combinations of command options do not make sense
@@ -295,8 +293,6 @@ extern int target_flags;
 
 #define OPTIMIZATION_OPTIONS(LEVEL,SIZE)              \
 {                                                     \
-    flag_gnu_linker             = FALSE;              \
-                                                      \
     if (LEVEL >= 2)                                   \
     {                                                 \
         /* The dsp16xx family has so few registers    \
@@ -311,11 +307,6 @@ extern int target_flags;
 \f
 /* STORAGE LAYOUT */
 
-/* Define if you don't want extended real, but do want to use the
-   software floating point emulator for REAL_ARITHMETIC and
-   decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
 /* Define this if most significant bit is lowest numbered
    in instructions that operate on numbered bit-fields.
  */
@@ -323,32 +314,22 @@ extern int target_flags;
 
 /* Define this if most significant byte of a word is the lowest numbered.
    We define big-endian, but since the 1600 series cannot address bytes
-   it does not matter. */
+   it does not matter.  */
 #define BYTES_BIG_ENDIAN 1
 
 /* Define this if most significant word of a multiword number is numbered.
-   For the 1600 we can decide arbitrarily since there are no machine instructions for them. */
+   For the 1600 we can decide arbitrarily since there are no machine instructions for them.  */
 #define WORDS_BIG_ENDIAN 1
 
 /* number of bits in an addressable storage unit */
 #define BITS_PER_UNIT 16
 
-/* Width in bits of a "word", which is the contents of a machine register.
-   Note that this is not necessarily the width of data type `int';
-   if using 16-bit ints on a 68000, this would still be 32.
-   But on a machine with 16-bit registers, this would be 16.  */
-#define BITS_PER_WORD 16
-
-/* Maximum number of bits in a word. */
+/* Maximum number of bits in a word.  */
 #define MAX_BITS_PER_WORD 16
 
 /* Width of a word, in units (bytes).  */
 #define UNITS_PER_WORD 1
 
-/* Width in bits of a pointer.
-   See also the macro `Pmode' defined below.  */
-#define POINTER_SIZE 16
-
 /* Allocation boundary (in *bits*) for storing pointers in memory.  */
 #define POINTER_BOUNDARY 16
 
@@ -380,12 +361,11 @@ extern int target_flags;
 
 /* An integer expression for the size in bits of the largest integer machine mode that
    should actually be used. All integer machine modes of this size or smaller can be
-   used for structures and unions with the appropriate sizes. */
+   used for structures and unions with the appropriate sizes.  */
 #define MAX_FIXED_MODE_SIZE 32
 \f
 /* LAYOUT OF SOURCE LANGUAGE DATA TYPES */
 
-#define CHAR_TYPE_SIZE         16
 #define SHORT_TYPE_SIZE        16
 #define INT_TYPE_SIZE          16
 #define LONG_TYPE_SIZE         32
@@ -395,19 +375,19 @@ extern int target_flags;
 #define LONG_DOUBLE_TYPE_SIZE  32
 
 /* An expression whose value is 1 or 0, according to whether the type char should be
-   signed or unsigned by default. */
+   signed or unsigned by default.  */
 
 #define DEFAULT_SIGNED_CHAR 1
 
 /* A C expression to determine whether to give an enum type only as many bytes
    as it takes to represent the range of possible values of that type. A nonzero
    value means to do that; a zero value means all enum types should be allocated
-   like int. */
+   like int.  */
 
 #define DEFAULT_SHORT_ENUMS 0
 
 /* A C expression for a string describing the name of the data type to use for
-   size values. */
+   size values.  */
 
 #define SIZE_TYPE    "unsigned int"
 
@@ -440,7 +420,7 @@ extern int target_flags;
 
    We reserve r2 for the Stack Pointer.
    We specify r3 for the Frame Pointer but allow the compiler
-   to omit it when possible since we have so few pointer registers. */
+   to omit it when possible since we have so few pointer registers.  */
 
 #define REG_A0     0
 #define REG_A0L    1
@@ -501,7 +481,7 @@ extern int target_flags;
 #define REG_YBASE30 56
 #define REG_YBASE31 57
 
-/* Do we have a accumulator register? */
+/* Do we have an accumulator register? */
 #define IS_ACCUM_REG(REGNO) IN_RANGE ((REGNO), REG_A0, REG_A1L)
 #define IS_ACCUM_LOW_REG(REGNO) ((REGNO) == REG_A0L || (REGNO) == REG_A1L)
 
@@ -644,12 +624,12 @@ while (0)
 /* Return number of consecutive hard regs needed starting at reg REGNO
    to hold something of mode MODE.
    This is ordinarily the length in words of a value of mode MODE
-   but can be less for certain modes in special long registers. */
+   but can be less for certain modes in special long registers.  */
 
 #define HARD_REGNO_NREGS(REGNO, MODE)                                 \
   (GET_MODE_SIZE(MODE))
 
-/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
+/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.  */
 
 #define HARD_REGNO_MODE_OK(REGNO, MODE) hard_regno_mode_ok(REGNO, MODE)
 
@@ -789,7 +769,7 @@ enum reg_class
 
 #define N_REG_CLASSES (int) LIM_REG_CLASSES
 
-/* Give names of register classes as strings for dump file.   */
+/* Give names of register classes as strings for dump file.  */
 
 #define REG_CLASS_NAMES        \
 {                              \
@@ -946,7 +926,7 @@ enum reg_class
 #define INDEX_REG_CLASS NO_REGS
 #define BASE_REG_CLASS  Y_ADDR_REGS
 
-/* Get reg_class from a letter such as appears in the machine description. */
+/* Get reg_class from a letter such as appears in the machine description.  */
 
 #define REG_CLASS_FROM_LETTER(C) \
   dsp16xx_reg_class_from_letter(C)
@@ -956,7 +936,7 @@ enum reg_class
 
 /* When defined, the compiler allows registers explicitly used in the
    rtl to be used as spill registers but prevents the compiler from
-   extending the lifetime of these registers. */
+   extending the lifetime of these registers.  */
 
 #define SMALL_REGISTER_CLASSES 1
 
@@ -1012,7 +992,7 @@ enum reg_class
      smaller class.
 
      Don't define this macro unless the target machine has limitations
-     which require the macro to do something nontrivial. */
+     which require the macro to do something nontrivial.  */
 
 #if 0
 #define LIMIT_RELOAD_CLASS(MODE, CLASS) dsp16xx_limit_reload_class (MODE, CLASS)
@@ -1035,7 +1015,7 @@ enum reg_class
    'K' requires a constant 0 operand.
    'L' constant for use in add or sub from low 16-bits
    'M' 32-bit value -- low 16-bits zero
-   'N' constant for use incrementing or decrementing a address register
+   'N' constant for use incrementing or decrementing an address register
    'O' constant for use with and'ing only high 16-bit
    'P' constant for use with and'ing only low 16-bit
  */
@@ -1085,7 +1065,7 @@ enum reg_class
 /* We use post decrement on the 1600 because there isn't
    a pre-decrement addressing mode. This means that we
    assume the stack pointer always points at the next
-   FREE location on the stack. */
+   FREE location on the stack.  */
 #define STACK_PUSH_CODE POST_INC
 
 /* Offset within stack frame to start allocating local variables at.
@@ -1095,7 +1075,7 @@ enum reg_class
 #define STARTING_FRAME_OFFSET  0
 
 /* Offset from the stack pointer register to the first
-   location at which outgoing arguments are placed. */
+   location at which outgoing arguments are placed.  */
 #define STACK_POINTER_OFFSET (0)
 
 struct dsp16xx_frame_info
@@ -1118,7 +1098,7 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define RETURN_ADDR_OFF current_frame_info.pr_save_offset
 
 /* If we generate an insn to push BYTES bytes,
-   this says how many the stack pointer really advances by. */
+   this says how many the stack pointer really advances by.  */
 /* #define PUSH_ROUNDING(BYTES) ((BYTES)) */
 
 /* If defined, the maximum amount of space required for outgoing
@@ -1128,11 +1108,11 @@ extern struct dsp16xx_frame_info current_frame_info;
    increase the stack frame size by this amount.
 
    It is not proper to define both 'PUSH_ROUNDING' and
-   'ACCUMULATE_OUTGOING_ARGS'. */
+   'ACCUMULATE_OUTGOING_ARGS'.  */
 #define ACCUMULATE_OUTGOING_ARGS 1
 
 /* Offset of first parameter from the argument pointer
-   register value. */
+   register value.  */
 
 #define FIRST_PARM_OFFSET(FNDECL)   (0)
 
@@ -1140,7 +1120,7 @@ extern struct dsp16xx_frame_info current_frame_info;
    pops the arguments described by the number-of-args field in the call.
    FUNDECL is the declaration node of the function (as a tree),
    FUNTYPE is the data type of the function (as a tree),
-   or for a library call it is an identifier node for the subroutine name. */
+   or for a library call it is an identifier node for the subroutine name.  */
 
 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
 
@@ -1149,7 +1129,7 @@ extern struct dsp16xx_frame_info current_frame_info;
    If the precise function being called is known, FUNC is its FUNCTION_DECL;
    otherwise, FUNC is 0. On the 1610 all function return their values
    in a0 (i.e. the upper 16 bits). If the return value is 32-bits the
-   entire register is significant. */
+   entire register is significant.  */
 
 #define VALUE_REGNO(MODE)  (REG_Y)
 
@@ -1160,7 +1140,7 @@ extern struct dsp16xx_frame_info current_frame_info;
    assuming the value has mode MODE.  */
 #define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, VALUE_REGNO(MODE))
 
-/* 1 if N is a possible register number for a function value. */
+/* 1 if N is a possible register number for a function value.  */
 #define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_Y)
 \f
 
@@ -1178,7 +1158,7 @@ extern struct dsp16xx_frame_info current_frame_info;
     (otherwise it is an extra parameter matching an ellipsis).  */
 
 /* On the 1610 all args are pushed, except if -mregparm is specified
-   then the first two words of arguments are passed in a0, a1. */
+   then the first two words of arguments are passed in a0, a1.  */
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
   dsp16xx_function_arg (CUM, MODE, TYPE, NAMED)
 
@@ -1188,7 +1168,7 @@ extern struct dsp16xx_frame_info current_frame_info;
 /* Define the profitability of saving registers around calls.
    NOTE: For now we turn this off because of a bug in the
    caller-saves code and also because i'm not sure it is helpful
-   on the 1610. */
+   on the 1610.  */
 
 #define CALLER_SAVE_PROFITABLE(REFS,CALLS) 0
 
@@ -1210,13 +1190,14 @@ extern struct dsp16xx_frame_info current_frame_info;
    during the scan of that argument list.  This data type should
    hold all necessary information about the function itself
    and about the args processed so far, enough to enable macros
-   such as FUNCTION_ARG to determine where the next arg should go. */
+   such as FUNCTION_ARG to determine where the next arg should go.  */
 #define CUMULATIVE_ARGS int
 
 /* 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)  ((CUM) = 0)
+   For a library call, FNTYPE is 0.  */
+#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
+  ((CUM) = 0)
 
 /* Update the data in CUM to advance over an argument
    of mode MODE and data type TYPE.
@@ -1225,26 +1206,15 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)   \
   dsp16xx_function_arg_advance (&CUM, MODE,TYPE, NAMED)
 
-/* 1 if N is a possible register number for function argument passing. */
+/* 1 if N is a possible register number for function argument passing.  */
 #define FUNCTION_ARG_REGNO_P(N)   \
   ((N) == REG_Y || (N) == REG_YL || (N) == REG_PROD || (N) == REG_PRODL)
 
 /* Output assembler code to FILE to increment profiler label # LABELNO
-   for profiling a function entry. */
+   for profiling a function entry.  */
 
 #define FUNCTION_PROFILER(FILE, LABELNO)        \
-  internal_error ("Profiling not implemented yet.")
-
-/* Output assembler code to FILE to initialize this source file's
-   basic block profiling info, if that has not already been done. */
-#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO)  \
-  internal_error ("Profiling not implemented yet.")
-
-/* Output assembler code to FILE to increment the entry-count for
-   the BLOCKNO'th basic block in this source file. */
-#define BLOCK_PROFILER(FILE, BLOCKNO)          \
-  internal_error ("Profiling not implemented yet.")
-
+  internal_error ("profiling not implemented yet")
 
 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
    the stack pointer does not matter.  The value is tested only in
@@ -1254,7 +1224,7 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define EXIT_IGNORE_STACK  (0)
 
 #define TRAMPOLINE_TEMPLATE(FILE) \
-  internal_error ("Trampolines not yet implemented");
+  internal_error ("trampolines not yet implemented");
 
 /* Length in units of the trampoline for entering a nested function.
    This is a dummy value  */
@@ -1263,19 +1233,19 @@ extern struct dsp16xx_frame_info current_frame_info;
 
 /* Emit RTL insns to initialize the variable parts of a trampoline.
    FNADDR is an RTX for the address of the function's pure code.
-   CXT is an RTX for the static chain value for the function. */
+   CXT is an RTX for the static chain value for the function.  */
 
 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                      \
-  internal_error ("Trampolines not yet implemented");
+  internal_error ("trampolines not yet implemented");
 
 /* A C expression which is nonzero if a function must have and use a
    frame pointer. If its value is nonzero the functions will have a
-   frame pointer. */
+   frame pointer.  */
 #define FRAME_POINTER_REQUIRED  (current_function_calls_alloca)
 
 /* A C statement to store in the variable 'DEPTH' the difference
    between the frame pointer and the stack pointer values immediately
-   after the function prologue. */
+   after the function prologue.  */
 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH)                     \
 {  (DEPTH) = initial_frame_pointer_offset();                   \
 }
@@ -1307,7 +1277,7 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define LSHLHI3_LIBCALL     "__Emulate_lshlhi3"   /* NOT USED */
 
 /* Define this macro if calls to the ANSI C library functions memcpy and
-   memset should be generated instead of the BSD function bcopy & bzero. */
+   memset should be generated instead of the BSD function bcopy & bzero.  */
 #define TARGET_MEM_FUNCTIONS
 
 \f
@@ -1317,9 +1287,6 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define HAVE_POST_INCREMENT 1
 #define HAVE_POST_DECREMENT 1
 
-/* #define HAVE_PRE_DECREMENT 0 */
-/* #define HAVE_PRE_INCREMENT 0 */
-
 /* Recognize any constant value that is a valid address.  */
 #define CONSTANT_ADDRESS_P(X)  CONSTANT_P (X)
 
@@ -1456,95 +1423,21 @@ extern struct dsp16xx_frame_info current_frame_info;
 /* Store in cc_status the expressions
    that the condition codes will describe
    after execution of an instruction whose pattern is EXP.
-   Do not alter them if the instruction would not alter the cc's. */
+   Do not alter them if the instruction would not alter the cc's.  */
 
 #define NOTICE_UPDATE_CC(EXP, INSN) \
    notice_update_cc( (EXP) )
 \f
 /* DESCRIBING RELATIVE COSTS OF OPERATIONS */
 
-/* Compute the cost of computing a constant rtl expression RTX
-   whose rtx-code is CODE.  The body of this macro is a portion
-   of a switch statement.  If the code is computed here,
-   return it with a return statement. */
-#define CONST_COSTS(RTX,CODE,OUTER_CODE)                                \
-  case CONST_INT:                                                      \
-    return (unsigned) INTVAL (RTX) < 65536 ? 0 : 2;                     \
-  case LABEL_REF:                                                      \
-  case SYMBOL_REF:                                                     \
-  case CONST:                                                          \
-    return COSTS_N_INSNS (1);                                          \
-                                                                        \
-  case CONST_DOUBLE:                                                   \
-    return COSTS_N_INSNS (2);
-
-/* Like CONST_COSTS but applies to nonconstant RTL expressions.
-   This can be used, for example to indicate how costly a multiply
-   instruction is. */
-#define RTX_COSTS(X,CODE,OUTER_CODE)                            \
-  case MEM:                                                     \
-    return GET_MODE (X) == QImode ? COSTS_N_INSNS (2) :         \
-                                    COSTS_N_INSNS (4);          \
-  case DIV:                                                     \
-  case MOD:                                                     \
-    return COSTS_N_INSNS (38);                                  \
-  case MULT:                                                    \
-    if (GET_MODE (X) == QImode)                                 \
-        return COSTS_N_INSNS (2);                               \
-    else                                                        \
-        return COSTS_N_INSNS (38);                              \
-  case PLUS:                                                    \
-  case MINUS:                                                   \
-    if (GET_MODE_CLASS (GET_MODE (X)) == MODE_INT)              \
-        {                                                       \
-          return (1 +                                           \
-                  rtx_cost (XEXP (X, 0), CODE) +                \
-                  rtx_cost (XEXP (X, 1), CODE));                \
-        }                                                       \
-    else                                                        \
-        return COSTS_N_INSNS (38);                              \
-                                                                \
-  case AND: case IOR: case XOR:                                 \
-        return (1 +                                             \
-                rtx_cost (XEXP (X, 0), CODE) +                  \
-                rtx_cost (XEXP (X, 1), CODE));                  \
-                                                                \
-  case NEG: case NOT:                                           \
-    return COSTS_N_INSNS (1);                                   \
-  case ASHIFT:                                                  \
-  case ASHIFTRT:                                                \
-  case LSHIFTRT:                                                \
-    if (GET_CODE (XEXP (X,1)) == CONST_INT)                     \
-      {                                                         \
-        int number = INTVAL(XEXP (X,1));                        \
-        if (number == 1 || number == 4 || number == 8 ||        \
-            number == 16)                                       \
-            return COSTS_N_INSNS (1);                           \
-        else                                                    \
-       {                                                       \
-          if (TARGET_BMU)                                       \
-            return COSTS_N_INSNS (2);                           \
-          else                                                  \
-            return COSTS_N_INSNS (num_1600_core_shifts(number)); \
-       }                                                       \
-      }                                                         \
-    if (TARGET_BMU)                                             \
-      return COSTS_N_INSNS (1);                                 \
-    else                                                        \
-      return COSTS_N_INSNS (15);
-
-/* An expression giving the cost of an addressing mode that contains
-   address. */
-#define ADDRESS_COST(ADDR)  dsp16xx_address_cost (ADDR)
-
 /* A c expression for the cost of moving data from a register in
    class FROM to one in class TO. The classes are expressed using
    the enumeration values such as GENERAL_REGS. A value of 2 is
-   the default. */
+   the default.  */
 #define REGISTER_MOVE_COST(MODE,FROM,TO)  dsp16xx_register_move_cost (FROM, TO)
 
 /* A C expression for the cost of moving data of mode MODE between
-   a register and memory. A value of 2 is the default. */
+   a register and memory. A value of 2 is the default.  */
 #define MEMORY_MOVE_COST(MODE,CLASS,IN)                          \
   (GET_MODE_CLASS(MODE) == MODE_INT && MODE == QImode ? 12       \
    : 16)
@@ -1555,27 +1448,20 @@ extern struct dsp16xx_frame_info current_frame_info;
 \f
 
 /* Define this because otherwise gcc will try to put the function address
-   in any old pseudo register. We can only use pt. */
+   in any old pseudo register. We can only use pt.  */
 #define NO_FUNCTION_CSE
 
 /* Define this macro as a C expression which is nonzero if accessing less
    than a word of memory (i.e a char or short) is no faster than accessing
    a word of memory, i.e if such access require more than one instruction
-   or if ther is no difference in cost between byte and (aligned) word
-   loads. */
+   or if there is no difference in cost between byte and (aligned) word
+   loads.  */
 #define SLOW_BYTE_ACCESS 1
 
-/* Define this macro if zero-extension (of a char or short to an int) can
-   be done faster if the destination is a register that is know to be zero. */
-/* #define SLOW_ZERO_EXTEND */
-
 /* Define this macro if unaligned accesses have a cost many times greater than
    aligned accesses, for example if they are emulated in a trap handler */
 /* define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) */
 
-/* Define this macro to inhibit strength reduction of memory addresses */
-/* #define DONT_REDUCE_ADDR */
-
 \f
 /* DIVIDING THE OUTPUT IN SECTIONS */
 /* Output before read-only data.  */
@@ -1585,8 +1471,7 @@ extern struct dsp16xx_frame_info current_frame_info;
 
 /* Output before constants and strings */
 #define DEFAULT_CONST_SEG_NAME  ".const"
-#define READONLY_SECTION_ASM_OP rsect_const
-#define READONLY_DATA_SECTION   const_section
+#define READONLY_DATA_SECTION_ASM_OP rsect_const
 
 /* Output before writable data.  */
 #define DEFAULT_DATA_SEG_NAME ".data"
@@ -1596,35 +1481,13 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define BSS_SECTION_ASM_OP rsect_bss
 
 /* We will default to using 1610 if the user doesn't
-   specify it. */
+   specify it.  */
 #define DEFAULT_CHIP_NAME "1610"
-
-/* A list of names for sections other than the standard ones, which are
-   'in_text' and 'in_data' (and .bss if BSS_SECTION_ASM_OP is defined). */
-#define EXTRA_SECTIONS in_const
-
-#define EXTRA_SECTION_FUNCTIONS  \
-extern void const_section PARAMS ((void));                         \
-void                                                               \
-const_section ()                                                   \
-{                                                                  \
-    if (in_section != in_const)                                    \
-    {                                                              \
-        fprintf (asm_out_file, "%s\n", READONLY_SECTION_ASM_OP);   \
-       in_section = in_const;                                     \
-    }                                                              \
-}
 \f
 /* THE OVERALL FRAMEWORK OF AN ASSEMBLER FILE */
 
-/* Output at beginning of assembler file.  */
-#define ASM_FILE_START(FILE) coff_dsp16xx_file_start (FILE) 
-
-/* Prevent output of .gcc_compiled */
-#define ASM_IDENTIFY_GCC(FILE)   
-
 /* A C string constant describing how to begin a comment in the target
-   assembler language. */
+   assembler language.  */
 #define ASM_COMMENT_START ""
 #define ASM_COMMENT_END ""
 
@@ -1638,31 +1501,6 @@ const_section ()                                                   \
 \f
 /* OUTPUT OF DATA */
 
-/* This is how to output an assembler line defining a `double' constant.  */
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE)  asm_output_float (FILE,VALUE)
-
-/* This is how to output an assembler line defining a `float' constant.  */
-#define ASM_OUTPUT_FLOAT(FILE,VALUE)  asm_output_float (FILE, VALUE)
-
-/* This is how to output an assembler line defining a 'float' constant of
-   size HFmode. */
-#define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE)  asm_output_float (FILE, VALUE)
-
-/* This is how to output an assembler line defining an `char' constant.  */
-#define ASM_OUTPUT_CHAR(FILE,VALUE)              \
-( fprintf (FILE, "\tint "),                    \
-  output_addr_const (FILE, (VALUE)),           \
-  fprintf (FILE, "\n"))
-
-/* This is how to output an assembler line defining an `short' constant.  */
-#define ASM_OUTPUT_SHORT(FILE,EXP)   asm_output_long(FILE,INTVAL(EXP))
-
-/* This is how to output an assembler line defining a 'int' constant. */
-#define ASM_OUTPUT_INT(FILE, EXP)    asm_output_long(FILE,INTVAL(EXP))
-
-/* This is how to output an assembler line for a numeric constant byte.  */
-#define ASM_OUTPUT_BYTE(FILE,VALUE)    ASM_OUTPUT_CHAR(FILE,GEN_INT(VALUE))
-
 /* This is how we output a 'c' character string. For the 16xx
    assembler we have to do it one letter at a time */
 
@@ -1697,7 +1535,7 @@ const_section ()                                                   \
              fprintf (asm_out_file, "%d", c);                                \
              /* After an octal-escape, if a digit follows,                   \
                 terminate one string constant and start another.             \
-                The Vax assembler fails to stop reading the escape           \
+                The VAX assembler fails to stop reading the escape           \
                 after three digits, so this is the only way we               \
                 can get it to parse the data properly.                       \
              if (i < thissize - 1 && ISDIGIT (p[i + 1]))                     \
@@ -1720,22 +1558,7 @@ const_section ()                                                   \
   }                                                                          \
   while (0)
 
-/* Store in OUTPUT a string (made with alloca) containing
-   an assembler-name for a local static variable or function
-   named NAME. LABELNO is an integer which is different for
-   each call. */
-
-#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)                 \
-  do {                                                                 \
-    int len = strlen (NAME);                                           \
-    char *temp = (char *) alloca (len + 3);                            \
-    temp[0] = 'L';                                                     \
-    strcpy (&temp[1], (NAME));                                         \
-    temp[len + 1] = '_';                                               \
-    temp[len + 2] = 0;                                                 \
-    (OUTPUT) = (char *) alloca (strlen (NAME) + 11);                   \
-    ASM_GENERATE_INTERNAL_LABEL (OUTPUT, temp, LABELNO);               \
-  } while (0)
+#define ASM_PN_FORMAT "*L%s_%lu"
 \f
 /* OUTPUT OF UNINITIALIZED VARIABLES */
 
@@ -1753,20 +1576,12 @@ const_section ()                                                   \
 \f
 /* OUTPUT AND GENERATION OF LABELS */
 
-/* This is how to output the definition of a user-level label named NAME,
-   such as the label on a static function or variable NAME.  */
-#define ASM_OUTPUT_LABEL(FILE,NAME)    \
-  do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
-/* This is how to output a command to make the user-level label named NAME
-   defined for reference from other files.  */
-
-#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
-  do { fputs (".global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label.  */
+#define GLOBAL_ASM_OP ".global "
 
 /* A C statement to output to the stdio stream any text necessary
    for declaring the name of an external symbol named name which
-   is referenced in this compilation but not defined. */
+   is referenced in this compilation but not defined.  */
 
 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)   \
 {                                      \
@@ -1775,7 +1590,7 @@ const_section ()                                                   \
        fprintf (FILE, "\n");           \
 }
 /* A C statement to output on stream an assembler pseudo-op to
-   declare a library function named external. */
+   declare a library function named external.  */
 
 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)    \
 {                                              \
@@ -1784,21 +1599,16 @@ const_section ()                                                   \
        fprintf (FILE, "\n");                   \
 }
 
-/* The prefix to add to user-visible assembler symbols. */
+/* The prefix to add to user-visible assembler symbols.  */
 
 #define USER_LABEL_PREFIX "_"
 
-/* This is how to output an internal numbered label where
-   PREFIX is the class of label and NUM is the number within the class.  */
-#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)     \
-  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
-
 /* This is how to store into the string LABEL
    the symbol_ref name of an internal numbered label where
    PREFIX is the class of label and NUM is the number within the class.
    This is suitable for output with `assemble_name'.  */
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
-  sprintf (LABEL, "*%s%d", PREFIX, NUM)
+  sprintf (LABEL, "*%s%lu", PREFIX, (unsigned long)(NUM))
 
 \f
 /* OUTPUT OF ASSEMBLER INSTRUCTIONS */
@@ -1848,29 +1658,29 @@ const_section ()                                                   \
 #define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE, X, CODE)
 
 
-/* Print a memory address as an operand to reference that memory location. */
+/* Print a memory address as an operand to reference that memory location.  */
 
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  print_operand_address (FILE, ADDR)
 
 /* This is how to output an insn to push a register on the stack.
    It need not be very fast code since it is used only for profiling  */
 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)    \
-  internal_error ("Profiling not implemented yet.");
+  internal_error ("profiling not implemented yet");
 
 /* This is how to output an insn to pop a register from the stack.
    It need not be very fast code since it is used only for profiling  */
 #define ASM_OUTPUT_REG_POP(FILE,REGNO)     \
-  internal_error ("Profiling not implemented yet."); 
+  internal_error ("profiling not implemented yet"); 
 \f
 /* OUTPUT OF DISPATCH TABLES */
 
 /* This macro should be provided on machines where the addresses in a dispatch
-   table are relative to the table's own address. */
+   table are relative to the table's own address.  */
 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)  \
   fprintf (FILE, "\tint L%d-L%d\n", VALUE, REL)
 
 /* This macro should be provided on machines where the addresses in a dispatch
-   table are absolute. */
+   table are absolute.  */
 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
   fprintf (FILE, "\tint L%d\n", VALUE)
 
@@ -1878,22 +1688,20 @@ const_section ()                                                   \
 
 /* This is how to output an assembler line that says to advance 
    the location counter to a multiple of 2**LOG bytes. We should
-   not have to do any alignment since the 1610 is a word machine. */
+   not have to do any alignment since the 1610 is a word machine.  */
 #define ASM_OUTPUT_ALIGN(FILE,LOG)
 
 /* Define this macro if ASM_OUTPUT_SKIP should not be used in the text section
-   because it fails to put zero1 in the bytes that are skipped. */
+   because it fails to put zero1 in the bytes that are skipped.  */
 #define ASM_NO_SKIP_IN_TEXT 1
 
 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
-  fprintf (FILE, "\t%d * int 0\n", (SIZE))
+  fprintf (FILE, "\t%d * int 0\n", (int)(SIZE))
 
 /* CONTROLLING DEBUGGING INFORMATION FORMAT */
 
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
-#define DBX_REGISTER_NUMBER(REGNO)   (REGNO)
-
 #define ASM_OUTPUT_DEF(asm_out_file, LABEL1, LABEL2) \
          do {                                          \
         fprintf (asm_out_file, ".alias " ); \
@@ -1913,15 +1721,9 @@ const_section ()                                                   \
 /* Define as C expression which evaluates to nonzero if the tablejump
    instruction expects the table to contain offsets from the address of the
    table.
-   Do not define this if the table should contain absolute addresses. */
+   Do not define this if the table should contain absolute addresses.  */
 /* #define CASE_VECTOR_PC_RELATIVE 1 */
 
-/* Specify the tree operation to be used to convert reals to integers.  */
-#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
-
-/* This is the kind of divide that is easiest to do in the general case.  */
-#define EASY_DIV_EXPR TRUNC_DIV_EXPR
-
 /* Max number of bytes we can move from memory to memory
    in one reasonably fast instruction.  */
 #define MOVE_MAX 1
@@ -1930,7 +1732,7 @@ const_section ()                                                   \
    or bitwise 'and' instruction that truncates the count of a shift operation
    to a width equal to the number of bits needed to represent the size of the
    object being shifted. Do not define this macro unless the truncation applies
-   to both shift operations and bit-field operations (if any). */
+   to both shift operations and bit-field operations (if any).  */
 /* #define SHIFT_COUNT_TRUNCATED */
 
 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
@@ -1961,6 +1763,6 @@ const_section ()                                                   \
 #define DEFAULT_SIGNED_CHAR 1
 
 /* Define this so gcc does not output a call to __main, since we
-   are not currently supporting c++. */
+   are not currently supporting c++.  */
 #define INIT_SECTION_ASM_OP  1