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]

mn10300 64-bit clean-up


When HOST_BITS_PER_WIDE_INT is 64, a DI fits in a const_int, so we
must properly break it into words.  No regressions, and apparently all
testsuite differences between an ia32 host and an alpha host are
gone.  Ok to install?

Index: gcc/config/mn10300/mn10300.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.28
diff -u -p -c -r1.28 mn10300.c
*** gcc/config/mn10300/mn10300.c	2000/05/19 00:56:08	1.28
--- gcc/config/mn10300/mn10300.c	2000/05/20 16:10:03
*************** print_operand (file, x, code)
*** 177,183 ****
  	      }
  
  	  case CONST_INT:
! 	    print_operand_address (file, x);
  	    break;
  
  	  default:
--- 177,184 ----
  	      }
  
  	  case CONST_INT:
! 	    fprintf (file, "%ld",
! 		     INTVAL (x) & (((((long)1) << 31) << 1) - 1));
  	    break;
  
  	  default:
*************** print_operand (file, x, code)
*** 231,240 ****
  	      }
  
  	  case CONST_INT:
! 	    if (INTVAL (x) < 0)
! 	      print_operand_address (file, GEN_INT (-1));
!  	    else
! 	      print_operand_address (file, GEN_INT (0));
  	    break;
  	  default:
  	    abort ();
--- 232,238 ----
  	      }
  
  	  case CONST_INT:
! 	    fprintf (file, "%ld", (INTVAL (x) >> 31) >> 1);
  	    break;
  	  default:
  	    abort ();
Index: gcc/config/mn10300/mn10300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.34
diff -u -p -c -r1.34 mn10300.md
*** gcc/config/mn10300/mn10300.md	2000/05/11 21:08:18	1.34
--- gcc/config/mn10300/mn10300.md	2000/05/20 16:10:04
***************
*** 420,426 ****
  	if (GET_CODE (operands[1]) == CONST_INT)
  	  {
  	    val[0] = INTVAL (operands[1]);
! 	    val[1] = val[0] < 0 ? -1 : 0;
  	  }
  	if (GET_CODE (operands[1]) == CONST_DOUBLE)
  	  {
--- 420,427 ----
  	if (GET_CODE (operands[1]) == CONST_INT)
  	  {
  	    val[0] = INTVAL (operands[1]);
! 	    val[1] = (val[0] >> 31) >> 1;
! 	    val[0] &= ((((long)1) << 31) << 1) - 1;
  	  }
  	if (GET_CODE (operands[1]) == CONST_DOUBLE)
  	  {
***************
*** 568,574 ****
  	if (GET_CODE (operands[1]) == CONST_INT)
  	  {
  	    val[0] = INTVAL (operands[1]);
! 	    val[1] = val[0] < 0 ? -1 : 0;
  	  }
  	if (GET_CODE (operands[1]) == CONST_DOUBLE)
  	  {
--- 569,576 ----
  	if (GET_CODE (operands[1]) == CONST_INT)
  	  {
  	    val[0] = INTVAL (operands[1]);
! 	    val[1] = (val[0] >> 31) >> 1;
! 	    val[0] &= ((((long)1) << 31) << 1) - 1;
  	  }
  	if (GET_CODE (operands[1]) == CONST_DOUBLE)
  	  {

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

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