]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ip2k-protos.h (function_prologue, [...]): Update to match target hook specification.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 4 Sep 2002 20:32:35 +0000 (20:32 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 4 Sep 2002 20:32:35 +0000 (20:32 +0000)
* ip2k-protos.h (function_prologue, function_epilogue,
encode_section_info): Update to match target hook specification.
* ip2k.c: Wrap `MDR' code in IP2K_MD_REORG_PASS.
(function_prologue, function_epilogue, encode_section_info):
Update to match target hook specification.
* ip2k.h (SELECT_SECTION, SELECT_RTX_SECTION, ASM_OPEN_PAREN,
ASM_CLOSE_PAREN, EASY_DIV_EXPR): Delete.
(NOTICE_UPDATE_CC): Cast to void.
* ip2k.md: Add defaults in switch statements.

From-SVN: r56809

gcc/ChangeLog
gcc/config/ip2k/ip2k-protos.h
gcc/config/ip2k/ip2k.c
gcc/config/ip2k/ip2k.h
gcc/config/ip2k/ip2k.md

index 914fdd408f50fc311ccd37eb04ef6471654b98c4..1ad470129b46fea481c44b8bcfe353929711c829 100644 (file)
@@ -1,3 +1,15 @@
+2002-09-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * ip2k-protos.h (function_prologue, function_epilogue,
+       encode_section_info): Update to match target hook specification.
+       * ip2k.c: Wrap `MDR' code in IP2K_MD_REORG_PASS.
+       (function_prologue, function_epilogue, encode_section_info):
+       Update to match target hook specification.
+       * ip2k.h (SELECT_SECTION, SELECT_RTX_SECTION, ASM_OPEN_PAREN,
+       ASM_CLOSE_PAREN, EASY_DIV_EXPR): Delete.
+       (NOTICE_UPDATE_CC): Cast to void.
+       * ip2k.md: Add defaults in switch statements.
+
 2002-09-04  Janis Johnson  <janis187@us.ibm.com>
 
        * doc/trouble.texi (Interoperation): Update information about C++ ABI
index 3d9c16793677b982ac95a1798c6faae419ca42ea..2ec040007a1e76f8ba5ff1dc165db2415826d129 100644 (file)
 extern void asm_file_start PARAMS ((FILE *));
 extern void asm_file_end PARAMS ((FILE *));
 
-extern void function_prologue PARAMS ((FILE *, int));
-extern void function_epilogue PARAMS ((FILE *, int));
+extern void function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
+extern void function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 extern int find_one_set_bit_p PARAMS ((HOST_WIDE_INT));
 extern int find_one_clear_bit_p PARAMS ((HOST_WIDE_INT));
 
 #ifdef TREE_CODE
 extern void unique_section PARAMS ((tree, int));
-extern void encode_section_info PARAMS ((tree));
+extern void encode_section_info PARAMS ((tree, int));
 extern void asm_output_section_name PARAMS ((FILE *, tree, const char *,
                                             int));
 extern int valid_machine_type_attribute PARAMS ((tree, tree, tree, tree));
index f4c9daf5fff08c99c32184dd2c689b53e2fd3dcf..6d715289e3e9c6036c29bdc479d16ab97bc0a47a 100644 (file)
@@ -52,6 +52,7 @@
 #define CHAIN_FRAMES (frame_pointer_needed || FRAME_POINTER_REQUIRED)
 
 static int ip2k_naked_function_p PARAMS ((tree));
+#ifdef IP2K_MD_REORG_PASS
 static void mdr_resequence_xy_yx PARAMS ((rtx));
 static void mdr_pres_replace_and_recurse PARAMS ((rtx, rtx, rtx));
 static void mdr_propagate_reg_equivs_sequence PARAMS ((rtx, rtx, rtx));
@@ -59,10 +60,7 @@ static void mdr_propagate_reg_equivs PARAMS ((rtx));
 static int track_dp_reload PARAMS ((rtx , rtx *, int , int));
 static void mdr_try_dp_reload_elim PARAMS ((rtx));
 static void mdr_try_move_dp_reload PARAMS ((rtx));
-static int ip2k_check_can_adjust_stack_ref PARAMS ((rtx, int));
-static void ip2k_adjust_stack_ref PARAMS ((rtx *, int));
 static void mdr_try_move_pushes PARAMS ((rtx));
-static int ip2k_xexp_not_uses_reg_for_mem PARAMS ((rtx, unsigned int));
 static void mdr_try_propagate_clr_sequence PARAMS ((rtx, unsigned int));
 static void mdr_try_propagate_clr PARAMS ((rtx));
 static void mdr_try_propagate_move_sequence PARAMS ((rtx, rtx, rtx));
@@ -70,6 +68,10 @@ static void mdr_try_propagate_move PARAMS ((rtx));
 static void mdr_try_remove_redundant_insns PARAMS ((rtx));
 static int track_w_reload PARAMS ((rtx, rtx *, int , int));
 static void mdr_try_wreg_elim PARAMS ((rtx));
+#endif /* IP2K_MD_REORG_PASS */
+static int ip2k_check_can_adjust_stack_ref PARAMS ((rtx, int));
+static void ip2k_adjust_stack_ref PARAMS ((rtx *, int));
+static int ip2k_xexp_not_uses_reg_for_mem PARAMS ((rtx, unsigned int));
 
 
 /* Initialize the GCC target structure.  */
@@ -175,7 +177,7 @@ ip2k_naked_function_p (func)
 void
 function_prologue (file, size)
      FILE *file;
-     int size;
+     HOST_WIDE_INT size;
 {
   int leaf_func_p;
   int main_p;
@@ -297,7 +299,7 @@ function_prologue (file, size)
 void
 function_epilogue (file, size)
      FILE *file;
-     int size;
+     HOST_WIDE_INT size;
 {
   int leaf_func_p;
   int reg,savelimit;
@@ -3178,8 +3180,9 @@ valid_machine_decl_attribute (decl, attributes, attr, args)
 /* Encode section information about tree DECL.  */
   
 void
-encode_section_info (decl)
+encode_section_info (decl, first)
      tree decl;
+     int first ATTRIBUTE_UNUSED;
 {
   if (! DECL_P (decl))
     return;
@@ -3366,6 +3369,7 @@ ip2k_address_cost (x)
    much cheaper and the move from this to the original source operand will be
    no more expensive than the original move.  */
 
+#ifdef IP2K_MD_REORG_PASS
 static void
 mdr_resequence_xy_yx (first_insn)
      rtx first_insn;
@@ -4111,6 +4115,7 @@ mdr_try_move_dp_reload (first_insn)
        }
     }
 }
+#endif /* IP2K_MD_REORG_PASS */
 
 /* Look to see if the expression, x, can have any stack references offset by
    a fixed constant, offset.  If it definitely can then returns non-zero.  */
@@ -4204,6 +4209,7 @@ ip2k_adjust_stack_ref (x, offset)
     }
 }
 
