summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-04 06:12:54 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-04 06:12:54 +0000
commit8fd5918e24a68c2511b56948d91eb8c1b2202c49 (patch)
tree763fd168a4e83cbf18b4e87455b7eb2ea89cb2f1
parentb074b70642afdd20947c8efc6a5a52bc08646dc3 (diff)
downloadgcc-8fd5918e24a68c2511b56948d91eb8c1b2202c49.tar.gz
* emit-rtl.c (gen_rtx): Remove.
* genattrtab.c: Don't mention gen_rtx in a comment. * rtl.h: Remove the prototype for gen_rtx. * doc/md.texi: Replace gen_rtx with gen_rtx_REG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77224 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/doc/md.texi2
-rw-r--r--gcc/emit-rtl.c128
-rw-r--r--gcc/genattrtab.c2
-rw-r--r--gcc/rtl.h4
5 files changed, 18 insertions, 125 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 52e98f14f2b..7a8ff1f4241 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
+ * emit-rtl.c (gen_rtx): Remove.
+ * genattrtab.c: Don't mention gen_rtx in a comment.
+ * rtl.h: Remove the prototype for gen_rtx.
+ * doc/md.texi: Replace gen_rtx with gen_rtx_REG.
+
+2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
+
* config/arc/arc.h, config/fr30/fr30.h
(SETUP_INCOMING_VARARGS): Remove the target-independent
comments.
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index e81e350578b..f8bf54ef7b9 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -4595,7 +4595,7 @@ Here is an example, taken from the 68000 machine description:
"FP_REG_P (operands[0]) && ! FP_REG_P (operands[1])"
@{
rtx xoperands[2];
- xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1);
+ xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
#ifdef MOTOROLA
output_asm_insn ("move.l %1,(sp)", xoperands);
output_asm_insn ("move.l %1,-(sp)", operands);
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 3deefe8218f..12e54bdfd53 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -22,18 +22,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Middle-to-low level generation of rtx code and insns.
- This file contains the functions `gen_rtx', `gen_reg_rtx'
- and `gen_label_rtx' that are the usual ways of creating rtl
- expressions for most purposes.
+ This file contains the functions `gen_reg_rtx' and `gen_label_rtx'
+ that are the usual ways of creating rtl expressions for most
+ purposes.
It also has the functions for creating insns and linking
them in the doubly-linked chain.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
- the machine description. These routines use `gen_rtx' to make
- the individual rtx's of the pattern; what is machine dependent
- is the kind of rtx's they make and what arguments they use. */
+ the machine description. These routines use `gen_rtx_fmt_ee' and
+ others to make the individual rtx's of the pattern; what is machine
+ dependent is the kind of rtx's they make and what arguments they
+ use. */
#include "config.h"
#include "system.h"
@@ -645,119 +646,6 @@ gen_lowpart_SUBREG (enum machine_mode mode, rtx reg)
subreg_lowpart_offset (mode, inmode));
}
-/* rtx gen_rtx (code, mode, [element1, ..., elementn])
-**
-** This routine generates an RTX of the size specified by
-** <code>, which is an RTX code. The RTX structure is initialized
-** from the arguments <element1> through <elementn>, which are
-** interpreted according to the specific RTX type's format. The
-** special machine mode associated with the rtx (if any) is specified
-** in <mode>.
-**
-** gen_rtx can be invoked in a way which resembles the lisp-like
-** rtx it will generate. For example, the following rtx structure:
-**
-** (plus:QI (mem:QI (reg:SI 1))
-** (mem:QI (plusw:SI (reg:SI 2) (reg:SI 3))))
-**
-** ...would be generated by the following C code:
-**
-** gen_rtx_PLUS (QImode,
-** gen_rtx_MEM (QImode,
-** gen_rtx_REG (SImode, 1)),
-** gen_rtx_MEM (QImode,
-** gen_rtx_PLUS (SImode,
-** gen_rtx_REG (SImode, 2),
-** gen_rtx_REG (SImode, 3)))),
-*/
-
-/*VARARGS2*/
-rtx
-gen_rtx (enum rtx_code code, enum machine_mode mode, ...)
-{
- int i; /* Array indices... */
- const char *fmt; /* Current rtx's format... */
- rtx rt_val; /* RTX to return to caller... */
- va_list p;
-
- va_start (p, mode);
-
- switch (code)
- {
- case CONST_INT:
- rt_val = gen_rtx_CONST_INT (mode, va_arg (p, HOST_WIDE_INT));
- break;
-
- case CONST_DOUBLE:
- {
- HOST_WIDE_INT arg0 = va_arg (p, HOST_WIDE_INT);
- HOST_WIDE_INT arg1 = va_arg (p, HOST_WIDE_INT);
-
- rt_val = immed_double_const (arg0, arg1, mode);
- }
- break;
-
- case REG:
- rt_val = gen_rtx_REG (mode, va_arg (p, int));
- break;
-
- case MEM:
- rt_val = gen_rtx_MEM (mode, va_arg (p, rtx));
- break;
-
- default:
- rt_val = rtx_alloc (code); /* Allocate the storage space. */
- rt_val->mode = mode; /* Store the machine mode... */
-
- fmt = GET_RTX_FORMAT (code); /* Find the right format... */
- for (i = 0; i < GET_RTX_LENGTH (code); i++)
- {
- switch (*fmt++)
- {
- case '0': /* Field with unknown use. Zero it. */
- X0EXP (rt_val, i) = NULL_RTX;
- break;
-
- case 'i': /* An integer? */
- XINT (rt_val, i) = va_arg (p, int);
- break;
-
- case 'w': /* A wide integer? */
- XWINT (rt_val, i) = va_arg (p, HOST_WIDE_INT);
- break;
-
- case 's': /* A string? */
- XSTR (rt_val, i) = va_arg (p, char *);
- break;
-
- case 'e': /* An expression? */
- case 'u': /* An insn? Same except when printing. */
- XEXP (rt_val, i) = va_arg (p, rtx);
- break;
-
- case 'E': /* An RTX vector? */
- XVEC (rt_val, i) = va_arg (p, rtvec);
- break;
-
- case 'b': /* A bitmap? */
- XBITMAP (rt_val, i) = va_arg (p, bitmap);
- break;
-
- case 't': /* A tree? */
- XTREE (rt_val, i) = va_arg (p, tree);
- break;
-
- default:
- abort ();
- }
- }
- break;
- }
-
- va_end (p);
- return rt_val;
-}
-
/* gen_rtvec (n, [rt1, ..., rtn])
**
** This routine creates an rtvec and stores within it the
@@ -5389,7 +5277,7 @@ init_emit_once (int line_numbers)
/* Create the unique rtx's for certain rtx codes and operand values. */
- /* Don't use gen_rtx here since gen_rtx in this case
+ /* Don't use gen_rtx_CONST_INT here since gen_rtx_CONST_INT in this case
tries to use these variables. */
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
const_int_rtx[i + MAX_SAVED_CONST_INT] =
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 56c62e38678..e1a3e728826 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -549,7 +549,7 @@ attr_hash_add_string (int hashcode, char *str)
In some cases we cannot uniquify; then we return an ordinary
impermanent rtx with ATTR_PERMANENT_P clear.
- Args are like gen_rtx, but without the mode:
+ Args are as follows:
rtx attr_rtx (code, [element1, ..., elementn]) */
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 8cb4e1b2836..13fd72ba26f 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1445,7 +1445,6 @@ extern rtx plus_constant_for_output_wide (rtx, HOST_WIDE_INT);
extern void optimize_save_area_alloca (rtx);
/* In emit-rtl.c */
-extern rtx gen_rtx (enum rtx_code, enum machine_mode, ...);
extern rtvec gen_rtvec (int, ...);
extern rtx copy_insn_1 (rtx);
extern rtx copy_insn (rtx);
@@ -1874,8 +1873,7 @@ extern GTY(()) rtx return_address_pointer_rtx;
/* There are some RTL codes that require special attention; the
generation functions included above do the raw handling. If you
- add to this list, modify special_rtx in gengenrtl.c as well. You
- should also modify gen_rtx to use the special function. */
+ add to this list, modify special_rtx in gengenrtl.c as well. */
extern rtx gen_rtx_CONST_INT (enum machine_mode, HOST_WIDE_INT);
extern rtx gen_rtx_CONST_VECTOR (enum machine_mode, rtvec);