This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch]: Add CONST_FIXED_P predicate macro to rtl.h
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 17 Sep 2012 13:56:35 +0200
- Subject: [Patch]: Add CONST_FIXED_P predicate macro to rtl.h
The subject says it all:
Add CONST_FIXED_P predicate macro similar to CONST_INT_P to rtl.h.
Currently, CONST_FIXED_P is not used in the compiler, except in avr.c that does
#ifndef CONST_FIXED_P
#define CONST_FIXED_P(X) (CONST_FIXED == GET_CODE (X))
#endif
Ok for trunk?
If this change is fine, I'll clean up the avr BE in a separate change.
Johann
* rtl.h (CONST_FIXED_P): New predicate macro.
Index: rtl.h
===================================================================
--- rtl.h (revision 191342)
+++ rtl.h (working copy)
@@ -419,6 +419,9 @@ struct GTY((variable_size)) rtvec_def {
/* Predicate yielding nonzero iff X is an rtx for a constant integer. */
#define CONST_INT_P(X) (GET_CODE (X) == CONST_INT)
+/* Predicate yielding nonzero iff X is an rtx for a constant fixed-point. */
+#define CONST_FIXED_P(X) (GET_CODE (X) == CONST_FIXED)
+
/* Predicate yielding true iff X is an rtx for a double-int
or floating point constant. */
#define CONST_DOUBLE_P(X) (GET_CODE (X) == CONST_DOUBLE)