This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] genemit.c: Use const_int_rtx in insn-emit.c
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 05 Feb 2004 17:58:46 -0500 (EST)
- Subject: [patch] genemit.c: Use const_int_rtx in insn-emit.c
Hi,
Attached is a patch to use const_int_rtx in insn-emit.c whenever
possible.
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* genemit.c (gen_exp) [CONST_INT]: Use const_int_rtx whenever
possible.
Index: genemit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genemit.c,v
retrieving revision 1.89
diff -u -r1.89 genemit.c
--- genemit.c 2 Feb 2004 22:05:41 -0000 1.89
+++ genemit.c 5 Feb 2004 19:48:08 -0000
@@ -237,12 +237,10 @@
return;
case CONST_INT:
- if (INTVAL (x) == 0)
- printf ("const0_rtx");
- else if (INTVAL (x) == 1)
- printf ("const1_rtx");
- else if (INTVAL (x) == -1)
- printf ("constm1_rtx");
+ if (-MAX_SAVED_CONST_INT <= INTVAL (x)
+ && INTVAL (x) <= MAX_SAVED_CONST_INT)
+ printf ("const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
+ (int) INTVAL (x));
else if (INTVAL (x) == STORE_FLAG_VALUE)
printf ("const_true_rtx");
else