OSDN Git Service

* recog.c (nonmemory_operand): Call immediate_operand for
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Oct 2010 21:50:58 +0000 (21:50 +0000)
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Oct 2010 21:50:58 +0000 (21:50 +0000)
CONSTANT_P operands.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165334 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/recog.c

index 5a3a654..fa11af7 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * recog.c (nonmemory_operand): Call immediate_operand for
+       CONSTANT_P operands.
+
 2010-10-11  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (movmem<mode>): Macroize expander from
index 368783f..e16a85c 100644 (file)
@@ -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;