This is the mail archive of the gcc@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]

expand_binop vs libcalls



Why do we force op0 to the right mode, but not op1, like below?

Index: optabs.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optabs.c,v
retrieving revision 1.89
diff -p -3 -r1.89 optabs.c
*** optabs.c	2001/03/07 19:29:36	1.89
--- optabs.c	2001/03/20 04:58:59
*************** expand_binop (mode, binoptab, op0, op1, 
*** 1713,1718 ****
--- 1713,1724 ----
  	     since negative shift counts are meaningless.  */
  	  op1x = convert_to_mode (word_mode, op1, 1);
  	}
+       else
+ 	{
+ 	  if (GET_MODE (op1) != VOIDmode
+ 	      && GET_MODE (op1) != op1_mode)
+ 	    op1x = convert_to_mode (op1_mode, op1, unsignedp);
+ 	}
  
        if (GET_MODE (op0) != VOIDmode
  	  && GET_MODE (op0) != mode)


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