Patchwork [avr,committed] : Tidy up CONST_FIXED_P usage.

login
register
mail settings
Submitter Georg-Johann Lay
Date Sept. 17, 2012, 3:41 p.m.
Message ID <505744B9.3040302@gjlay.de>
Download mbox | patch
Permalink /patch/184476/
State New
Headers show

Comments

Georg-Johann Lay - Sept. 17, 2012, 3:41 p.m.
http://gcc.gnu.org/viewcvs?view=revision&revision=191393

Committed as obvious.

CONST_FIXED_P is promoted to rtl.h now.

Johann


	* config/avr/avr.c (CONST_FIXED_P): Remove define.
	* config/avr/avr.md (add<mode>3): Use CONST_FIXED_P.





Richard Guenther wrote:
> Georg-Johann Lay 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: config/avr/avr.md
===================================================================
--- config/avr/avr.md   (revision 191392)
+++ config/avr/avr.md   (working copy)
@@ -1132,7 +1132,7 @@  (define_expand "add<mode>3"
           }
       }

-    if (CONST_FIXED == GET_CODE (operands[2]))
+    if (CONST_FIXED_P (operands[2]))
       {
         emit_insn (gen_add<mode>3_clobber (operands[0], operands[1],
operands[2]));
         DONE;
Index: config/avr/avr.c
===================================================================
--- config/avr/avr.c    (revision 191392)
+++ config/avr/avr.c    (working copy)
@@ -49,10 +49,6 @@ 
 #include "params.h"
 #include "df.h"

-#ifndef CONST_FIXED_P
-#define CONST_FIXED_P(X) (CONST_FIXED == GET_CODE (X))
-#endif
-
 /* Maximal allowed offset for an address in the LD command */
 #define MAX_LD_OFFSET(MODE) (64 - (signed)GET_MODE_SIZE (MODE))