This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Obvious patch applied to emit-rtl.c:gen_lowpart_common
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Jul 2005 16:00:23 +0100
- Subject: Obvious patch applied to emit-rtl.c:gen_lowpart_common
2005-07-26 J"orn Rennecke <joern.rennecke@st.com>
* emit-rtl.c (gen_lowpart_common): Compare size of MODE in bits
(rather than units) against HOST_BITS_PER_WIDE_INT.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.444
diff -p -r1.444 emit-rtl.c
*** emit-rtl.c 8 Jul 2005 23:36:37 -0000 1.444
--- emit-rtl.c 26 Jul 2005 14:53:34 -0000
*************** gen_lowpart_common (enum machine_mode mo
*** 1118,1124 ****
/* Unfortunately, this routine doesn't take a parameter for the mode of X,
so we have to make one up. Yuk. */
innermode = GET_MODE (x);
! if (GET_CODE (x) == CONST_INT && msize <= HOST_BITS_PER_WIDE_INT)
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT, MODE_INT, 0);
else if (innermode == VOIDmode)
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT * 2, MODE_INT, 0);
--- 1118,1125 ----
/* Unfortunately, this routine doesn't take a parameter for the mode of X,
so we have to make one up. Yuk. */
innermode = GET_MODE (x);
! if (GET_CODE (x) == CONST_INT
! && msize * BITS_PER_UNIT <= HOST_BITS_PER_WIDE_INT)
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT, MODE_INT, 0);
else if (innermode == VOIDmode)
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT * 2, MODE_INT, 0);