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]

obvious fix applied to expmed.c:expand_smod_pow2


2004-06-30  J"orn Rennecke <joern.rennecke@superh.com>

	* expmed.c (expand_smod_pow2): Fix sign of mask.

Index: expmed.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expmed.c,v
retrieving revision 1.171
diff -p -r1.171 expmed.c
*** expmed.c	29 Jun 2004 17:13:08 -0000	1.171
--- expmed.c	30 Jun 2004 12:27:42 -0000
*************** expand_smod_pow2 (enum machine_mode mode
*** 3124,3130 ****
       can avoid an explicit compare operation in the following comparison
       against zero.  */
  
!   mask = (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)
  	 | (((HOST_WIDE_INT) 1 << logd) - 1);
  
    temp = expand_binop (mode, and_optab, op0, GEN_INT (mask), result,
--- 3124,3130 ----
       can avoid an explicit compare operation in the following comparison
       against zero.  */
  
!   mask = (HOST_WIDE_INT) -1 << (GET_MODE_BITSIZE (mode) - 1)
  	 | (((HOST_WIDE_INT) 1 << logd) - 1);
  
    temp = expand_binop (mode, and_optab, op0, GEN_INT (mask), result,


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