+#ifdef IP2K_MD_REORG_PASS
 /* As part of the machine-dependent reorg we look to move push instructions
    to earlier points within the file.  Moving these out of the way allows more
    peepholes to match.  */
@@ -4647,6 +4653,7 @@ mdr_try_propagate_clr (first_insn)
        }
     }
 }
+#endif /* IP2K_MD_REORG_PASS */
 
 /* Look to see if the expression, x, does not make any memory references
    via the specified register.  This is very conservative and only returns
@@ -4704,6 +4711,7 @@ ip2k_xexp_not_uses_reg_for_mem (x, regno)
     }
 }
 
+#ifdef IP2K_MD_REORG_PASS
 /* Assist the following function, mdr_try_propagate_move().  */
 
 static void
@@ -5260,6 +5268,7 @@ mdr_try_wreg_elim (first_insn)
 
   free (ip2k_we_jump_targets);
 }
+#endif /* IP2K_MD_REORG_PASS */
 
 /* We perform a lot of untangling of the RTL within the reorg pass since
    the IP2k requires some really bizarre (and really undesireable) things
@@ -5269,9 +5278,11 @@ mdr_try_wreg_elim (first_insn)
 
 void
 machine_dependent_reorg (first_insn)
-     rtx first_insn;
+     rtx first_insn ATTRIBUTE_UNUSED;
 {
+#ifdef IP2K_MD_REORG_PASS
   rtx insn, set;
+#endif
 
   CC_STATUS_INIT;
 
index bff715f5f37c53676d4ed26a1979611a6b25dee2..cda748744d2602693f13efc05d3c556144d9179b 100644 (file)
@@ -1960,30 +1960,6 @@ do {                                                                     \
    operation to identify the following data as writable initialized
    data.  Normally `".data"' is right.  */
 
