diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a3a65423aa..fa11af79ee8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-11 Nathan Froyd + + * recog.c (nonmemory_operand): Call immediate_operand for + CONSTANT_P operands. + 2010-10-11 Uros Bizjak * config/i386/i386.md (movmem): Macroize expander from diff --git a/gcc/recog.c b/gcc/recog.c index 368783ff570..e16a85cc4ea 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -1158,24 +1158,7 @@ int nonmemory_operand (rtx op, enum machine_mode mode) { if (CONSTANT_P (op)) - { - /* Don't accept CONST_INT or anything similar - if the caller wants something floating. */ - if (GET_MODE (op) == VOIDmode && mode != VOIDmode - && GET_MODE_CLASS (mode) != MODE_INT - && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) - return 0; - - if (CONST_INT_P (op) - && mode != VOIDmode - && trunc_int_for_mode (INTVAL (op), mode) != INTVAL (op)) - return 0; - - return ((GET_MODE (op) == VOIDmode || GET_MODE (op) == mode - || mode == VOIDmode) - && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (op)) - && LEGITIMATE_CONSTANT_P (op)); - } + return immediate_operand (op, mode); if (GET_MODE (op) != mode && mode != VOIDmode) return 0;