This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use const_rtx in GCC sources


This patch uses the "const_rtx" typedef in GCC sources, and therefore
depends on the previous patch posted here:
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00383.html

Tested on sparc-sun-solaris2.10 with --enable-checking=yes,rtl, no
regressions.

Preapproved by Mark but awaiting stage2.

		--Kaveh



2006-07-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* cfglayout.c (insn_scope, insn_line): Constify.
	* print-rtl.c (print_rtx, print_inline_rtx, debug_rtx,
	debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl,
	print_rtl_single, print_simple_rtl): Likewise.
	* rtl-error.c (location_for_asm, diagnostic_for_asm,
	error_for_asm, warning_for_asm, _fatal_insn,
	_fatal_insn_not_found): Likewise.
	* rtl-factoring.c (const_p_hash_bucket, const_p_hash_elem): New.
	(gen_symbol_ref_rtx_for_label, htab_hash_bucket, htab_hash_elem):
	Constify.

	* rtl.c (rtx_size, shallow_copy_rtx_stat, rtx_equal_p,
	rtl_check_failed_bounds, rtl_check_failed_type1,
	rtl_check_failed_type2, rtl_check_failed_code1,
	rtl_check_failed_code2, rtl_check_failed_code_mode,
	rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise.

	* rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
	rtl_check_failed_type2, rtl_check_failed_code1,
	rtl_check_failed_code2, rtl_check_failed_code_mode,
	rtvec_check_failed_bounds, rtl_check_failed_flag, subreg_lsb,
	subreg_regno, rtx_size, shallow_copy_rtx_stat, insn_line,
	insn_file, simplify_replace_rtx, mode_signbit_p,
	rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p,
	get_integer_term, get_related_value, reg_mentioned_p,
	count_occurrences, reg_referenced_p, reg_used_between_p,
	no_labels_between_p, single_set_2, multiple_sets, set_noop_p,
	noop_move_p, refers_to_regno_p, reg_overlap_mentioned_p,
	dead_or_set_p, dead_or_set_regno_p, find_reg_note,
	find_regno_note, find_reg_equal_equiv_note, find_reg_fusage,
	find_regno_fusage, pure_call_p, remove_note, side_effects_p,
	volatile_refs_p, volatile_insn_p, may_trap_p,
	may_trap_after_code_motion_p, may_trap_or_fault_p,
	inequality_comparisons_p, tablejump_p, computed_jump_p,
	auto_inc_p, in_expr_list_p, remove_node_from_expr_list,
	loc_mentioned_in_p, label_is_jump_target_p, insn_rtx_cost,
	debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find,
	print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx):
	Likewise.

	* rtlanal.c (covers_regno_p, covers_regno_no_parallel_p,
	computed_jump_p_1, rtx_unstable_p, rtx_addr_can_trap_p_1,
	rtx_addr_can_trap_p, nonzero_address_p, get_integer_term,
	get_related_value, count_occurrences, reg_mentioned_p,
	no_labels_between_p, reg_used_between_p, reg_referenced_p,
	single_set_2, multiple_sets, set_noop_p, noop_move_p,
	refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p,
	dead_or_set_regno_p, find_reg_note, find_regno_note,
	find_reg_equal_equiv_note, find_reg_fusage, find_regno_fusage,
	pure_call_p, remove_note, in_expr_list_p,
	remove_node_from_expr_list, volatile_insn_p, volatile_refs_p,
	side_effects_p, may_trap_p_1, may_trap_p,
	may_trap_after_code_motion_p, may_trap_or_fault_p,
	inequality_comparisons_p, tablejump_p, computed_jump_p,
	auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno,
	label_is_jump_target_p, insn_rtx_cost): Likewise.

	* simplify-rtx.c (neg_const_int, plus_minus_operand_p,
	mode_signbit_p, simplify_replace_rtx): Likewise.
	* toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm,
	warning_for_asm): Likewise.
	* tree.h (print_rtl): Likewise.
	
diff -rup orig/egcc-SVN20060718/gcc/cfglayout.c egcc-SVN20060718/gcc/cfglayout.c
--- orig/egcc-SVN20060718/gcc/cfglayout.c	2006-05-18 20:01:10.000000000 -0400
+++ egcc-SVN20060718/gcc/cfglayout.c	2006-07-19 20:34:10.251411916 -0400
@@ -52,7 +52,7 @@ static void change_scope (rtx, tree, tre
 
 void verify_insn_chain (void);
 static void fixup_fallthru_exit_predecessor (void);
-static tree insn_scope (rtx);
+static tree insn_scope (const_rtx);
 
 rtx
 unlink_insn_chain (rtx first, rtx last)
@@ -419,7 +419,7 @@ change_scope (rtx orig_insn, tree s1, tr
 
 /* Return lexical scope block insn belong to.  */
 static tree
-insn_scope (rtx insn)
+insn_scope (const_rtx insn)
 {
   int max = VEC_length (int, block_locators_locs);
   int min = 0;
@@ -486,7 +486,7 @@ locator_line (int loc)
 
 /* Return line number of the statement that produced this insn.  */
 int
-insn_line (rtx insn)
+insn_line (const_rtx insn)
 {
   return locator_line (INSN_LOCATOR (insn));
 }
@@ -520,7 +520,7 @@ locator_file (int loc)
 
 /* Return source file of the statement that produced this insn.  */
 const char *
-insn_file (rtx insn)
+insn_file (const_rtx insn)
 {
   return locator_file (INSN_LOCATOR (insn));
 }
diff -rup orig/egcc-SVN20060718/gcc/print-rtl.c egcc-SVN20060718/gcc/print-rtl.c
--- orig/egcc-SVN20060718/gcc/print-rtl.c	2006-07-17 20:02:10.000000000 -0400
+++ egcc-SVN20060718/gcc/print-rtl.c	2006-07-19 19:55:58.163555748 -0400
@@ -49,7 +49,7 @@ static int sawclose = 0;
 
 static int indent;
 
-static void print_rtx (rtx);
+static void print_rtx (const_rtx);
 
 /* String printed at beginning of each RTL when it is dumped.
    This string is set to ASM_COMMENT_START when the RTL is dumped in
@@ -128,7 +128,7 @@ print_mem_expr (FILE *outfile, tree expr
 /* Print IN_RTX onto OUTFILE.  This is the recursive part of printing.  */
 
 static void
-print_rtx (rtx in_rtx)
+print_rtx (const_rtx in_rtx)
 {
   int i = 0;
   int j;
@@ -627,7 +627,7 @@ print_rtx (rtx in_rtx)
    characters.  */
 
 void
-print_inline_rtx (FILE *outf, rtx x, int ind)
+print_inline_rtx (FILE *outf, const_rtx x, int ind)
 {
   int oldsaw = sawclose;
   int oldindent = indent;
@@ -643,7 +643,7 @@ print_inline_rtx (FILE *outf, rtx x, int
 /* Call this function from the debugger to see what X looks like.  */
 
 void
-debug_rtx (rtx x)
+debug_rtx (const_rtx x)
 {
   outfile = stderr;
   sawclose = 0;
@@ -663,10 +663,10 @@ int debug_rtx_count = 0;	/* 0 is treated
    EG: -5 prints 2 rtx's on either side (in addition to the specified rtx).  */
 
 void
-debug_rtx_list (rtx x, int n)
+debug_rtx_list (const_rtx x, int n)
 {
   int i,count;
-  rtx insn;
+  const_rtx insn;
 
   count = n == 0 ? 1 : n < 0 ? -n : n;
 
@@ -690,7 +690,7 @@ debug_rtx_list (rtx x, int n)
 /* Call this function to print an rtx list from START to END inclusive.  */
 
 void
-debug_rtx_range (rtx start, rtx end)
+debug_rtx_range (const_rtx start, const_rtx end)
 {
   while (1)
     {
@@ -706,8 +706,8 @@ debug_rtx_range (rtx start, rtx end)
    and then call debug_rtx_list to print it, using DEBUG_RTX_COUNT.
    The found insn is returned to enable further debugging analysis.  */
 
-rtx
-debug_rtx_find (rtx x, int uid)
+const_rtx
+debug_rtx_find (const_rtx x, int uid)
 {
   while (x != 0 && INSN_UID (x) != uid)
     x = NEXT_INSN (x);
@@ -730,9 +730,9 @@ debug_rtx_find (rtx x, int uid)
    If RTX_FIRST is not an insn, then it alone is printed, with no newline.  */
 
 void
-print_rtl (FILE *outf, rtx rtx_first)
+print_rtl (FILE *outf, const_rtx rtx_first)
 {
-  rtx tmp_rtx;
+  const_rtx tmp_rtx;
 
   outfile = outf;
   sawclose = 0;
@@ -771,7 +771,7 @@ print_rtl (FILE *outf, rtx rtx_first)
 /* Return nonzero if we actually printed anything.  */
 
 int
-print_rtl_single (FILE *outf, rtx x)
+print_rtl_single (FILE *outf, const_rtx x)
 {
   outfile = outf;
   sawclose = 0;
@@ -791,7 +791,7 @@ print_rtl_single (FILE *outf, rtx x)
    if RTX is a CONST_INT then print in decimal format.  */
 
 void
-print_simple_rtl (FILE *outf, rtx x)
+print_simple_rtl (FILE *outf, const_rtx x)
 {
   flag_simple = 1;
   print_rtl (outf, x);
diff -rup orig/egcc-SVN20060718/gcc/rtl-error.c egcc-SVN20060718/gcc/rtl-error.c
--- orig/egcc-SVN20060718/gcc/rtl-error.c	2006-01-23 00:23:56.000000000 -0500
+++ egcc-SVN20060718/gcc/rtl-error.c	2006-07-19 19:55:58.166410912 -0400
@@ -33,12 +33,12 @@ Boston, MA 02110-1301, USA.  */
 #include "intl.h"
 #include "diagnostic.h"
 
-static location_t location_for_asm (rtx);
-static void diagnostic_for_asm (rtx, const char *, va_list *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
+static location_t location_for_asm (const_rtx);
+static void diagnostic_for_asm (const_rtx, const char *, va_list *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
 
 /* Figure the location of the given INSN.  */
 static location_t
-location_for_asm (rtx insn)
+location_for_asm (const_rtx insn)
 {
   rtx body = PATTERN (insn);
   rtx asmop;
@@ -76,7 +76,7 @@ location_for_asm (rtx insn)
    of the insn INSN.  This is used only when INSN is an `asm' with operands,
    and each ASM_OPERANDS records its own source file and line.  */
 static void
-diagnostic_for_asm (rtx insn, const char *msg, va_list *args_ptr,
+diagnostic_for_asm (const_rtx insn, const char *msg, va_list *args_ptr,
 		    diagnostic_t kind)
 {
   diagnostic_info diagnostic;
@@ -87,7 +87,7 @@ diagnostic_for_asm (rtx insn, const char
 }
 
 void
-error_for_asm (rtx insn, const char *gmsgid, ...)
+error_for_asm (const_rtx insn, const char *gmsgid, ...)
 {
   va_list ap;
 
@@ -97,7 +97,7 @@ error_for_asm (rtx insn, const char *gms
 }
 
 void
-warning_for_asm (rtx insn, const char *gmsgid, ...)
+warning_for_asm (const_rtx insn, const char *gmsgid, ...)
 {
   va_list ap;
 
@@ -107,8 +107,8 @@ warning_for_asm (rtx insn, const char *g
 }
 
 void
-_fatal_insn (const char *msgid, rtx insn, const char *file, int line,
-	     const char *function)
+_fatal_insn (const char *msgid, const_rtx insn, const char *file,
+	     int line, const char *function)
 {
   error ("%s", _(msgid));
 
@@ -121,7 +121,7 @@ _fatal_insn (const char *msgid, rtx insn
 }
 
 void
-_fatal_insn_not_found (rtx insn, const char *file, int line,
+_fatal_insn_not_found (const_rtx insn, const char *file, int line,
 		       const char *function)
 {
   if (INSN_CODE (insn) < 0)
diff -rup orig/egcc-SVN20060718/gcc/rtl-factoring.c egcc-SVN20060718/gcc/rtl-factoring.c
--- orig/egcc-SVN20060718/gcc/rtl-factoring.c	2006-03-21 20:02:04.000000000 -0500
+++ egcc-SVN20060718/gcc/rtl-factoring.c	2006-07-19 19:55:58.169384878 -0400
@@ -237,6 +237,7 @@ typedef struct hash_bucket_def
   /* List of sequence candidates.  */
   htab_t seq_candidates;
 } *p_hash_bucket;
+typedef const struct hash_bucket_def *const_p_hash_bucket;
 
 /* Contains the last insn of the sequence, and its index value.  */
 typedef struct hash_elem_def
@@ -250,6 +251,7 @@ typedef struct hash_elem_def
   /* The cached length of the insn.  */
   int length;
 } *p_hash_elem;
+typedef const struct hash_elem_def* const_p_hash_elem;
 
 /* The list of same sequence candidates.  */
 static htab_t hash_buckets;
@@ -933,7 +935,7 @@ determine_seq_blocks (void)
 /* Builds a symbol_ref for LABEL.  */
 
 static rtx
-gen_symbol_ref_rtx_for_label (rtx label)
+gen_symbol_ref_rtx_for_label (const_rtx label)
 {
   char name[20];
   rtx sym;
@@ -1202,7 +1204,7 @@ dump_best_pattern_seq (int iter)
 static unsigned int
 htab_hash_bucket (const void *p)
 {
-  p_hash_bucket bucket = (p_hash_bucket) p;
+  const_p_hash_bucket bucket = (const_p_hash_bucket) p;
   return bucket->hash;
 }
 
@@ -1232,7 +1234,7 @@ htab_del_bucket (void *p)
 static unsigned int
 htab_hash_elem (const void *p)
 {
-  p_hash_elem elem = (p_hash_elem) p;
+  const_p_hash_elem elem = (const_p_hash_elem) p;
   return htab_hash_pointer (elem->insn);
 }
 
diff -rup orig/egcc-SVN20060718/gcc/rtl.c egcc-SVN20060718/gcc/rtl.c
--- orig/egcc-SVN20060718/gcc/rtl.c	2006-07-07 20:01:41.000000000 -0400
+++ egcc-SVN20060718/gcc/rtl.c	2006-07-19 19:55:58.171743794 -0400
@@ -173,7 +173,7 @@ rtvec_alloc (int n)
 /* Return the number of bytes occupied by rtx value X.  */
 
 unsigned int
-rtx_size (rtx x)
+rtx_size (const_rtx x)
 {
   if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_HAS_BLOCK_INFO_P (x))
     return RTX_HDR_SIZE + sizeof (struct block_symbol);
@@ -313,7 +313,7 @@ copy_rtx (rtx orig)
 /* Create a new copy of an rtx.  Only copy just one level.  */
 
 rtx
-shallow_copy_rtx_stat (rtx orig MEM_STAT_DECL)
+shallow_copy_rtx_stat (const_rtx orig MEM_STAT_DECL)
 {
   unsigned int size;
   rtx copy;
@@ -335,7 +335,7 @@ int currently_expanding_to_rtl;
    This is the Lisp function EQUAL for rtx arguments.  */
 
 int
-rtx_equal_p (rtx x, rtx y)
+rtx_equal_p (const_rtx x, const_rtx y)
 {
   int i;
   int j;
@@ -474,7 +474,7 @@ dump_rtx_statistics (void)
 
 #if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
 void
-rtl_check_failed_bounds (rtx r, int n, const char *file, int line,
+rtl_check_failed_bounds (const_rtx r, int n, const char *file, int line,
 			 const char *func)
 {
   internal_error
@@ -484,7 +484,7 @@ rtl_check_failed_bounds (rtx r, int n, c
 }
 
 void
-rtl_check_failed_type1 (rtx r, int n, int c1, const char *file, int line,
+rtl_check_failed_type1 (const_rtx r, int n, int c1, const char *file, int line,
 			const char *func)
 {
   internal_error
@@ -494,7 +494,7 @@ rtl_check_failed_type1 (rtx r, int n, in
 }
 
 void
-rtl_check_failed_type2 (rtx r, int n, int c1, int c2, const char *file,
+rtl_check_failed_type2 (const_rtx r, int n, int c1, int c2, const char *file,
 			int line, const char *func)
 {
   internal_error
@@ -504,7 +504,7 @@ rtl_check_failed_type2 (rtx r, int n, in
 }
 
 void
-rtl_check_failed_code1 (rtx r, enum rtx_code code, const char *file,
+rtl_check_failed_code1 (const_rtx r, enum rtx_code code, const char *file,
 			int line, const char *func)
 {
   internal_error ("RTL check: expected code '%s', have '%s' in %s, at %s:%d",
@@ -513,7 +513,7 @@ rtl_check_failed_code1 (rtx r, enum rtx_
 }
 
 void
-rtl_check_failed_code2 (rtx r, enum rtx_code code1, enum rtx_code code2,
+rtl_check_failed_code2 (const_rtx r, enum rtx_code code1, enum rtx_code code2,
 			const char *file, int line, const char *func)
 {
   internal_error
@@ -523,7 +523,7 @@ rtl_check_failed_code2 (rtx r, enum rtx_
 }
 
 void
-rtl_check_failed_code_mode (rtx r, enum rtx_code code, enum machine_mode mode,
+rtl_check_failed_code_mode (const_rtx r, enum rtx_code code, enum machine_mode mode,
 			    bool not_mode, const char *file, int line,
 			    const char *func)
 {
@@ -550,7 +550,7 @@ rtl_check_failed_block_symbol (const cha
 
 /* XXX Maybe print the vector?  */
 void
-rtvec_check_failed_bounds (rtvec r, int n, const char *file, int line,
+rtvec_check_failed_bounds (const_rtvec r, int n, const char *file, int line,
 			   const char *func)
 {
   internal_error
@@ -561,7 +561,7 @@ rtvec_check_failed_bounds (rtvec r, int 
 
 #if defined ENABLE_RTL_FLAG_CHECKING
 void
-rtl_check_failed_flag (const char *name, rtx r, const char *file,
+rtl_check_failed_flag (const char *name, const_rtx r, const char *file,
 		       int line, const char *func)
 {
   internal_error
diff -rup orig/egcc-SVN20060718/gcc/rtl.h egcc-SVN20060718/gcc/rtl.h
--- orig/egcc-SVN20060718/gcc/rtl.h	2006-07-19 19:55:42.206966421 -0400
+++ egcc-SVN20060718/gcc/rtl.h	2006-07-19 20:47:16.189773475 -0400
@@ -537,27 +537,27 @@ struct rtvec_def GTY(()) {
 				    __FUNCTION__);			\
    &_symbol->u.block_sym; })
 
-extern void rtl_check_failed_bounds (rtx, int, const char *, int,
+extern void rtl_check_failed_bounds (const_rtx, int, const char *, int,
 				     const char *)
     ATTRIBUTE_NORETURN;
-extern void rtl_check_failed_type1 (rtx, int, int, const char *, int,
+extern void rtl_check_failed_type1 (const_rtx, int, int, const char *, int,
 				    const char *)
     ATTRIBUTE_NORETURN;
-extern void rtl_check_failed_type2 (rtx, int, int, int, const char *,
+extern void rtl_check_failed_type2 (const_rtx, int, int, int, const char *,
 				    int, const char *)
     ATTRIBUTE_NORETURN;
-extern void rtl_check_failed_code1 (rtx, enum rtx_code, const char *,
+extern void rtl_check_failed_code1 (const_rtx, enum rtx_code, const char *,
 				    int, const char *)
     ATTRIBUTE_NORETURN;
-extern void rtl_check_failed_code2 (rtx, enum rtx_code, enum rtx_code,
+extern void rtl_check_failed_code2 (const_rtx, enum rtx_code, enum rtx_code,
 				    const char *, int, const char *)
     ATTRIBUTE_NORETURN;
-extern void rtl_check_failed_code_mode (rtx, enum rtx_code, enum machine_mode,
+extern void rtl_check_failed_code_mode (const_rtx, enum rtx_code, enum machine_mode,
 					bool, const char *, int, const char *)
     ATTRIBUTE_NORETURN;
 extern void rtl_check_failed_block_symbol (const char *, int, const char *)
     ATTRIBUTE_NORETURN;
-extern void rtvec_check_failed_bounds (rtvec, int, const char *, int,
+extern void rtvec_check_failed_bounds (const_rtvec, int, const char *, int,
 				       const char *)
     ATTRIBUTE_NORETURN;
 
@@ -654,7 +654,7 @@ extern void rtvec_check_failed_bounds (r
 			     __FUNCTION__);				\
    _rtx; })
 
-extern void rtl_check_failed_flag (const char *, rtx, const char *,
+extern void rtl_check_failed_flag (const char *, const_rtx, const char *,
 				   int, const char *)
     ATTRIBUTE_NORETURN
     ;
@@ -1032,14 +1032,14 @@ enum label_kind
 extern void init_rtlanal (void);
 extern int rtx_cost (rtx, enum rtx_code);
 extern int address_cost (rtx, enum machine_mode);
-extern unsigned int subreg_lsb (rtx);
+extern unsigned int subreg_lsb (const_rtx);
 extern unsigned int subreg_lsb_1 (enum machine_mode, enum machine_mode,
 				  unsigned int);
 extern unsigned int subreg_regno_offset	(unsigned int, enum machine_mode,
 					 unsigned int, enum machine_mode);
 extern bool subreg_offset_representable_p (unsigned int, enum machine_mode,
 					   unsigned int, enum machine_mode);
-extern unsigned int subreg_regno (rtx);
+extern unsigned int subreg_regno (const_rtx);
 extern unsigned HOST_WIDE_INT nonzero_bits (rtx, enum machine_mode);
 extern unsigned int num_sign_bit_copies (rtx, enum machine_mode);
 extern bool constant_pool_constant_p (rtx);
@@ -1468,10 +1468,10 @@ extern void dump_rtx_statistics (void);
 extern rtx copy_rtx_if_shared (rtx);
 
 /* In rtl.c */
-extern unsigned int rtx_size (rtx);
-extern rtx shallow_copy_rtx_stat (rtx MEM_STAT_DECL);
+extern unsigned int rtx_size (const_rtx);
+extern rtx shallow_copy_rtx_stat (const_rtx MEM_STAT_DECL);
 #define shallow_copy_rtx(a) shallow_copy_rtx_stat (a MEM_STAT_INFO)
-extern int rtx_equal_p (rtx, rtx);
+extern int rtx_equal_p (const_rtx, const_rtx);
 
 /* In emit-rtl.c */
 extern rtvec gen_rtvec_v (int, rtx *);
@@ -1585,8 +1585,8 @@ extern rtx next_cc0_user (rtx);
 extern rtx prev_cc0_setter (rtx);
 
 /* In cfglayout.c  */
-extern int insn_line (rtx);
-extern const char * insn_file (rtx);
+extern int insn_line (const_rtx);
+extern const char * insn_file (const_rtx);
 extern int locator_line (int);
 extern const char * locator_file (int);
 extern int prologue_locator, epilogue_locator;
@@ -1644,11 +1644,11 @@ extern rtx simplify_subreg (enum machine
 			    unsigned int);
 extern rtx simplify_gen_subreg (enum machine_mode, rtx, enum machine_mode,
 				unsigned int);
-extern rtx simplify_replace_rtx (rtx, rtx, rtx);
+extern rtx simplify_replace_rtx (rtx, const_rtx, rtx);
 extern rtx simplify_rtx (rtx);
 extern rtx avoid_constant_pool_reference (rtx);
 extern bool constant_pool_reference_p (rtx x);
-extern bool mode_signbit_p (enum machine_mode, rtx);
+extern bool mode_signbit_p (enum machine_mode, const_rtx);
 
 /* In regclass.c  */
 extern enum machine_mode choose_hard_reg_mode (unsigned int, unsigned int,
@@ -1674,66 +1674,66 @@ typedef struct replace_label_data
   bool update_label_nuses;
 } replace_label_data;
 
-extern int rtx_addr_can_trap_p (rtx);
-extern bool nonzero_address_p (rtx);
-extern int rtx_unstable_p (rtx);
+extern int rtx_addr_can_trap_p (const_rtx);
+extern bool nonzero_address_p (const_rtx);
+extern int rtx_unstable_p (const_rtx);
 extern int rtx_varies_p (rtx, int);
 extern int rtx_addr_varies_p (rtx, int);
-extern HOST_WIDE_INT get_integer_term (rtx);
-extern rtx get_related_value (rtx);
-extern int reg_mentioned_p (rtx, rtx);
-extern int count_occurrences (rtx, rtx, int);
-extern int reg_referenced_p (rtx, rtx);
-extern int reg_used_between_p (rtx, rtx, rtx);
+extern HOST_WIDE_INT get_integer_term (const_rtx);
+extern rtx get_related_value (const_rtx);
+extern int reg_mentioned_p (const_rtx, const_rtx);
+extern int count_occurrences (const_rtx, const_rtx, int);
+extern int reg_referenced_p (const_rtx, const_rtx);
+extern int reg_used_between_p (const_rtx, const_rtx, const_rtx);
 extern int reg_set_between_p (rtx, rtx, rtx);
 extern int commutative_operand_precedence (rtx);
 extern int swap_commutative_operands_p (rtx, rtx);
 extern int modified_between_p (rtx, rtx, rtx);
-extern int no_labels_between_p (rtx, rtx);
+extern int no_labels_between_p (const_rtx, const_rtx);
 extern int modified_in_p (rtx, rtx);
 extern int reg_set_p (rtx, rtx);
-extern rtx single_set_2 (rtx, rtx);
-extern int multiple_sets (rtx);
-extern int set_noop_p (rtx);
-extern int noop_move_p (rtx);
+extern rtx single_set_2 (const_rtx, const_rtx);
+extern int multiple_sets (const_rtx);
+extern int set_noop_p (const_rtx);
+extern int noop_move_p (const_rtx);
 extern rtx find_last_value (rtx, rtx *, rtx, int);
-extern int refers_to_regno_p (unsigned int, unsigned int, rtx, rtx *);
-extern int reg_overlap_mentioned_p (rtx, rtx);
+extern int refers_to_regno_p (unsigned int, unsigned int, const_rtx, rtx *);
+extern int reg_overlap_mentioned_p (const_rtx, const_rtx);
 extern rtx set_of (rtx, rtx);
 extern void note_stores (rtx, void (*) (rtx, rtx, void *), void *);
 extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
-extern int dead_or_set_p (rtx, rtx);
-extern int dead_or_set_regno_p (rtx, unsigned int);
-extern rtx find_reg_note (rtx, enum reg_note, rtx);
-extern rtx find_regno_note (rtx, enum reg_note, unsigned int);
-extern rtx find_reg_equal_equiv_note (rtx);
-extern int find_reg_fusage (rtx, enum rtx_code, rtx);
-extern int find_regno_fusage (rtx, enum rtx_code, unsigned int);
-extern int pure_call_p (rtx);
-extern void remove_note (rtx, rtx);
-extern int side_effects_p (rtx);
-extern int volatile_refs_p (rtx);
-extern int volatile_insn_p (rtx);
-extern int may_trap_p (rtx);
-extern int may_trap_after_code_motion_p (rtx);
-extern int may_trap_or_fault_p (rtx);
-extern int inequality_comparisons_p (rtx);
+extern int dead_or_set_p (const_rtx, const_rtx);
+extern int dead_or_set_regno_p (const_rtx, unsigned int);
+extern rtx find_reg_note (const_rtx, enum reg_note, const_rtx);
+extern rtx find_regno_note (const_rtx, enum reg_note, unsigned int);
+extern rtx find_reg_equal_equiv_note (const_rtx);
+extern int find_reg_fusage (const_rtx, enum rtx_code, const_rtx);
+extern int find_regno_fusage (const_rtx, enum rtx_code, unsigned int);
+extern int pure_call_p (const_rtx);
+extern void remove_note (rtx, const_rtx);
+extern int side_effects_p (const_rtx);
+extern int volatile_refs_p (const_rtx);
+extern int volatile_insn_p (const_rtx);
+extern int may_trap_p (const_rtx);
+extern int may_trap_after_code_motion_p (const_rtx);
+extern int may_trap_or_fault_p (const_rtx);
+extern int inequality_comparisons_p (const_rtx);
 extern rtx replace_rtx (rtx, rtx, rtx);
 extern int replace_label (rtx *, void *);
 extern int rtx_referenced_p (rtx, rtx);
-extern bool tablejump_p (rtx, rtx *, rtx *);
-extern int computed_jump_p (rtx);
+extern bool tablejump_p (const_rtx, rtx *, rtx *);
+extern int computed_jump_p (const_rtx);
 typedef int (*rtx_function) (rtx *, void *);
 extern int for_each_rtx (rtx *, rtx_function, void *);
 extern rtx regno_use_in (unsigned int, rtx);
-extern int auto_inc_p (rtx);
-extern int in_expr_list_p (rtx, rtx);
-extern void remove_node_from_expr_list (rtx, rtx *);
-extern int loc_mentioned_in_p (rtx *, rtx);
+extern int auto_inc_p (const_rtx);
+extern int in_expr_list_p (const_rtx, const_rtx);
+extern void remove_node_from_expr_list (const_rtx, rtx *);
+extern int loc_mentioned_in_p (rtx *, const_rtx);
 extern rtx find_first_parameter_load (rtx, rtx);
 extern bool keep_with_call_p (rtx);
-extern bool label_is_jump_target_p (rtx, rtx);
-extern int insn_rtx_cost (rtx);
+extern bool label_is_jump_target_p (const_rtx, const_rtx);
+extern int insn_rtx_cost (const_rtx);
 
 /* Given an insn and condition, return a canonical description of
    the test being made.  */
@@ -2106,15 +2106,15 @@ extern void fix_sched_param (const char 
 
 /* In print-rtl.c */
 extern const char *print_rtx_head;
-extern void debug_rtx (rtx);
-extern void debug_rtx_list (rtx, int);
-extern void debug_rtx_range (rtx, rtx);
-extern rtx debug_rtx_find (rtx, int);
+extern void debug_rtx (const_rtx);
+extern void debug_rtx_list (const_rtx, int);
+extern void debug_rtx_range (const_rtx, const_rtx);
+extern const_rtx debug_rtx_find (const_rtx, int);
 extern void print_mem_expr (FILE *, tree);
-extern void print_rtl (FILE *, rtx);
-extern void print_simple_rtl (FILE *, rtx);
-extern int print_rtl_single (FILE *, rtx);
-extern void print_inline_rtx (FILE *, rtx, int);
+extern void print_rtl (FILE *, const_rtx);
+extern void print_simple_rtl (FILE *, const_rtx);
+extern int print_rtl_single (FILE *, const_rtx);
+extern void print_inline_rtx (FILE *, const_rtx, int);
 
 /* In bt-load.c */
 extern void branch_target_load_optimize (bool);
diff -rup orig/egcc-SVN20060718/gcc/rtlanal.c egcc-SVN20060718/gcc/rtlanal.c
--- orig/egcc-SVN20060718/gcc/rtlanal.c	2006-05-29 20:00:57.000000000 -0400
+++ egcc-SVN20060718/gcc/rtlanal.c	2006-07-19 20:47:25.780701459 -0400
@@ -40,10 +40,10 @@ Software Foundation, 51 Franklin Street,
 
 /* Forward declarations */
 static void set_of_1 (rtx, rtx, void *);
-static bool covers_regno_p (rtx, unsigned int);
-static bool covers_regno_no_parallel_p (rtx, unsigned int);
+static bool covers_regno_p (const_rtx, unsigned int);
+static bool covers_regno_no_parallel_p (const_rtx, unsigned int);
 static int rtx_referenced_p_1 (rtx *, void *);
-static int computed_jump_p_1 (rtx);
+static int computed_jump_p_1 (const_rtx);
 static void parms_set (rtx, rtx, void *);
 
 static unsigned HOST_WIDE_INT cached_nonzero_bits (rtx, enum machine_mode,
@@ -90,7 +90,7 @@ num_sign_bit_copies_in_rep[MAX_MODE_INT 
    (within one function) and so is anything marked `unchanging'.  */
 
 int
-rtx_unstable_p (rtx x)
+rtx_unstable_p (const_rtx x)
 {
   RTX_CODE code = GET_CODE (x);
   int i;
@@ -245,7 +245,7 @@ rtx_varies_p (rtx x, int for_alias)
    alignment machines.  */
 
 static int
-rtx_addr_can_trap_p_1 (rtx x, enum machine_mode mode, bool unaligned_mems)
+rtx_addr_can_trap_p_1 (const_rtx x, enum machine_mode mode, bool unaligned_mems)
 {
   enum rtx_code code = GET_CODE (x);
 
@@ -331,7 +331,7 @@ rtx_addr_can_trap_p_1 (rtx x, enum machi
 /* Return nonzero if the use of X as an address in a MEM can cause a trap.  */
 
 int
-rtx_addr_can_trap_p (rtx x)
+rtx_addr_can_trap_p (const_rtx x)
 {
   return rtx_addr_can_trap_p_1 (x, VOIDmode, false);
 }
@@ -339,7 +339,7 @@ rtx_addr_can_trap_p (rtx x)
 /* Return true if X is an address that is known to not be zero.  */
 
 bool
-nonzero_address_p (rtx x)
+nonzero_address_p (const_rtx x)
 {
   enum rtx_code code = GET_CODE (x);
 
@@ -458,7 +458,7 @@ rtx_addr_varies_p (rtx x, int for_alias)
    This is used in cse.c with the `related_value' field.  */
 
 HOST_WIDE_INT
-get_integer_term (rtx x)
+get_integer_term (const_rtx x)
 {
   if (GET_CODE (x) == CONST)
     x = XEXP (x, 0);
@@ -477,7 +477,7 @@ get_integer_term (rtx x)
    Only obvious integer terms are detected.  */
 
 rtx
-get_related_value (rtx x)
+get_related_value (const_rtx x)
 {
   if (GET_CODE (x) != CONST)
     return 0;
@@ -495,7 +495,7 @@ get_related_value (rtx x)
    zero, we do not count occurrences inside the destination of a SET.  */
 
 int
-count_occurrences (rtx x, rtx find, int count_dest)
+count_occurrences (const_rtx x, const_rtx find, int count_dest)
 {
   int i, j;
   enum rtx_code code;
@@ -558,7 +558,7 @@ count_occurrences (rtx x, rtx find, int 
    for a subexpression of IN that is Lisp "equal" to REG.  */
 
 int
-reg_mentioned_p (rtx reg, rtx in)
+reg_mentioned_p (const_rtx reg, const_rtx in)
 {
   const char *fmt;
   int i;
@@ -623,7 +623,7 @@ reg_mentioned_p (rtx reg, rtx in)
    no CODE_LABEL insn.  */
 
 int
-no_labels_between_p (rtx beg, rtx end)
+no_labels_between_p (const_rtx beg, const_rtx end)
 {
   rtx p;
   if (beg == end)
@@ -638,7 +638,7 @@ no_labels_between_p (rtx beg, rtx end)
    FROM_INSN and TO_INSN (exclusive of those two).  */
 
 int
-reg_used_between_p (rtx reg, rtx from_insn, rtx to_insn)
+reg_used_between_p (const_rtx reg, const_rtx from_insn, const_rtx to_insn)
 {
   rtx insn;
 
@@ -658,7 +658,7 @@ reg_used_between_p (rtx reg, rtx from_in
    we do not consider it a reference.  */
 
 int
-reg_referenced_p (rtx x, rtx body)
+reg_referenced_p (const_rtx x, const_rtx body)
 {
   int i;
 
@@ -919,7 +919,7 @@ set_of (rtx pat, rtx insn)
    will not be used, which we ignore.  */
 
 rtx
-single_set_2 (rtx insn, rtx pat)
+single_set_2 (const_rtx insn, const_rtx pat)
 {
   rtx set = NULL;
   int set_verified = 1;
@@ -972,7 +972,7 @@ single_set_2 (rtx insn, rtx pat)
    zero.  */
 
 int
-multiple_sets (rtx insn)
+multiple_sets (const_rtx insn)
 {
   int found;
   int i;
@@ -1003,10 +1003,10 @@ multiple_sets (rtx insn)
    and there are no side effects.  */
 
 int
-set_noop_p (rtx set)
+set_noop_p (const_rtx set)
 {
-  rtx src = SET_SRC (set);
-  rtx dst = SET_DEST (set);
+  const_rtx src = SET_SRC (set);
+  const_rtx dst = SET_DEST (set);
 
   if (dst == pc_rtx && src == pc_rtx)
     return 1;
@@ -1038,9 +1038,9 @@ set_noop_p (rtx set)
    value to itself.  */
 
 int
-noop_move_p (rtx insn)
+noop_move_p (const_rtx insn)
 {
-  rtx pat = PATTERN (insn);
+  const_rtx pat = PATTERN (insn);
 
   if (INSN_CODE (insn) == NOOP_MOVE_INSN_CODE)
     return 1;
@@ -1134,8 +1134,8 @@ find_last_value (rtx x, rtx *pinsn, rtx 
    LOC may be zero, meaning don't ignore anything.  */
 
 int
-refers_to_regno_p (unsigned int regno, unsigned int endregno, rtx x,
-		   rtx *loc)
+refers_to_regno_p (unsigned int regno, unsigned int endregno,
+		   const_rtx x, rtx *loc)
 {
   int i;
   unsigned int x_regno;
@@ -1246,7 +1246,7 @@ refers_to_regno_p (unsigned int regno, u
    conflict because we expect this to be a rare case.  */
 
 int
-reg_overlap_mentioned_p (rtx x, rtx in)
+reg_overlap_mentioned_p (const_rtx x, const_rtx in)
 {
   unsigned int regno, endregno;
 
@@ -1475,7 +1475,7 @@ note_uses (rtx *pbody, void (*fun) (rtx 
    by INSN.  */
 
 int
-dead_or_set_p (rtx insn, rtx x)
+dead_or_set_p (const_rtx insn, const_rtx x)
 {
   unsigned int regno, last_regno;
   unsigned int i;
@@ -1502,7 +1502,7 @@ dead_or_set_p (rtx insn, rtx x)
    part of the register is TEST_REGNO.  */
 
 static bool
-covers_regno_no_parallel_p (rtx dest, unsigned int test_regno)
+covers_regno_no_parallel_p (const_rtx dest, unsigned int test_regno)
 {
   unsigned int regno, endregno;
 
@@ -1526,7 +1526,7 @@ covers_regno_no_parallel_p (rtx dest, un
    any member matches the covers_regno_no_parallel_p criteria.  */
 
 static bool
-covers_regno_p (rtx dest, unsigned int test_regno)
+covers_regno_p (const_rtx dest, unsigned int test_regno)
 {
   if (GET_CODE (dest) == PARALLEL)
     {
@@ -1553,9 +1553,9 @@ covers_regno_p (rtx dest, unsigned int t
    called from flow.c.  */
 
 int
-dead_or_set_regno_p (rtx insn, unsigned int test_regno)
+dead_or_set_regno_p (const_rtx insn, unsigned int test_regno)
 {
-  rtx pattern;
+  const_rtx pattern;
 
   /* See if there is a death note for something that includes TEST_REGNO.  */
   if (find_regno_note (insn, REG_DEAD, test_regno))
@@ -1596,7 +1596,7 @@ dead_or_set_regno_p (rtx insn, unsigned 
    If DATUM is nonzero, look for one whose datum is DATUM.  */
 
 rtx
-find_reg_note (rtx insn, enum reg_note kind, rtx datum)
+find_reg_note (const_rtx insn, enum reg_note kind, const_rtx datum)
 {
   rtx link;
 
@@ -1625,7 +1625,7 @@ find_reg_note (rtx insn, enum reg_note k
    it might be the case that the note overlaps REGNO.  */
 
 rtx
-find_regno_note (rtx insn, enum reg_note kind, unsigned int regno)
+find_regno_note (const_rtx insn, enum reg_note kind, unsigned int regno)
 {
   rtx link;
 
@@ -1652,7 +1652,7 @@ find_regno_note (rtx insn, enum reg_note
    has such a note.  */
 
 rtx
-find_reg_equal_equiv_note (rtx insn)
+find_reg_equal_equiv_note (const_rtx insn)
 {
   rtx link;
 
@@ -1673,7 +1673,7 @@ find_reg_equal_equiv_note (rtx insn)
    in the CALL_INSN_FUNCTION_USAGE information of INSN.  */
 
 int
-find_reg_fusage (rtx insn, enum rtx_code code, rtx datum)
+find_reg_fusage (const_rtx insn, enum rtx_code code, const_rtx datum)
 {
   /* If it's not a CALL_INSN, it can't possibly have a
      CALL_INSN_FUNCTION_USAGE field, so don't bother checking.  */
@@ -1719,9 +1719,9 @@ find_reg_fusage (rtx insn, enum rtx_code
    in the CALL_INSN_FUNCTION_USAGE information of INSN.  */
 
 int
-find_regno_fusage (rtx insn, enum rtx_code code, unsigned int regno)
+find_regno_fusage (const_rtx insn, enum rtx_code code, unsigned int regno)
 {
-  rtx link;
+  const_rtx link;
 
   /* CALL_INSN_FUNCTION_USAGE information cannot contain references
      to pseudo registers, so don't bother checking.  */
@@ -1748,9 +1748,9 @@ find_regno_fusage (rtx insn, enum rtx_co
 /* Return true if INSN is a call to a pure function.  */
 
 int
-pure_call_p (rtx insn)
+pure_call_p (const_rtx insn)
 {
-  rtx link;
+  const_rtx link;
 
   if (!CALL_P (insn) || ! CONST_OR_PURE_CALL_P (insn))
     return 0;
@@ -1772,7 +1772,7 @@ pure_call_p (rtx insn)
 /* Remove register note NOTE from the REG_NOTES of INSN.  */
 
 void
-remove_note (rtx insn, rtx note)
+remove_note (rtx insn, const_rtx note)
 {
   rtx link;
 
@@ -1800,9 +1800,9 @@ remove_note (rtx insn, rtx note)
    NODE matches.  */
 
 int
-in_expr_list_p (rtx listp, rtx node)
+in_expr_list_p (const_rtx listp, const_rtx node)
 {
-  rtx x;
+  const_rtx x;
 
   for (x = listp; x; x = XEXP (x, 1))
     if (node == XEXP (x, 0))
@@ -1817,7 +1817,7 @@ in_expr_list_p (rtx listp, rtx node)
    A simple equality test is used to determine if NODE matches.  */
 
 void
-remove_node_from_expr_list (rtx node, rtx *listp)
+remove_node_from_expr_list (const_rtx node, rtx *listp)
 {
   rtx temp = *listp;
   rtx prev = NULL_RTX;
@@ -1846,7 +1846,7 @@ remove_node_from_expr_list (rtx node, rt
    only volatile asms and UNSPEC_VOLATILE instructions.  */
 
 int
-volatile_insn_p (rtx x)
+volatile_insn_p (const_rtx x)
 {
   RTX_CODE code;
 
@@ -1912,11 +1912,9 @@ volatile_insn_p (rtx x)
    UNSPEC_VOLATILE operations or volatile ASM_OPERANDS expressions.  */
 
 int
-volatile_refs_p (rtx x)
+volatile_refs_p (const_rtx x)
 {
-  RTX_CODE code;
-
-  code = GET_CODE (x);
+  const RTX_CODE code = GET_CODE (x);
   switch (code)
     {
     case LABEL_REF:
@@ -1976,11 +1974,9 @@ volatile_refs_p (rtx x)
    incrementing.  */
 
 int
-side_effects_p (rtx x)
+side_effects_p (const_rtx x)
 {
-  RTX_CODE code;
-
-  code = GET_CODE (x);
+  const RTX_CODE code = GET_CODE (x);
   switch (code)
     {
     case LABEL_REF:
@@ -2062,7 +2058,7 @@ enum may_trap_p_flags
    elsewhere.  */
 
 static int
-may_trap_p_1 (rtx x, unsigned flags)
+may_trap_p_1 (const_rtx x, unsigned flags)
 {
   int i;
   enum rtx_code code;
@@ -2198,7 +2194,7 @@ may_trap_p_1 (rtx x, unsigned flags)
 /* Return nonzero if evaluating rtx X might cause a trap.  */
 
 int
-may_trap_p (rtx x)
+may_trap_p (const_rtx x)
 {
   return may_trap_p_1 (x, 0);
 }
@@ -2207,7 +2203,7 @@ may_trap_p (rtx x)
    is moved from its current location by some optimization.  */
 
 int
-may_trap_after_code_motion_p (rtx x)
+may_trap_after_code_motion_p (const_rtx x)
 {
   return may_trap_p_1 (x, MTP_AFTER_MOVE);
 }
@@ -2253,7 +2249,7 @@ may_trap_after_code_motion_p (rtx x)
    on a strict alignment machine.  */
 
 int
-may_trap_or_fault_p (rtx x)
+may_trap_or_fault_p (const_rtx x)
 {
   return may_trap_p_1 (x, MTP_UNALIGNED_MEMS);
 }
@@ -2262,11 +2258,11 @@ may_trap_or_fault_p (rtx x)
    i.e., an inequality.  */
 
 int
-inequality_comparisons_p (rtx x)
+inequality_comparisons_p (const_rtx x)
 {
   const char *fmt;
   int len, i;
-  enum rtx_code code = GET_CODE (x);
+  const enum rtx_code code = GET_CODE (x);
 
   switch (code)
     {
@@ -2485,7 +2481,7 @@ rtx_referenced_p (rtx x, rtx body)
    *LABELP and the jump table to *TABLEP.  LABELP and TABLEP may be NULL.  */
 
 bool
-tablejump_p (rtx insn, rtx *labelp, rtx *tablep)
+tablejump_p (const_rtx insn, rtx *labelp, rtx *tablep)
 {
   rtx label, table;
 
@@ -2510,9 +2506,9 @@ tablejump_p (rtx insn, rtx *labelp, rtx 
    of an IF_THEN_ELSE.  */
 
 static int
-computed_jump_p_1 (rtx x)
+computed_jump_p_1 (const_rtx x)
 {
-  enum rtx_code code = GET_CODE (x);
+  const enum rtx_code code = GET_CODE (x);
   int i, j;
   const char *fmt;
 
@@ -2564,7 +2560,7 @@ computed_jump_p_1 (rtx x)
    we can recognize them by a (use (label_ref)).  */
 
 int
-computed_jump_p (rtx insn)
+computed_jump_p (const_rtx insn)
 {
   int i;
   if (JUMP_P (insn))
@@ -2824,7 +2820,7 @@ swap_commutative_operands_p (rtx x, rtx 
 /* Return 1 if X is an autoincrement side effect and the register is
    not the stack pointer.  */
 int
-auto_inc_p (rtx x)
+auto_inc_p (const_rtx x)
 {
   switch (GET_CODE (x))
     {
@@ -2845,10 +2841,10 @@ auto_inc_p (rtx x)
 
 /* Return nonzero if IN contains a piece of rtl that has the address LOC.  */
 int
-loc_mentioned_in_p (rtx *loc, rtx in)
+loc_mentioned_in_p (rtx *loc, const_rtx in)
 {
-  enum rtx_code code = GET_CODE (in);
-  const char *fmt = GET_RTX_FORMAT (code);
+  const enum rtx_code code = GET_CODE (in);
+  const char *const fmt = GET_RTX_FORMAT (code);
   int i, j;
 
   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
@@ -2914,7 +2910,7 @@ subreg_lsb_1 (enum machine_mode outer_mo
    (counting from the least significant bit of the reg).  */
 
 unsigned int
-subreg_lsb (rtx x)
+subreg_lsb (const_rtx x)
 {
   return subreg_lsb_1 (GET_MODE (x), GET_MODE (SUBREG_REG (x)),
 		       SUBREG_BYTE (x));
@@ -3091,10 +3087,10 @@ subreg_offset_representable_p (unsigned 
 
 /* Return the final regno that a subreg expression refers to.  */
 unsigned int
-subreg_regno (rtx x)
+subreg_regno (const_rtx x)
 {
   unsigned int ret;
-  rtx subreg = SUBREG_REG (x);
+  const_rtx subreg = SUBREG_REG (x);
   int regno = REGNO (subreg);
 
   ret = regno + subreg_regno_offset (regno,
@@ -3232,7 +3228,7 @@ keep_with_call_p (rtx insn)
    not apply to the fallthru case of a conditional jump.  */
 
 bool
-label_is_jump_target_p (rtx label, rtx jump_insn)
+label_is_jump_target_p (const_rtx label, const_rtx jump_insn)
 {
   rtx tmp = JUMP_LABEL (jump_insn);
 
@@ -4300,10 +4296,10 @@ num_sign_bit_copies1 (rtx x, enum machin
    zero indicates an instruction pattern without a known cost.  */
 
 int
-insn_rtx_cost (rtx pat)
+insn_rtx_cost (const_rtx pat)
 {
   int i, cost;
-  rtx set;
+  const_rtx set;
 
   /* Extract the single set rtx from the instruction pattern.
      We can't use single_set since we only have the pattern.  */
@@ -4314,7 +4310,7 @@ insn_rtx_cost (rtx pat)
       set = NULL_RTX;
       for (i = 0; i < XVECLEN (pat, 0); i++)
 	{
-	  rtx x = XVECEXP (pat, 0, i);
+	  const_rtx x = XVECEXP (pat, 0, i);
 	  if (GET_CODE (x) == SET)
 	    {
 	      if (set)
diff -rup orig/egcc-SVN20060718/gcc/simplify-rtx.c egcc-SVN20060718/gcc/simplify-rtx.c
--- orig/egcc-SVN20060718/gcc/simplify-rtx.c	2006-05-30 20:00:52.000000000 -0400
+++ egcc-SVN20060718/gcc/simplify-rtx.c	2006-07-19 19:55:58.193805571 -0400
@@ -49,8 +49,8 @@ Software Foundation, 51 Franklin Street,
 #define HWI_SIGN_EXTEND(low) \
  ((((HOST_WIDE_INT) low) < 0) ? ((HOST_WIDE_INT) -1) : ((HOST_WIDE_INT) 0))
 
-static rtx neg_const_int (enum machine_mode, rtx);
-static bool plus_minus_operand_p (rtx);
+static rtx neg_const_int (enum machine_mode, const_rtx);
+static bool plus_minus_operand_p (const_rtx);
 static int simplify_plus_minus_op_data_cmp (const void *, const void *);
 static rtx simplify_plus_minus (enum rtx_code, enum machine_mode, rtx, rtx);
 static rtx simplify_immed_subreg (enum machine_mode, rtx, enum machine_mode,
@@ -66,7 +66,7 @@ static rtx simplify_binary_operation_1 (
 /* Negate a CONST_INT rtx, truncating (because a conversion from a
    maximally negative number can overflow).  */
 static rtx
-neg_const_int (enum machine_mode mode, rtx i)
+neg_const_int (enum machine_mode mode, const_rtx i)
 {
   return gen_int_mode (- INTVAL (i), mode);
 }
@@ -75,7 +75,7 @@ neg_const_int (enum machine_mode mode, r
    the most significant bit of machine mode MODE.  */
 
 bool
-mode_signbit_p (enum machine_mode mode, rtx x)
+mode_signbit_p (enum machine_mode mode, const_rtx x)
 {
   unsigned HOST_WIDE_INT val;
   unsigned int width;
@@ -259,7 +259,7 @@ simplify_gen_relational (enum rtx_code c
    resulting RTX.  Return a new RTX which is as simplified as possible.  */
 
 rtx
-simplify_replace_rtx (rtx x, rtx old_rtx, rtx new_rtx)
+simplify_replace_rtx (rtx x, const_rtx old_rtx, rtx new_rtx)
 {
   enum rtx_code code = GET_CODE (x);
   enum machine_mode mode = GET_MODE (x);
@@ -3482,7 +3482,7 @@ simplify_plus_minus (enum rtx_code code,
 
 /* Check whether an operand is suitable for calling simplify_plus_minus.  */
 static bool
-plus_minus_operand_p (rtx x)
+plus_minus_operand_p (const_rtx x)
 {
   return GET_CODE (x) == PLUS
          || GET_CODE (x) == MINUS
diff -rup orig/egcc-SVN20060718/gcc/toplev.h egcc-SVN20060718/gcc/toplev.h
--- orig/egcc-SVN20060718/gcc/toplev.h	2006-02-26 20:01:33.000000000 -0500
+++ egcc-SVN20060718/gcc/toplev.h	2006-07-19 19:55:58.194911028 -0400
@@ -31,9 +31,9 @@ extern int toplev_main (unsigned int, co
 extern int read_integral_parameter (const char *, const char *, const int);
 extern void strip_off_ending (char *, int);
 extern const char *trim_filename (const char *);
-extern void _fatal_insn_not_found (rtx, const char *, int, const char *)
+extern void _fatal_insn_not_found (const_rtx, const char *, int, const char *)
      ATTRIBUTE_NORETURN;
-extern void _fatal_insn (const char *, rtx, const char *, int, const char *)
+extern void _fatal_insn (const char *, const_rtx, const char *, int, const char *)
      ATTRIBUTE_NORETURN;
 
 #define fatal_insn(msgid, insn) \
@@ -76,8 +76,8 @@ extern bool enable_rtl_dump_file (int);
 
 extern void announce_function (tree);
 
-extern void error_for_asm (rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
-extern void warning_for_asm (rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
+extern void error_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
+extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
 extern void warn_deprecated_use (tree);
 
 #ifdef BUFSIZ
diff -rup orig/egcc-SVN20060718/gcc/tree.h egcc-SVN20060718/gcc/tree.h
--- orig/egcc-SVN20060718/gcc/tree.h	2006-07-19 19:55:52.315411273 -0400
+++ egcc-SVN20060718/gcc/tree.h	2006-07-19 19:55:58.200816317 -0400
@@ -4346,7 +4346,7 @@ extern tree gimplify_parameters (void);
 
 /* In print-rtl.c */
 #ifdef BUFSIZ
-extern void print_rtl (FILE *, rtx);
+extern void print_rtl (FILE *, const_rtx);
 #endif
 
 /* In print-tree.c */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]