gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
/* Returns the pseudo-register number of an FPA immediate constant,
   or FAIL if there isn't a valid constant here.  */
Returns the pseudo-register number of an FPA immediate constant,
or FAIL if there isn't a valid constant here.
Returns the pseudo - register number of an FPA immediate constant or FAIL if there isn ' t a valid constant here .
static int
parse_fpa_immediate (char ** str)
{
  LITTLENUM_TYPE words[MAX_LITTLENUMS];
  char *	 save_in;
  expressionS	 exp;
  int		 i;
  int		 j;
  for (i = 0; fp_const[i]; i++)
    {
      if (strncmp (*str, fp_const[i], strlen (fp_const[i])) == 0)
	{
	  char *start = *str;
	  *str += strlen (fp_const[i]);
	  if (is_end_of_line[(unsigned char) **str])
	    return i + 8;
	  *str = start;
	}
    }
  memset (words, 0, MAX_LITTLENUMS * sizeof (LITTLENUM_TYPE));
  if ((save_in = atof_ieee (*str, 'x', words)) != NULL
      && is_end_of_line[(unsigned char) *save_in])
    {
      for (i = 0; i < NUM_FLOAT_VALS; i++)
	{
	  for (j = 0; j < MAX_LITTLENUMS; j++)
	    {
	      if (words[j] != fp_values[i][j])
		break;
	    }
	  if (j == MAX_LITTLENUMS)
	    {
	      *str = save_in;
	      return i + 8;
	    }
	}
    }
  save_in = input_line_pointer;
  input_line_pointer = *str;
  if (expression (&exp) == absolute_section
      && exp.X_op == O_big
      && exp.X_add_number < 0)
    {
      if (gen_to_words (words, 5, (long) 15) == 0)
	{
	  for (i = 0; i < NUM_FLOAT_VALS; i++)
	    {
	      for (j = 0; j < MAX_LITTLENUMS; j++)
		{
		  if (words[j] != fp_values[i][j])
		    break;
		}
	      if (j == MAX_LITTLENUMS)
		{
		  *str = input_line_pointer;
		  input_line_pointer = save_in;
		  return i + 8;
		}
	    }
	}
    }
  *str = input_line_pointer;
  input_line_pointer = save_in;
  inst.error = _("invalid FPA immediate expression");
  return FAIL;
}
static int parse_fpa_immediate ( char * * str ) { LITTLENUM_TYPE words [ MAX_LITTLENUMS ] ; char * save_in ; expressionS exp ; int i ; int j ; for ( i = 0 ; fp_const [ i ] ; i ++ ) { if ( strncmp ( * str , fp_const [ i ] , strlen ( fp_const [ i ] ) ) == 0 ) { char * start = * str ; * str += strlen ( fp_const [ i ] ) ; if ( is_end_of_line [ ( unsigned char ) * * str ] ) return i + 8 ; * str = start ; } } memset ( words , 0 , MAX_LITTLENUMS * sizeof ( LITTLENUM_TYPE ) ) ; if ( ( save_in = atof_ieee ( * str , ' ' , words ) ) != NULL && is_end_of_line [ ( unsigned char ) * save_in ] ) { for ( i = 0 ; i < NUM_FLOAT_VALS ; i ++ ) { for ( j = 0 ; j < MAX_LITTLENUMS ; j ++ ) { if ( words [ j ] != fp_values [ i ] [ j ] ) break ; } if ( j == MAX_LITTLENUMS ) { * str = save_in ; return i + 8 ; } } } save_in = input_line_pointer ; input_line_pointer = * str ; if ( expression ( & exp ) == absolute_section && exp . X_op == O_big && exp . X_add_number < 0 ) { if ( gen_to_words ( words , 5 , ( long ) 15 ) == 0 ) { for ( i = 0 ; i < NUM_FLOAT_VALS ; i ++ ) { for ( j = 0 ; j < MAX_LITTLENUMS ; j ++ ) { if ( words [ j ] != fp_values [ i ] [ j ] ) break ; } if ( j == MAX_LITTLENUMS ) { * str = input_line_pointer ; input_line_pointer = save_in ; return i + 8 ; } } } } * str = input_line_pointer ; input_line_pointer = save_in ; inst . error = _ ( " " ) ; return FAIL ; }
Returns the pseudo-register number of an FPA immediate constant,
or FAIL if there isn't a valid constant here.
Returns the pseudo - register number of an FPA immediate constant or FAIL if there isn ' t a valid constant here .
/* First try and match exact strings, this is to guarantee
     that some formats will work even for cross assembly.  */ /* Just because we didn't get a match doesn't mean that the constant
     isn't valid, just that it is in a format that we don't
     automatically recognize.  Try parsing it with the standard
     expression routines.  */ /* Look for a raw floating point number.  */ /* Try and parse a more complex expression, this will probably fail
     unless the code uses a floating point prefix (eg "0f").  */ /* FIXME: 5 = X_PRECISION, should be #define'd where we can use it.
	 Ditto for 15.	*/