[Patch,avr,committed]: Tidy up CONST_FIXED_P usage.
Georg-Johann Lay
avr@gjlay.de
Mon Sep 17 15:42:00 GMT 2012
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.
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))
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.
>>
More information about the Gcc-patches
mailing list