diff mbox

: Add CONST_FIXED_P predicate macro to rtl.h

Message ID 50570FF3.4070402@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay Sept. 17, 2012, 11:56 a.m. UTC
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.

Comments

Richard Biener Sept. 17, 2012, 12:29 p.m. UTC | #1
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.
>
diff mbox

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)