Patchwork : Add CONST_FIXED_P predicate macro to rtl.h

login
register
mail settings
Submitter Georg-Johann Lay
Date Sept. 17, 2012, 11:56 a.m.
Message ID <50570FF3.4070402@gjlay.de>
Download mbox | patch
Permalink /patch/184388/
State New
Headers show

Comments

Georg-Johann Lay - Sept. 17, 2012, 11:56 a.m.
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.
Richard Guenther - Sept. 17, 2012, 12:29 p.m.
On Mon, Sep 17, 2012 at 1:56 PM, Georg-Johann Lay <avr@gjlay.de> wrote:
> 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?

Ok.

Thanks,
Richard.

> 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.
>

Patch

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)