This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Use gen_rtx_{FOO,fmt_e*} instead of gen_rtx.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 03 Feb 2004 00:17:02 -0500 (EST)
- Subject: [patch] Use gen_rtx_{FOO,fmt_e*} instead of gen_rtx.
Hi,
Bootstrapped on i686-pc-linux-gnu. Committed as obvious.
Kazu Hirata
gcc/
2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* combine.c (simplify_set): Use gen_rtx_fmt_e instead of
gen_rtx.
* emit-rtl.c (init_emit_once): Use gen_rtx_PC and gen_rtx_CC0
instead of gen_rtx.
* reload1.c (init_elim_table): Use gen_rtx_fmt_e instead of
gen_rtx.
* config/ns32k/ns32k.md (udivmodhi4): Use gen_rtx_IOR and
gen_rtx_ASHIFT instead of gen_rtx.
(udivmodqi4): Likewise.
ada/
2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* ada/trans.c (gigi): Use gen_rtx_SYMBOL_REF instead of
gen_rtx.
f/
2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* com.c (ffecom_member_phase2_): Use gen_rtx_MEM instead of
gen_rtx.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.407
diff -u -p -r1.407 combine.c
--- combine.c 2 Feb 2004 00:17:08 -0000 1.407
+++ combine.c 3 Feb 2004 05:08:36 -0000
@@ -5200,8 +5200,8 @@ simplify_set (rtx x)
&& GET_CODE (SUBREG_REG (src)) == MEM)
{
SUBST (SET_SRC (x),
- gen_rtx (LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (src))),
- GET_MODE (src), SUBREG_REG (src)));
+ gen_rtx_fmt_e (LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (src))),
+ GET_MODE (src), SUBREG_REG (src)));
src = SET_SRC (x);
}
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.373
diff -u -p -r1.373 emit-rtl.c
--- emit-rtl.c 31 Jan 2004 09:21:18 -0000 1.373
+++ emit-rtl.c 3 Feb 2004 05:08:39 -0000
@@ -5355,8 +5355,8 @@ init_emit_once (int line_numbers)
This must be done at runtime because the register number field
is in a union and some compilers can't initialize unions. */
- pc_rtx = gen_rtx (PC, VOIDmode);
- cc0_rtx = gen_rtx (CC0, VOIDmode);
+ pc_rtx = gen_rtx_PC (VOIDmode);
+ cc0_rtx = gen_rtx_CC0 (VOIDmode);
stack_pointer_rtx = gen_raw_REG (Pmode, STACK_POINTER_REGNUM);
frame_pointer_rtx = gen_raw_REG (Pmode, FRAME_POINTER_REGNUM);
if (hard_frame_pointer_rtx == 0)
Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.424
diff -u -p -r1.424 reload1.c
--- reload1.c 2 Feb 2004 00:17:17 -0000 1.424
+++ reload1.c 3 Feb 2004 05:08:44 -0000
@@ -3477,7 +3477,7 @@ init_elim_table (void)
#endif
/* Count the number of eliminable registers and build the FROM and TO
- REG rtx's. Note that code in gen_rtx will cause, e.g.,
+ REG rtx's. Note that code in gen_rtx_REG will cause, e.g.,
gen_rtx_REG (Pmode, STACK_POINTER_REGNUM) to equal stack_pointer_rtx.
We depend on this. */
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++)
@@ -3932,8 +3932,9 @@ reload_as_needed (int live_known)
if (n == 1)
{
n = validate_replace_rtx (reload_reg,
- gen_rtx (code, mode,
- reload_reg),
+ gen_rtx_fmt_e (code,
+ mode,
+ reload_reg),
p);
/* We must also verify that the constraints
@@ -3948,8 +3949,9 @@ reload_as_needed (int live_known)
undo the replacement. */
if (!n)
{
- validate_replace_rtx (gen_rtx (code, mode,
- reload_reg),
+ validate_replace_rtx (gen_rtx_fmt_e (code,
+ mode,
+ reload_reg),
reload_reg, p);
break;
}
Index: ada/trans.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/trans.c,v
retrieving revision 1.42
diff -u -p -r1.42 trans.c
--- ada/trans.c 12 Jan 2004 11:45:26 -0000 1.42
+++ ada/trans.c 3 Feb 2004 05:08:48 -0000
@@ -186,7 +186,7 @@ gigi (Node_Id gnat_root,
/* Enable GNAT stack checking method if needed */
if (!Stack_Check_Probes_On_Target)
- set_stack_check_libfunc (gen_rtx (SYMBOL_REF, Pmode, "_gnat_stack_check"));
+ set_stack_check_libfunc (gen_rtx_SYMBOL_REF (Pmode, "_gnat_stack_check"));
/* Save the type we made for integer as the type for Standard.Integer.
Then make the rest of the standard types. Note that some of these
Index: config/ns32k/ns32k.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ns32k/ns32k.md,v
retrieving revision 1.28
diff -u -p -r1.28 ns32k.md
--- config/ns32k/ns32k.md 1 Feb 2004 21:21:40 -0000 1.28
+++ config/ns32k/ns32k.md 3 Feb 2004 05:08:49 -0000
@@ -1322,8 +1322,8 @@
;; REG_NOTES (first));
;; REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
;; gen_rtx_EXPR_LIST (REG_EQUAL,
-;; gen_rtx(IOR, DImode, moddi,
-;; gen_rtx(ASHIFT, DImode, divdi, GEN_INT(32))),
+;; gen_rtx_IOR (DImode, moddi,
+;; gen_rtx_ASHIFT (DImode, divdi, GEN_INT(32))),
;; REG_NOTES (last)));
;; }
;;
@@ -1379,8 +1379,8 @@
;; REG_NOTES (first));
;; REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
;; gen_rtx_EXPR_LIST (REG_EQUAL,
-;; gen_rtx(IOR, DImode, moddi,
-;; gen_rtx(ASHIFT, DImode, divdi, GEN_INT(32))),
+;; gen_rtx_IOR (DImode, moddi,
+;; gen_rtx_ASHIFT (DImode, divdi, GEN_INT(32))),
;; REG_NOTES (last)));
;; }
;;
Index: f/com.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/com.c,v
retrieving revision 1.221
diff -u -p -r1.221 com.c
--- f/com.c 29 Dec 2003 16:16:37 -0000 1.221
+++ f/com.c 3 Feb 2004 05:08:58 -0000
@@ -1,5 +1,5 @@
/* com.c -- Implementation File (module.c template V1.0)
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by James Craig Burley.
@@ -6906,11 +6906,11 @@ ffecom_member_phase2_ (ffestorag mst, ff
TREE_USED (t) = 1;
SET_DECL_RTL (t,
- gen_rtx (MEM, TYPE_MODE (type),
- plus_constant (XEXP (DECL_RTL (mt), 0),
- ffestorag_modulo (mst)
- + ffestorag_offset (st)
- - ffestorag_offset (mst))));
+ gen_rtx_MEM (TYPE_MODE (type),
+ plus_constant (XEXP (DECL_RTL (mt), 0),
+ ffestorag_modulo (mst)
+ + ffestorag_offset (st)
+ - ffestorag_offset (mst))));
t = start_decl (t, FALSE);