diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-04 06:12:54 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-04 06:12:54 +0000 |
commit | 8fd5918e24a68c2511b56948d91eb8c1b2202c49 (patch) | |
tree | 763fd168a4e83cbf18b4e87455b7eb2ea89cb2f1 /gcc/emit-rtl.c | |
parent | b074b70642afdd20947c8efc6a5a52bc08646dc3 (diff) | |
download | gcc-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
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 128 |
1 files changed, 8 insertions, 120 deletions
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] = |