This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed, cris.c: Fix 64-bit-host thinko
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 May 2005 03:19:08 +0200
- Subject: Committed, cris.c: Fix 64-bit-host thinko
Eliminates spurious ehm, differences, between the test-results on
i686-*-linux* and x86_86-*-linux*. An attempt to handle 64-bit hosts was
plain wrong. Bah. Tested on cross from both.
* 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.
Index: config/cris/cris.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.c,v
retrieving revision 1.74
diff -p -u -r1.74 cris.c
--- config/cris/cris.c 23 Apr 2005 21:28:19 -0000 1.74
+++ config/cris/cris.c 12 May 2005 23:35:35 -0000
@@ -845,11 +845,10 @@ cris_print_operand (FILE *file, rtx x, i
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:
brgds, H-P