fixups for calls to gen_rtx()

David S. Miller davem@jenolan.rutgers.edu
Mon Sep 22 00:55:00 GMT 1997


This, in particular the case in combine.c, can cause havoc on 64-bit
architectures, depending upon where the "pass in register" cutoff is
for arguments.

Mon Sep 22 03:49:45 1997  David S. Miller  <davem@tanya.rutgers.edu>

	* combine.c (try_combine): Use NULL_RTX instead of '0' where
	appropriate in calls to gen_rtx().
	cse.c (cse_main): Likewise.
	emit-rtl.c (gen_label_rtx): Likewise.
	expr.c (init_expr_once): Likewise.
	haifa-sched.c (flush_pending_lists, sched_analyze_insn,
	sched_analyze, init_rgn_data_dependences,
	compute_block_backward_dependences): Likewise.
	sched.c (schedule_insns): Likewise.
	varasm.c (immed_double_const): Likewise.

--- combine.c.~1~	Thu Sep 18 18:40:38 1997
+++ combine.c	Mon Sep 22 01:22:55 1997
@@ -1401,8 +1401,8 @@ try_combine (i3, i2, i1)
 	     as I2 will not cause a problem.  */
 
 	  subst_prev_insn = i1
-	    = gen_rtx (INSN, VOIDmode, INSN_UID (i2), 0, i2,
-		       XVECEXP (PATTERN (i2), 0, 1), -1, 0, 0);
+	    = gen_rtx (INSN, VOIDmode, INSN_UID (i2), NULL_RTX, i2,
+		       XVECEXP (PATTERN (i2), 0, 1), -1, NULL_RTX, NULL_RTX);
 
 	  SUBST (PATTERN (i2), XVECEXP (PATTERN (i2), 0, 0));
 	  SUBST (XEXP (SET_SRC (PATTERN (i2)), 0),
--- cse.c.~1~	Thu Sep 18 18:40:39 1997
+++ cse.c	Mon Sep 22 01:27:42 1997
@@ -8214,7 +8214,7 @@ cse_main (f, nregs, after_loop, file)
 
   /* Allocate scratch rtl here.  cse_insn will fill in the memory reference
      and change the code and mode as appropriate.  */
-  memory_extend_rtx = gen_rtx (ZERO_EXTEND, VOIDmode, 0);
+  memory_extend_rtx = gen_rtx (ZERO_EXTEND, VOIDmode, NULL_RTX);
 #endif
 
   /* Discard all the free elements of the previous function
--- emit-rtl.c.~1~	Mon Sep 15 22:07:17 1997
+++ emit-rtl.c	Mon Sep 22 01:32:56 1997
@@ -1444,7 +1444,8 @@ gen_label_rtx ()
 
   label = (output_bytecode
 	   ? gen_rtx (CODE_LABEL, VOIDmode, NULL, bc_get_bytecode_label ())
-	   : gen_rtx (CODE_LABEL, VOIDmode, 0, 0, 0, label_num++, NULL_PTR));
+	   : gen_rtx (CODE_LABEL, VOIDmode, 0, NULL_RTX,
+		      NULL_RTX, label_num++, NULL_PTR));
 
   LABEL_NUSES (label) = 0;
   return label;
--- expr.c.~1~	Tue Sep 16 16:59:22 1997
+++ expr.c	Mon Sep 22 02:25:33 1997
@@ -292,7 +292,7 @@ init_expr_once ()
   rtx mem1 = gen_rtx (MEM, VOIDmode, frame_pointer_rtx);
 
   start_sequence ();
-  insn = emit_insn (gen_rtx (SET, 0, 0));
+  insn = emit_insn (gen_rtx (SET, 0, NULL_RTX, NULL_RTX));
   pat = PATTERN (insn);
 
   for (mode = VOIDmode; (int) mode < NUM_MACHINE_MODES;
--- haifa-sched.c.~1~	Sat Sep 13 15:00:22 1997
+++ haifa-sched.c	Mon Sep 22 01:44:18 1997
@@ -3362,7 +3362,7 @@ flush_pending_lists (insn, only_write)
     add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI);
 
   last_pending_memory_flush =
-    gen_rtx (INSN_LIST, VOIDmode, insn, 0);
+    gen_rtx (INSN_LIST, VOIDmode, insn, NULL_RTX);
 }
 
 /* Analyze a single SET or CLOBBER rtx, X, creating all dependencies generated
@@ -3830,7 +3830,7 @@ sched_analyze_insn (x, insn, loop_notes)
 			     {
 			       /* reg_last_sets[r] is now a list of insns */
 			       reg_last_sets[i]
-				 = gen_rtx (INSN_LIST, VOIDmode, insn, 0);
+				 = gen_rtx (INSN_LIST, VOIDmode, insn, NULL_RTX);
 			     });
   CLEAR_REG_SET (reg_pending_sets);
 