-
-#undef SELECT_SECTION          /* Hide default.  */
-#define SELECT_SECTION(EXP,RELOC)      data_section ()
-/* `SELECT_SECTION (EXP, RELOC)'
-   A C statement or statements to switch to the appropriate section
-   for output of EXP.  You can assume that EXP is either a `VAR_DECL'
-   node or a constant of some sort.  RELOC indicates whether the
-   initial value of EXP requires link-time relocations.  Select the
-   section by calling `text_section' or one of the alternatives for
-   other sections.
-
-   Do not define this macro if you put all read-only variables and
-   constants in the read-only data section (usually the text section).  */
-
-/* `SELECT_RTX_SECTION (MODE, RTX)'
-   A C statement or statements to switch to the appropriate section
-   for output of RTX in mode MODE.  You can assume that RTX is some
-   kind of constant in RTL.  The argument MODE is redundant except in
-   the case of a `const_int' rtx.  Select the section by calling
-   `text_section' or one of the alternatives for other sections.
-
-   Do not define this macro if you put all constants in the read-only
-   data section.  */
-
 #define JUMP_TABLES_IN_TEXT_SECTION 1
 /* Define this macro if jump tables (for `tablejump' insns) should be
    output in the text section, along with the assembler instructions.
@@ -2073,18 +2049,6 @@ do {                                                                     \
    If you do not define this macro, the default is that only the
    character `;' is treated as a logical line separator.  */
 
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-/* These macros are defined as C string constant, describing the
-   syntax in the assembler for grouping arithmetic expressions.  The
-   following definitions are correct for most assemblers:
-
-   #define ASM_OPEN_PAREN "("
-   #define ASM_CLOSE_PAREN ")"
-
-   These macros are provided by `real.h' for writing the definitions of
-   `ASM_OUTPUT_DOUBLE' and the like:  */
-
 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
 do {                                                   \
      fputs ("\t.comm ", (STREAM));                     \
@@ -2335,15 +2299,6 @@ do {                                                     \
    register.  Most RISC machines have this property and most CISC
    machines do not.  */
 
-#define EASY_DIV_EXPR TRUNC_DIV_EXPR
-/* An alias for a tree code that is the easiest kind of division to
-   compile code for in the general case.  It may be `TRUNC_DIV_EXPR',
-   `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four
-   division operators differ in how they round the result to an
-   integer.  `EASY_DIV_EXPR' is used when it is permissible to use
-   any of those kinds of division and the choice should be made on
-   the basis of efficiency.  */
-
 #define MOVE_MAX 1
 /* The maximum number of bytes that a single instruction can move
    quickly between memory and registers or between two memory
@@ -2472,7 +2427,7 @@ extern int ip2k_reorg_merge_qimode;
    after execution of an instruction whose pattern is EXP.
    Do not alter them if the instruction would not alter the cc's.  */
 
-#define NOTICE_UPDATE_CC(EXP, INSN) (0)
+#define NOTICE_UPDATE_CC(EXP, INSN) (void)(0)
 
 /* Output assembler code to FILE to increment profiler label # LABELNO
    for profiling a function entry.  */
index 6b52802bcb24db6826b26f18756ef2e49d44032a..cc64a43f2b993ed4c0c2ff92cf004e74c38f71c7 100644 (file)
         if (!find_regno_note (insn, REG_DEAD, REG_IP))
          OUT_AS1 (dec, ipl);
        return \"\";
+      default:
+        abort ();
       }
   }")
 
         if (!find_regno_note (insn, REG_DEAD, REG_IP))
          OUT_AS1 (dec, ipl);
        return \"\";
