This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR target/30474: Bad 16bit constant code generation on 64bit host


This patch makes sure that only lower 16bits are used for 'U'.


H.J.
----
2007-01-15  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/30474
	* config/score/score.c (score_print_operand): Only print out
	lower 16bits for 'U'.

--- gcc/config/score/score.c.64	2007-01-15 10:13:33.000000000 -0800
+++ gcc/config/score/score.c	2007-01-15 11:00:53.000000000 -0800
@@ -1144,7 +1144,7 @@ score_print_operand (FILE *file, rtx op,
     {
       gcc_assert (code == CONST_INT);
       fprintf (file, HOST_WIDE_INT_PRINT_HEX,
-               (unsigned HOST_WIDE_INT) INTVAL (op) >> 16);
+               (unsigned HOST_WIDE_INT) (INTVAL (op) >> 16) & 0xffff);
     }
   else if (c == 'D')
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]