@@ -3840,7 +3840,7 @@ sched_analyze_insn (x, insn, loop_notes)
 
 	/* reg_last_sets[r] is now a list of insns */
 	reg_last_sets[i]
-	  = gen_rtx (INSN_LIST, VOIDmode, insn, 0);
+	  = gen_rtx (INSN_LIST, VOIDmode, insn, NULL_RTX);
 
       reg_pending_sets_all = 0;
     }
@@ -3988,7 +3988,7 @@ sched_analyze (head, tail)
 
 	  /* last_function_call is now a list of insns */
 	  last_function_call
-	    = gen_rtx (INSN_LIST, VOIDmode, insn, 0);
+	    = gen_rtx (INSN_LIST, VOIDmode, insn, NULL_RTX);
 	}
 
       /* See comments on reemit_notes as to why we do this.  */
@@ -7060,7 +7060,7 @@ init_rgn_data_dependences (n_bbs)
     {
       bb_sched_before_next_call[bb] =
 	gen_rtx (INSN, VOIDmode, 0, NULL_RTX, NULL_RTX,
-		 NULL_RTX, 0, NULL_RTX, 0);
+		 NULL_RTX, 0, NULL_RTX, NULL_RTX);
       LOG_LINKS (bb_sched_before_next_call[bb]) = 0;
     }
 }
@@ -7191,7 +7191,7 @@ compute_block_backward_dependences (bb)
       last_pending_memory_flush = 0;
       sched_before_next_call
 	= gen_rtx (INSN, VOIDmode, 0, NULL_RTX, NULL_RTX,
-		   NULL_RTX, 0, NULL_RTX, 0);
+		   NULL_RTX, 0, NULL_RTX, NULL_RTX);
       LOG_LINKS (sched_before_next_call) = 0;
     }
   else
--- sched.c.~1~	Fri Sep  5 15:36:26 1997
+++ sched.c	Mon Sep 22 01:55:46 1997
@@ -4237,7 +4237,7 @@ schedule_insns (dump_file)
   /* Create an insn here so that we can hang dependencies off of it later.  */
   sched_before_next_call
     = gen_rtx (INSN, VOIDmode, 0, NULL_RTX, NULL_RTX,
-	       NULL_RTX, 0, NULL_RTX, 0);
+	       NULL_RTX, 0, NULL_RTX, NULL_RTX);
 
   /* Initialize the unused_*_lists.  We can't use the ones left over from
      the previous function, because gcc has freed that memory.  We can use
--- varasm.c.~1~	Thu Sep 18 18:40:39 1997
+++ varasm.c	Mon Sep 22 01:58:35 1997
@@ -2192,7 +2192,7 @@ immed_double_const (i0, i1, mode)
 
   push_obstacks_nochange ();
   rtl_in_saveable_obstack ();
-  r = gen_rtx (CONST_DOUBLE, mode, 0, i0, i1);
+  r = gen_rtx (CONST_DOUBLE, mode, NULL_RTX, i0, i1);
   pop_obstacks ();
 
   /* Don't touch const_double_chain in nested function; see force_const_mem.



More information about the Gcc mailing list