OSDN Git Service

(operand_subword): Reject cases when BITS_PER_WORD is greater than
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 May 1993 17:13:32 +0000 (17:13 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 May 1993 17:13:32 +0000 (17:13 +0000)
HOST_BITS_PER_INT unless OP is const0_rtx.

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

gcc/emit-rtl.c

index f73a61c..cec8f0f 100644 (file)
@@ -1,5 +1,5 @@
 /* Emit RTL for the GNU C-Compiler expander.
-   Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -995,15 +995,16 @@ operand_subword (op, i, validate_address, mode)
      Convert to proper endianness now since these cases need it.
      At this point, i == 0 means the low-order word.  
 
-     Note that it must be that BITS_PER_WORD <= HOST_BITS_PER_INT.
-     This is because if it were greater, it could only have been two
-     times greater since we do not support making wider constants.  In
-     that case, it MODE would have already been the proper size and
-     it would have been handled above.  This means we do not have to
-     worry about the case where we would be returning a CONST_DOUBLE.  */
+     We do not want to handle the case when BITS_PER_WORD <= HOST_BITS_PER_INT
+     in general.  However, if OP is (const_int 0), we can just return
+     it for any word.  */
+
+  if (op == const0_rtx)
+    return op;
 
   if (GET_MODE_CLASS (mode) != MODE_INT
-      || (GET_CODE (op) != CONST_INT && GET_CODE (op) != CONST_DOUBLE))
+      || (GET_CODE (op) != CONST_INT && GET_CODE (op) != CONST_DOUBLE)
+      || BITS_PER_WORD > HOST_BITS_PER_INT)
     return 0;
 
   if (WORDS_BIG_ENDIAN)