+      default:
+        abort ();
       }
   }")
 
               OUT_AS2 (sub, ipl, w);
          }
         return \"\";
+      default:
+        abort ();
       }
   }")
 
               AS2 (mov, %L0, w) CR_TAB
               AS1 (pop, %H2%>) CR_TAB
               AS2 (mov, %L2, w);
+      default:
+        abort ();
       }
   }")
 
               AS1 (pop, %B2%>) CR_TAB
               AS1 (pop, %C2%>) CR_TAB
               AS2 (mov, %D2, w);
-      }
+      default:
+        abort ();
+     }
   }")
 
 ;; We have to be *very* careful with this one to use predicates that do not 
          p += sprintf (p, \"\;and\\tw,#$%2.2x\;or\\t%%0,w\", mask);
          return buff;
         }
+      default:
+        abort ();
       }
   }"
   [(set_attr "skip" "yes,yes,no,no,no,no,no")
               AS2 (mov, w, %H1) CR_TAB
               AS2 (addc, 1(SP), w);
       }
+    default:
+      abort ();
     }
   }"
   [(set_attr "clobberw" "no,yes,yes,yes,yes,yes,yes,yes")])
             AS2 (mov, %A0, w) CR_TAB
             AS2 (mov, w, %A2) CR_TAB
             AS2 (subc, %A0, w);
+    default:
+      abort ();
     }
   }")
 
             AS2 (mov, %S0, w) CR_TAB
             AS2 (mov, w, %S2) CR_TAB
             AS2 (subc, %S0, w);
+    default:
+      abort ();
     }
   }")
 
               AS1 (page, 1b) CR_TAB
               AS1 (jmp, 1b);
       }
+    default:
+      abort ();
     }
   }")
 
               AS1 (page, 1b) CR_TAB
               AS1 (jmp, 1b);
       }
+    default:
+      abort ();
     }
   }")
 
                       AS2 (mulu, w, %e2) CR_TAB
               AS2 (mov, w, mulh) CR_TAB
               AS2 (mov, %0, w);
+      default:
+        abort ();
       }
   }")
 
               AS1 (page, 1b) CR_TAB
               AS1 (jmp, 1b);
       }
+    default:
+      abort ();
     }
   }")
 
               AS2 (mov, %L0, w) CR_TAB
               AS2 (mov, w, %H1) CR_TAB
               AS2 (mov, %H0, w);
+      default:
+        abort ();
       }
   }")
 
         OUT_AS2 (mov, w, %1);
        OUT_AS2 (add, w, %5);
        break;
+      default:
+        abort ();
       }
 
     OUT_AS2 (cmp, w, %2);
        OUT_AS1 (page, __indcall);
        OUT_AS1 (jmp, __indcall%>%>);
        return \"\";
+      default:
+        abort ();
       }
   }")
 
           OUT_AS1 (sz, );
         return AS1 (page, %2) CR_TAB
                AS1 (jmp, %2);
+      default:
+        abort ();
       }
   }")
 
           OUT_AS1 (sz, );
         return AS1 (page, %2) CR_TAB
                AS1 (jmp, %2);
+      default:
+        abort ();
       }
   }")