]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cris.c (cris_print_operand): Use operand_subword and HOST_WIDE_INT_PRINT_DEC for...
authorHans-Peter Nilsson <hp@axis.com>
Thu, 12 May 2005 23:36:46 +0000 (23:36 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Thu, 12 May 2005 23:36:46 +0000 (23:36 +0000)
* config/cris/cris.c (cris_print_operand) <case 'H'; case
CONST_INT>: Use operand_subword and HOST_WIDE_INT_PRINT_DEC for
output; don't have special case for HOST_BITS_PER_WIDE_INT == 32.

From-SVN: r99635

gcc/ChangeLog
gcc/config/cris/cris.c

index f88fbf4c74c96a75a0b75e4515c6ee4ac4503fcb..aec423e713fd58f2fb6c3e1d653b3e1174d290d9 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-13  Hans-Peter Nilsson  <hp@axis.com>
+
+       * config/cris/cris.c (cris_print_operand) <case 'H'; case
+       CONST_INT>: Use operand_subword and HOST_WIDE_INT_PRINT_DEC for
+       output; don't have special case for HOST_BITS_PER_WIDE_INT == 32.
+
 2005-05-13  Jan Hubicka  <jh@suse.cz>
 
        * basic-block.h (FOR_ALL_BB_FN): New macro.
index 19d250c8549aff564919cdfef1e1d7270a490de9..f9a7d1efe6919f27b0a8fc1cf80348de8b5e8f07 100644 (file)
@@ -845,11 +845,10 @@ cris_print_operand (FILE *file, rtx x, int code)
       switch (GET_CODE (operand))
        {
        case CONST_INT:
-         if (HOST_BITS_PER_WIDE_INT == 32)
-           /* Sign-extension from a normal int to a long long.  */
-           fprintf (file, INTVAL (operand) < 0 ? "-1" : "0");
-         else
-           fprintf (file, "0x%x", (unsigned int)(INTVAL (x) >> 31 >> 1));
+         /* If we're having 64-bit HOST_WIDE_INTs, the whole (DImode)
+            value is kept here, and so may be other than 0 or -1.  */
+         fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+                  INTVAL (operand_subword (operand, 1, 0, DImode)));
          return;
 
        case CONST_DOUBLE: