m3-sys/m3cc/gcc-apple/gcc/varasm.c
/* This is the worker function for const_rtx_hash, called via for_each_rtx.  */
This is the worker function for const_rtx_hash, called via for_each_rtx.
This is the worker function for const_rtx_hash called via for_each_rtx .
static int
const_rtx_hash_1 (rtx *xp, void *data)
{
  unsigned HOST_WIDE_INT hwi;
  enum machine_mode mode;
  enum rtx_code code;
  hashval_t h, *hp;
  rtx x;
  x = *xp;
  code = GET_CODE (x);
  mode = GET_MODE (x);
  h = (hashval_t) code * 1048573 + mode;
  switch (code)
    {
    case CONST_INT:
      hwi = INTVAL (x);
    fold_hwi:
      {
	const int shift = sizeof (hashval_t) * CHAR_BIT;
	const int n = sizeof (HOST_WIDE_INT) / sizeof (hashval_t);
	int i;
	h ^= (hashval_t) hwi;
	for (i = 1; i < n; ++i)
	  {
	    hwi >>= shift;
	    h ^= (hashval_t) hwi;
	  }
      }
      break;
    case CONST_DOUBLE:
      if (mode == VOIDmode)
	{
	  hwi = CONST_DOUBLE_LOW (x) ^ CONST_DOUBLE_HIGH (x);
	  goto fold_hwi;
	}
      else
	h ^= real_hash (CONST_DOUBLE_REAL_VALUE (x));
      break;
    case CONST_VECTOR:
      {
	int i;
	for (i = XVECLEN (x, 0); i-- > 0; )
	  h = h * 251 + const_rtx_hash_1 (&XVECEXP (x, 0, i), data);
      }
      break;
    case SYMBOL_REF:
      h ^= htab_hash_string (XSTR (x, 0));
      break;
    case LABEL_REF:
      h = h * 251 + CODE_LABEL_NUMBER (XEXP (x, 0));
      break;
    case UNSPEC:
    case UNSPEC_VOLATILE:
      h = h * 251 + XINT (x, 1);
      break;
    default:
      break;
    }
  hp = data;
  *hp = *hp * 509 + h;
  return 0;
}
static int const_rtx_hash_1 ( rtx * xp , void * data ) { unsigned HOST_WIDE_INT hwi ; enum machine_mode mode ; enum rtx_code code ; hashval_t h , * hp ; rtx x ; x = * xp ; code = GET_CODE ( x ) ; mode = GET_MODE ( x ) ; h = ( hashval_t ) code * 1048573 + mode ; switch ( code ) { case CONST_INT : hwi = INTVAL ( x ) ; fold_hwi : { const int shift = sizeof ( hashval_t ) * CHAR_BIT ; const int n = sizeof ( HOST_WIDE_INT ) / sizeof ( hashval_t ) ; int i ; h ^= ( hashval_t ) hwi ; for ( i = 1 ; i < n ; ++ i ) { hwi >>= shift ; h ^= ( hashval_t ) hwi ; } } break ; case CONST_DOUBLE : if ( mode == VOIDmode ) { hwi = CONST_DOUBLE_LOW ( x ) ^ CONST_DOUBLE_HIGH ( x ) ; goto fold_hwi ; } else h ^= real_hash ( CONST_DOUBLE_REAL_VALUE ( x ) ) ; break ; case CONST_VECTOR : { int i ; for ( i = XVECLEN ( x , 0 ) ; i -- > 0 ; ) h = h * 251 + const_rtx_hash_1 ( & XVECEXP ( x , 0 , i ) , data ) ; } break ; case SYMBOL_REF : h ^= htab_hash_string ( XSTR ( x , 0 ) ) ; break ; case LABEL_REF : h = h * 251 + CODE_LABEL_NUMBER ( XEXP ( x , 0 ) ) ; break ; case UNSPEC : case UNSPEC_VOLATILE : h = h * 251 + XINT ( x , 1 ) ; break ; default : break ; } hp = data ; * hp = * hp * 509 + h ; return 0 ; }
This is the worker function for const_rtx_hash, called via for_each_rtx.
This is the worker function for const_rtx_hash called via for_each_rtx .